Skip to main content
HM.80
Associate
Solved

how to write or read internal RAM from specific location

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.
    S.Ma
    S.MaBest answer
    Principal

    uint8_t byte;

    uint8_t* pbyte = 0x0000;

    byte = *pbyte;

    byte++;

    *pbyte = byte;

    ???

    3 replies

    S.Ma
    S.MaBest answer
    Principal

    uint8_t byte;

    uint8_t* pbyte = 0x0000;

    byte = *pbyte;

    byte++;

    *pbyte = byte;

    ???

    HM.80
    HM.80Author
    Associate

    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??

    S.Ma
    Principal

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