cancel
Showing results for 
Search instead for 
Did you mean: 

how to write or read internal RAM from specific location

HM.80
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
S.Ma
Principal

uint8_t byte;

uint8_t* pbyte = 0x0000;

byte = *pbyte;

byte++;

*pbyte = byte;

???

View solution in original post

3 REPLIES 3
S.Ma
Principal

uint8_t byte;

uint8_t* pbyte = 0x0000;

byte = *pbyte;

byte++;

*pbyte = byte;

???

HM.80
Associate II

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)