On 10/04/2011 11:44 AM, Holger Hans Peter Freyther wrote:
SRCMP: 1 == Software reset in progress
RSTTYP: 2 == Watchdog reset
so it is stuck somewhere. time to get a USBJtag adapter.. :)
Hi,
I am lacking USB and AT7SAM knowledge here. I made the debug output
synchronous and managed to get here:
udp_irq(imr=0x1200, isr=0x0300, state=5): RXSUSP RXRSM END
udp_irq(imr=0x1200, isr=0x1000, state=5): ENDBUSRES END
udp_irq(imr=0x1203, isr=0x0801, state=5): EP0INT(Control) CSR=0x88804 len=8
bmRequestType=0x80 DATA_IN=1 dfu_state = 0 GET_DESCRIPTOR(wValue=0x0100,
wIndex=0x0000) OUT
So this means that we at least get a USB request to get our descriptor, and
asking for USB_DT_DEVICE.
The call is made to:
udp_ep0_send_data((const char *) &dev_descriptor,
MIN(sizeof(dev_descriptor), wLength));
and it is getting stuck in:
udp_ep0_send_zlp(void) {
AT91PS_UDP pUdp = AT91C_BASE_UDP;
pUdp->UDP_CSR[0] |= AT91C_UDP_TXPKTRDY;
while (!(pUdp->UDP_CSR[0] & AT91C_UDP_TXCOMP)) ;
^^^^ sending never completes
Anyone has a guess? I am going to start to read the Atmel docs now.