2021-10-15 06:20 AM
I am using the STM8L151C8T6 microcontroller (high density with 64k flash) and the StandardPeripheralLibrary v1.6.1, as well as the IAR Embedded Workbench for STM8 v3.11.1. I need to write and erase blocks of flash memory with high speed. For this I want to use a block writing. In the peripheral library there are functions FLASH_ProgramBlock (...) and FLASH_EraseBlock (...) for this. According to the documentation, these functions should be run from RAM. I have uncommented #define RAM_EXECUTION (1) in stm8l15x.h file.
The problem is I am getting a compiler warnings:
Also, I get the program hangs in the FLASH_EraseBlock() function on line 858.
I assume that the freezes and warnings are due to the fact that the instructions add32_l0_l0_l1 and sll32_l0_l0_a are in flash memory.
But what can I do? How do I get rid of the warnings and get block write and erase to work correctly?
Thanks. Best regards, Igor lazorenko