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.

MSP432 Stuck while enabling SRAM bank retention

Hey all,

My code worked fine until I added    

MAP_SysCtl_enableSRAMBank(SYSCTL_SRAM_BANK7); 

After halting the Watchdog.

Debugger tells me I'm stuck in while (!SYSCTL->rSRAM_BANKEN.b.bSRAM_RDY) inside of the enableSRAMBank function.

void SysCtl_enableSRAMBank(uint_fast8_t sramBank)
{
    ASSERT(SysCtlSRAMBankValid(sramBank));

    /* Waiting for SRAM Ready Bit to be set */
    while (!SYSCTL->rSRAM_BANKEN.b.bSRAM_RDY)
        ;

    SYSCTL->rSRAM_BANKEN.r = (sramBank | SYSCTL_SRAM_BANKEN_BNK0_EN);
}

Any ideas?

  • Albert,

    What processor are you using here?

    Regards,
    JH
  • Ops. just edited the title. MSP432.
  • Hi Albert,

    this might be related to one of the SRAM errata we currently have on the experimental silicon. MSP432 Erratasheet: http://www.ti.com/lit/pdf/slaz610

    A few things you can do to work around this:

    - Make sure to perform the SRAM bank operation before changing the VCORE.

    -  Add a time-out for the follow while loop, SRAM banks should be enabled by then, just the READY bits are not properly set.

    /* Waiting for SRAM Ready Bit to be set */
    uint32_t timeout = 1000;
        while ( (!SYSCTL->rSRAM_BANKEN.b.bSRAM_RDY) && (timeout--))
            ;
     
        SYSCTL->rSRAM_BANKEN.r = (sramBank | SYSCTL_SRAM_BANKEN_BNK0_EN);

    Both of the issues are being addressed for the production version of the device, so the original DriverLib function can be used again then.

    Hope that helps!

    ~Dung

**Attention** This is a public forum