STM32L151. Does the CPU halt during EEPROM write?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 12:58 AM
I'm using an STM32L151 and I write values to EEPROM. I have a timer interrupt that executes at 1000Hz. But I see that the interrupt lags when I write to EEPROM.
How can I avoid this? Should I place my timer interrupt handler in RAM? Would that work?
- Labels:
-
EEPROM devices
-
STM32L1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 1:32 AM
Use a dual-bank device (Cat4, 5, 6, according to RM), or execute all relevant code (i.e. the code which writes to EEPROM, and ALL active interrupts' code) from RAM.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 3:44 AM
I tried to relocate the vector table to RAM and move all interrupt code to RAM, but the interrupt still halts.
I don't know why I should also move all code responsible for writing to EEPROM to RAM also?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 4:07 AM
And it looks like the cycle counter register also stalls? Is this correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-11 4:21 AM
ALL code that can potentially be executing ​needs to be in RAM. ie libraries, subfunctions, anything in the path or call trees thereof. It is the attempt to have some concurrent access that cases the memory read to stuff wait states until completion of the write operation.
Up vote any posts that you find helpful, it shows what's working..
