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.

TMS320C6748: PSC transition lockup

Part Number: TMS320C6748

using a version of usblib_c674x_c6748 to help manage USB communication. works great until the user app crashes. then our device essentially locks up waiting for someone to read requested data. this never happens and the device does not respond to hub or bus resets.

looking to reset the USB interface after a timeout. during the timeout am calling USBDBulkTerm(void *pvInstance). this in turn calls USBDCDTerm(unsigned int ulIndex). there interrupts are disabled, device is disconnected, endpoint is reset, and Phy clock is turned off.

the last line calls USBModuleClkDisable(). this eventually trickles down to a call to PSCModuleControl(SOC_PSC_1_REGS,1, 0, PSC_MDCTL_NEXT_DISABLE).

here we set [MDCTL] = 0x00000002, i.e. NEXT=Disable

then we set [PTCMD] = 0x00000001, i.e. GO[0] = 1

but [PTSTAT] == 0x00000001 forever, i.e.the PSC transition never completes 

what am I missing?  how do we get this power transition to complete?

  • Hi,

    I've notified the RTOS team. They will post their feedback directly here.

    Best Regards,
    Yordan
  • Thank you for your quick response!

    -might- be an RTOS issue in the sense of when to call USBDBulkTerm.


    BUT, I really think this is a PSC usage or bug issue. I posted the specific register settings which causes the c6748 to lockup.


    According to sprugj7d, section 8.3.2:

    The procedure for module state transitions is:

    1. Wait for the GOSTAT[x] bit in PTSTAT to clear to 0. You must wait for any previously initiated
    transitions to finish before initiating a new transition.
    2. Set the NEXT bit in MDCTLn to SwRstDisable (0), SyncReset (1), Disable (2h), Enable (3h), Auto
    Sleep (4h) or Auto Wake (5h).
    NOTE: You may set transitions in multiple NEXT bits in MDCTLn in this step. Transitions do not
    actually take place until you set the GO[x] bit in PTCMD in a later step.
    3. Set the GO[x] bit in PTCMD to 1 to initiate the transition(s).
    4. Wait for the GOSTAT[x] bit in PTSTAT to clear to 0. The modules are safely in the new states only
    after the GOSTAT[x] bit in PTSTAT is cleared to 0.


    This is exactly what we are trying to do:

    1) for some reason PSCModuleControl() does not check GOSTAT[0] in PSTAT for 0.
    1a) verified PSTAT.GOSTAT[0] == 0 while debugging
    2) "here we set [MDCTL] = 0x00000002, i.e. NEXT=Disable"
    3) "then we set [PTCMD] = 0x00000001, i.e. GO[0] = 1"
    4) "but [PTSTAT] == 0x00000001 forever, i.e.the PSC transition never completes "
  • also, this is a real hot button issue with a customer. seems like a straight forward solution.

    they want a result by end of next week.

    is it possible to pay someone for direct support?
  • my bad!

    -finally- realized I could just let the watchdog timeout which resets the device and USB connection.
    this leaves us ready to communicate with the user app when it restarts. woo hoo!

    thanks for listening!
  • Hi Kurt,

    Glad to see you resolved your issue!

    Best,
    Sahin