cancel
Showing results for 
Search instead for 
Did you mean: 

STM8 'Read While Write' function necessary to ensure serial RX while accessing EEPROM?

gfxfloro
Senior

Hi,

I am looking at STM8 MCUs and am trying to figure out, if I need the RWW functionality. I want to save data to EEPROM after a specified time has elapsed and read at random times from the data EEPROM. I also want to have UART comms running.

To ensure that I won't miss any bytes, do I need the RWW functionality? It seems to me if I donÄt have that, my interrupts are blocked the entire time I write to the EEPROM because the vector table is in the same memory. Am I wrong in this assumption? Can I do anything else to ensure the reception of bytes is uninterrupted?

Cheers

2 REPLIES 2
Uwe Bonnes
Principal III

With the uart empty, you can revceive on character and perhaps have some bits of the next charakter pending in then receiver before, FIFO and DMA mode left aside. Anything else needs interaction from the CPU and this part of the code does not run from RAM, you need RWW.

gfxfloro
Senior

Thanks. This is the first I am looking into these small microcontrollers and I was a bit surprised how challenging it could become simply to write to eeprom.

One other thing: A quick google turned up an approach of relocating the interrupt vector table.

Would this also be a viable option? The interrupts would be able to fire, but the code to handle them would still be in flash.