IMXRT1050 EVKB SEMC Deinit and Reinit causing Imprecise Data Bus Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMXRT1050 EVKB SEMC Deinit and Reinit causing Imprecise Data Bus Error

Jump to solution
992 Views
jordanwagner
Contributor I

I've modified the SDK's example for SEMC to touch all 32MB of SDRAM, then call SEMC_Deinit() and BOARD_InitSEMC() again.  This only works a few times before generating a hard fault after the call to Deinit, with the fault code reading IMPRECISERR, Imprecise Data Bus Error (0xe000ed28: 0x00000400).  In order to reproduce the error, it seems that a large amount of RAM must be accessed (more than the ~1KB from the example) and the RAM must be deinitialized and reinitialized more than once.  Is this the correct way to bring the SDRAM down and back up again?  The eventual use case for this is to only use the SDRAM occasionally and to deinitialize between uses to save power.  

for(i = 0; i < 10; i++)
{
  SEMC_SDRAMReadWrite32Bit();

  SEMC_Deinit(SEMC);

  if (BOARD_InitSEMC() != kStatus_Success)
  {
    PRINTF("\r\n SEMC SDRAM Init Failed\r\n");
  }
}

Tags (3)
0 Kudos
1 Solution
751 Views
jordanwagner
Contributor I

Turns out that it was an issue with caching.  Using SCB_InvalidateDCache_by_Addr() before the SEMC_Deinit call fixes the issue.

View solution in original post

0 Kudos
1 Reply
752 Views
jordanwagner
Contributor I

Turns out that it was an issue with caching.  Using SCB_InvalidateDCache_by_Addr() before the SEMC_Deinit call fixes the issue.

0 Kudos