Skip to main content
Maksim Salau
Associate
May 25, 2017
Question

STLUX Library: Flash functions

  • May 25, 2017
  • 2 replies
  • 1813 views
Posted on May 25, 2017 at 10:29

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 #flash
This topic has been closed for replies.

2 replies

Maksim Salau
Associate
May 30, 2017
Posted on May 30, 2017 at 11:19

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

Stefano PUCILLO
Visitor II
May 30, 2017
Posted on May 30, 2017 at 15:28

Hi Maksim,

yes, you're right, you can use stm8s_flash command to have access to STLux E2PROM, flash and option bytes.

Stefano