2018-12-03 01:03 AM
MCU: STM32L083
UART: 9600 bp 8N1
MCU freq: 32 MHz
I have an issue about the internal EEPROM erase/write timing in STM32L0 MCU.
I have an UART serial link configured to 9600 bauds, handled by interrupt routine in my code.
Sometimes, I have to write data in internal EEPROM. I have split the write operation in 2 phases: erase then write data which takes 3 ms each operation. During this time access to code execution is not allowed in the same bank, so the execution of my program is frozen.
Therefore, when erasing or writing data in internal EEPROM, I can receive up to 3 bytes over UART link.
2018-12-03 01:20 AM
You can place your UART RX interrupt code (and all the functions which are being called from there) into SRAM (or into another flash bank, if there is one).
2018-12-03 05:23 AM
Use the software handshake (XON/XOFF protocol), or hardware handshake (RTS/CTS) for the serial connection.
2018-12-03 05:29 AM
Unfortunately, the serial protocol cannot be changed (customer protocol) and do not use this mechanism.
2018-12-03 10:58 PM
If you neither can/want to stop the sender via handshake nor move the reception handling to RAM, you could stop the sender at a higher protocol level, or postpone the EEPROM storage until save.
I see no other options.
2018-12-03 11:44 PM
I'll try to put every UART interrupt functions into RAM. Thanks.