|
Hi guys,
I'm developing an application using the AT91SAM7X as a USB->JTAG/UART/SPI/GPIO general purpose device. I have no operating system, and have based the code on the SAM7X-EK USB-CDC example, and the USB-CDC-MSD example
On the host system I'm using libusb-1.0 and pyusb-1.0, on both windows and linux (of many flavours)
I'm compiling the at91sam7x firmware on linux using gcc-4.5.0 and binutils 2.20.1.20100303
I have the following problem:
The application works fine and is stable most of the time, however, when I place the USB cable next to a power plug, and plug/unplug that device (i.e. generating ESD spikes), the USB connection drops, and I cannot re-connect until I have done a power-cycle of the AT91SAM7X part. I'm using this in an industrial environment, so require it to work when placed next to a switching source (plugging/unplugging devices is just my testcase). I've tried shielding cables, etc, etc, but no improvement.
This is consistant on windows and linux on many different machines, so I do not believe it is the host _hardware_. it happens on all boards and when running on an Olimex EVK also.
I have tied the TST and JTAGSEL pins to ground, with no improvement (I use the Erase pin, and suspect that this is not the problem, as the firmware seems to be fine when I reboot the part).
I currently do not have access to the JTAG debug tools to check what is going on in the CPU, but my attempts to write Exception debug routines have not yielded any information.
So, the questions that I have are this: 1. How to check if I'm getting caught in an exception handler (preferably using USB) 1a. Are there any standard exception handlers that someone can point me to? And any way of recovering from an exception (I'm just learning assembler at the moment) 2. Why doesn't pressing the reset button allow me to re-connect? 3. Has anyone else seen something similar. 4. Is there any other debugging steps I should be taking? 4a. Is there any other information that would be useful to prove to this forum? 4b. Are there any better forums to post to?
|