Author Topic: samX51 smarteeprom reading consecutively needs a pause between reads or not  (Read 645 times)

0 Members and 1 Guest are viewing this topic.

Offline snarkysparkyTopic starter

  • Frequent Contributor
  • **
  • Posts: 421
  • Country: us
I am storing 20 32 bit values in Seeprom starting at 0 adress.

At boot up I want to load all these into a shadow array.

Does this work?
Code: [Select]
unsigned int LoopVar = 0;
for(LoopVar = 0; LoopVar < 20; LoopVar++)
{
SmartEEpromMemoryShadow[LoopVar] = *(unsigned int *)(SEEPROM_ADDR + 4 * LoopVar);

}




or do I need to pause in the loop for

while (NVMCTRL->SEESTAT.bit.BUSY);

Thanks
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12016
  • Country: us
    • Personal site
You need to wait for the BUSY flag before reads and writes.
Alex
 
The following users thanked this post: snarkysparky


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf