I am using the USB DMA example from the Low Power CSL 2.0 and created a bootable version of the application for the C5515 USB STICK.
I burned the application into NV memory and then configure the clockout pin.
The problem is that when the DSP boots from NVMEM the USB PLL is not running at all (CLKOUT High with CLKOUT enabled and CCSSR.SRC=0xF)
Setting CCSSR.SRC=0xB I can see the sysclk running at 120 MHz.
When I load the same code via code composer and the out of the box .gel scripts the application runs correctly and the USB PLL is observed to run at 60 MHz.
___
8/16 1PM update
I've tried CCSSR.SRC=0x7 as well after the DSP boot and get the same result. The USB_init() code does not appear to match the recommended steps in the USB user guide or the DSP user guide. In fact both these documents contradict each other for the proper steps to initialize the USB.
Section 1.4.3 of the http://www.ti.com/lit/ug/sprufx6/sprufx6.pdf
To enable the USB clock domain, follow these steps: 1. Enable the USB oscillator by setting USBOSCDIS = 0 in USBSCR. 2. Wait for the oscillator to stabilize. Refer to the device-specific data manual for oscillator stabilization time. 3. Enable the USB peripheral clock by setting USBCG = 0 in the peripheral clock gating control register 2 (PCGCR2). 4. Clear the USB clock stop request bit (USBCLKSTREQ) in the CLKSTOP register. 5. Clear the SUSPENDM bit in FADDR register. The USB user guide http://www.ti.com/lit/ug/sprugh9/sprugh9.pdf has:
The detailed USB PHY initialization sequence is as follows: 1. The bits USBOSCBIASDIS and USBOSCDIS in the USB system control register (USBSCR) should be cleared to 0 to enable the on-chip USB oscillatory if not enabled already. 2. Wait cycles for the on-chip oscillator to stabilize. Refer to the device-specific data manual for oscillator stabilization time. 3. To configure the PHY for normal operation, the bits USBPWDN, USBSESSEND, and USBPLLEN in USBSCR should be cleared to 0, the USBVBUSDET bit should be set to 1, and the USBDATPOL bit should be set according to the system requirements (set to 1 for normal operation). 4. Enable the USB clock by clearing USBCG to 0 in the peripheral clock gating configuration register 2 (PCGCR2). 5. Set the USBCLKSTPREQ bit. 6. Set COUNT = 20h in the peripheral software reset counter register (PSRCR). 7. Reset the USB controller by setting USB_RST to 1 in the peripheral reset control register (PRCR). This bit will self-clear once the reset has been completed.
Not sure if this could be more confusing. One document says to clear USBCLKSTPREQ and the other says to set USBCLKSTPREQ .
In either case, I run through these steps and cannot get the USB PLL to output 60 MHz. I've tried the code on another USB stick board and get the same results. It's as if the TI Bootloader puts the USB controller into a non-recoverable state.
Is there a USB PLL loss of lock status indicator?
Is there a limitation on the number of times the PLL register can be configured or some other protection? (I've seen this on other processor, but cannot find if this exists on the DSP)
Any help is greatly appreciated.