Silicon limitations STM8AL3xxx STM8L052R8 STM8L1xxx6/8
8/18 DocID17922 Rev 6
Case 2:
It is recommended to avoid any interrupts before WFE mode is entered. This can be
done by disabling all interrupts before the device enters Wait for event mode.
SIM
WFE
RIM
This workaround also prevents WFE re-execution in case 1.
No fix is planned for this limitation.
1.1.5 Core kept in stall mode when DMA transfer occurs during program/
erase operation to EEPROM
Description
When the MCU performs EEPROM program/erase operation, the core is stalled during data
transfer to the memory controller, which occurs at the beginning of the program/erase
operation. If a DMA request servicing starts while the core is stalled, the core does not
return from stall mode to program execution.
The core is stalled for 11 cycles during byte program/erase, 8 cycles during word
program/erase and 3 cycles during each word transfer in block programming mode. For
block erase, the core is stalled for 127 cycles.
When a DMA request arises, it is only served if the DMA priority is higher than the core
access priority.
If the current DMA priority is lower than the core one, the DMA service is delayed until the
core access becomes idle.
The DMA also includes a programmable timeout function, configurable by DMA_GCSR
register. If the core does not release the bus during this timeout, the DMA automatically
increases its own priority and forces the core to release the bus for DMA service.
No fix is planned for this limitation.
Several workarounds are available for this limitation.
Workaround 1
Disable all DMA requests during data transfer to the EEPROM.
This workaround is applicable for all program/erase operations.
Workaround 2
Configure DMA programmable timeout in the DMA_GCSR register to exceed the number of
stall cycles required during the transfer. DMA priority must never be configured to a very
high level.
This workaround is applicable for all program/erase operations except block erase.
In order to apply this workaround to block erase, use block programming to 0x00 instead of
block erase. This takes ~6
ms instead of ~3 ms.