Other Parts Discussed in Thread: HALCOGEN
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.