This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I'm unable to get USB to work using the example code as a USB device. I put in a counter to see the sources of the interrupt handler in in usbdenum.c, and it's always SBD_INT_SRC_SOF or USBD_INT_SRC_DS_CHG.
I'm using a RM46x chip, so I had to mix and match some of the example code. In reviewing the code and datasheets, it aligns the same.
HALCoGen/v04.07.01/examples/RM48x/example_usbd_cdc/example_usbd_cdc.c
HALCoGen/v04.07.01/drivers/RM48L950ZWT/USB570v000/*
I followed the instructions for configuration here. Per other reading in the forum the VCLKA3_S and VCLKA3_DIVR are at 48MHz. I enabled IRQ 68, 69, 70, 71, 72 to call the serviceIrq handler. Step 7.3.7.7. in that URL should be updated to reflect the ISRs that should be set. Note that I am using GCC as a compiler.
When I connect the USB, I see this in dmesg.
dmesg shows:
[20980.100665] usb 3-2.2.1: new low-speed USB device number 16 using xhci_hcd
[20980.180690] usb 3-2.2.1: device descriptor read/64, error -32
[20980.368719] usb 3-2.2.1: device descriptor read/64, error -32
[20980.564614] usb 3-2.2.1: new low-speed USB device number 17 using xhci_hcd
[20980.644707] usb 3-2.2.1: device descriptor read/64, error -32
[20980.836695] usb 3-2.2.1: device descriptor read/64, error -32
[20980.949215] usb 3-2.2-port1: attempt power cycle
[20981.560673] usb 3-2.2.1: new low-speed USB device number 18 using xhci_hcd
[20981.561148] usb 3-2.2.1: Device not responding to setup address.
[20981.769129] usb 3-2.2.1: Device not responding to setup address.
[20981.976671] usb 3-2.2.1: device not accepting address 18, error -71
[20982.060680] usb 3-2.2.1: new low-speed USB device number 19 using xhci_hcd
[20982.061157] usb 3-2.2.1: Device not responding to setup address.
[20982.273000] usb 3-2.2.1: Device not responding to setup address.
[20982.480683] usb 3-2.2.1: device not accepting address 19, error -71
[20982.481351] usb 3-2.2-port1: unable to enumerate USB device
Any suggestions on why it is not working? When I set up a breakpoint in the USBDeviceIntHandlerInternal I often end up with a program counter at undef entry or reset entry. I'm also not sure why that would be happening.
Hi Michael,
Do you follow the instructions listed in the following link:
http://software-dl.ti.com/hercules/hercules_docs/latest/hercules/How_to_Guides/index.html
Th example code was developed on RM48Lx HDK. For RM46, the HALCOGen generated code has hardcoded the pinmux of pin 1/2/5/15 for being used as GIO or N2HET.
Please comment out the line #254, 256, 257, and 258 of pinmux.c. I hope those modifications solve your problem.
I haven't been able to use the example code. I couldn't find any USB related RM48x example code in your git @
https://git.ti.com/cgit/hercules_examples/hercules_examples/tree/Application/?h=master
I am currently using a custom HALCoGen project, which has the mux set up correctly. If you can provide me with that USB example project, or point me to the location in git, I can try that with the mux lines commented out as you mentioned.