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.

AM3359 (BeagleBone) freezes

Other Parts Discussed in Thread: AM3359, SYSBIOS

When I load my software onto the beaglebone everything is successful.  The GEL file scripts successfully execute and the program is properly loaded onto the processor.  The issue i get is that when the GPIO1ModuleClkConfig is executed the first time it hangs on the following piece of code (which is an include file):

    /*
    ** Waiting for IDLEST field in CM_PER_GPIO1_CLKCTRL register to attain the
    ** desired value.
    */
    while((CM_PER_GPIO1_CLKCTRL_IDLEST_FUNC <<
           CM_PER_GPIO1_CLKCTRL_IDLEST_SHIFT) !=
           (HWREG(SOC_CM_PER_REGS + CM_PER_GPIO1_CLKCTRL) &
            CM_PER_GPIO1_CLKCTRL_IDLEST));

if i restart the debugger.   It then executes the code flawlessly.  Has anyone else experienced a similar issue?

  • Hi,

    CM_PER_GPIO1_CLKCTRL_IDLEST_FUNC is defined to be 0u. From the AM335x TRM (Table 8-58. CM_PER_GPIO1_CLKCTRL Register Field Descriptions) I checked that the value of 0 means that the GPIO1 clocks are fully functional:

    0x0 = Func : Module is fully functional, including OCP

    The while loop is waiting for the module to come out of idle mode or perhaps be enabled. Please check the value of the IDLEST field of the CM_PER_GPIO1_CLKCTRL register right before you enter the while loop in order to see what is the current status of the module.

    As this is StarterWare, you may also look for an answer to your question in the StarterWare forums.

    Best regards,
    Miroslav

  • Miroslav,

    I believe that this is more than just a Starterware issue.  As it is at a register write level.  Granted the code is from starterware it would still cause issue if I had written it and implemented it.  The fact that it is from Starterware is irrelivant.  To me its an issue that I'm having with the AM3359 processor.  I understand that it is checking the value of the IDLEST field of the CM_PER_GPIO1_CLKCTRL register.  My question is what do I need to have set so that I don't get "hung up" on the while statement.  

  • Hi,

    Miroslav Kiradzhiyski XID said:
    Please check the value of the IDLEST field of the CM_PER_GPIO1_CLKCTRL register right before you enter the while loop in order to see what is the current status of the module.

    Please provide this information so that I can help you further. I need to know if the module is stuck in idle state or is it disabled.

    Best regards,
    Miroslav

  • Hi,

    Where have you put the breakpoint? In the beginning of the GPIO1ModuleClkConfig() function or right before the IDLEST field while loop:

        while((CM_PER_GPIO1_CLKCTRL_IDLEST_FUNC <<
               CM_PER_GPIO1_CLKCTRL_IDLEST_SHIFT) !=
               (HWREG(SOC_CM_PER_REGS + CM_PER_GPIO1_CLKCTRL) &
                CM_PER_GPIO1_CLKCTRL_IDLEST));

    If it is right before the IDLEST field loop, then this is very strange. In order to get there the MODULEMODE field of CM_PER_GPIO1_CLKCTRL register has to be ENABLED, yet from your screenshot it is marked as DISABLED.

    Best regards,
    Miroslav

  • Miroslav,

    So I've been trying to work this.  The interesting part is when I debug its not finding the value for CM_PER_GPIO1_CLKCTRL despite having the appropriate header files in place.  The other interesting this is if i try to use the Default ti.platforms.beaglebone I receive the following errors at debug time:

    [CortxA8] in handle: 0x0.
    Main stack base: 0x800121ac.
    Main stack size: 0x2000.
    R0 = 0x44e000ac  R8  = 0x80005cec
    R1 = 0x00000000  R9  = 0x000000b0
    R2 = 0x80005dd0  R10 = 0x0dfc0000
    R3 = 0x00000000  R11 = 0x000298d0
    R4 = 0x800054e4  R12 = 0xffffffff
    R5 = 0x00000000  SP(R13) = 0x80014198
    R6 = 0x800140ac  LR(R14) = 0x800074ac
    R7 = 0x8000750c  PC(R15) = 0x80005c8c
    PSR = 0x6000019f
    ti.sysbios.family.arm.exc.Exception: line 176: E_dataAbort: pc = 0x80005c8c, lr = 0x800074ac.
    xdc.runtime.Error.raise: terminating execution