Other Parts Discussed in Thread: SYSBIOS, AM1808, STARTERWARE-SITARA
Tool/software: TI-RTOS
I'm reading from the USB Device Control register using the HWREG macro. When I do so and the device is using the CDC driver it hangs the system and I haven't been able to get any relevant info about why it is crashing.
The statement that hangs things up is the following:
Usb_DevCtl = /* Crash --> */HWREG(USB0_BASE + USB_O_DEVCTL);
The constants are defined as
#define USB0_BASE SOC_USB_0_BASE
#define SOC_USB_0_BASE (0x47401400)
#define USB_O_DEVCTL 0x00000060 // USB Device Control
* I've verified through serial port that USB0_BASE + USB_O_DEVCTL does in fact equate to 0x47401460 which is correct
* If I bypass the HWREG call, everything works normally (except that I don't get the correct status I'm looking for from the Dev Ctl register of course)
* This is only a problem if the CDC driver is loaded. Code works just fine if I use the USB device driver that does not use CDC. Does use of the CDC driver somehow make USB_O_DEVCTL not readable?
* There is no other crash info. When running in the debugger it just vectors off with no context info available
I'm reading this register just to look at bit 3 to see if there is a cable connected and there is something at the other end of the USB cable controlling the device. If there is some other simple way to detect if there is life on the other end of the USB cable I'm OK with making a change but I would have expected that simply reading from a register is pretty darn simple and would not have issues (and it doesn't unless the CDC driver is running).
Kevin Jennings
