2017-05-25 01:29 AM
Hi,
STM8 has a great Peripheral Library, which can hide complexity of register configuration. STLUX also has a library but it is not as rich as the STM8 one. I used stm8s_i2c.{c,h} for STLUX with success and want to do the same for stm8s_flash.{s,h} since stlux_flash.{c,h} is very limited compared to the stm8 version: stlux_flash can operate only EEPROM, while stm8_flash can operate any memory region (flash, eeprom, option bytes).
So here is the question: Is this possible?
My understanding is that STLUX has a FLASH peripheral and is able to do IAP. I just need to setup memory map correctly for the chosen part (int stm8s_flash.h) and verify that correct bits are set and monitored during operation (there are few options in the stm8s_flash.c).
My MCU of choice is STLUX385A. What STM8S MCU is the closest counterpart?
Thanks,
Maksim.
#stlux #iap #flash2017-05-30 02:19 AM
My assumption was correct (at least for programming of option bytes). So the rest should be good too, since same registers are present in STLUX devices.
Maksim
2017-05-30 08:28 AM
Hi Maksim,
yes, you're right, you can use stm8s_flash command to have access to STLux E2PROM, flash and option bytes.
Stefano