Skip to main content
Visitor II
February 10, 2019
Solved

how to write or read internal RAM from specific location

  • February 10, 2019
  • 3 replies
  • 1081 views

Hi,

I'm using stm8s003f3p6 microcontroller and learn it's different internal peripheral. using SPL

How can i write a byte at RAM location like 0x00 and read from it.

i also want to use IAP commands for flash.

i have read stm8s Reference manual , dastasheet and flash programming manual, but i can't find related to.

do anyone has code example ,link or document or sample code.

    This topic has been closed for replies.
    Best answer by S.Ma

    uint8_t byte;

    uint8_t* pbyte = 0x0000;

    byte = *pbyte;

    byte++;

    *pbyte = byte;

    ???

    3 replies

    S.MaAnswer
    Visitor II
    February 11, 2019

    uint8_t byte;

    uint8_t* pbyte = 0x0000;

    byte = *pbyte;

    byte++;

    *pbyte = byte;

    ???

    HM.80Author
    Visitor II
    February 11, 2019

    Thanks,it worked.

    Btw, im using Stvd , is there any other way(i mean without pointer) write value absolute memory locatiin??​

    Is stm8s memory(program memory, ram​,eeprom) is bit addressable??

    Visitor II
    February 11, 2019

    If you want to declare a variable at specific location, use specific compiler keywords, it should be in the compiler manual. (#pragma)