Skip to main content
Visitor II
January 25, 2021
Question

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

  • January 25, 2021
  • 2 replies
  • 1217 views

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

    This topic has been closed for replies.

    2 replies

    Graduate II
    January 25, 2021

    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.

    gfxfloroAuthor
    Visitor II
    January 26, 2021

    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.