STM32L071KZ MCU Flash Issue over ST bootloader
We are currently working on flashing an STM32L071KZ MCU using the STM32 bootloader.
The flashing process completes successfully when using a 64-byte payload. However, when we reduce the payload size to 8, 16, or 32 bytes, we observe unexpected behavior. In each case, only the first 8, 16, or 32 bytes of every 64-byte flash block are programmed successfully, while the remaining writes within the same 64-byte block do not take effect. This pattern repeats consistently for every subsequent 64-byte-aligned address.
We have verified that:
- The correct data is being transmitted to the MCU.
- The target flash address is incremented correctly for each write operation.
- The bootloader acknowledges the write commands.
Despite this, the flash programming behaves correctly only when using a 64-byte payload.
Is there any known limitation or programming requirement for the STM32L071KZ bootloader or flash controller regarding payload sizes? Are there any additional steps or constraints that must be followed when programming the flash using payloads smaller than 64 bytes?
Do we need to set any configuration in the keil software to support other size payload while flashing?
Any guidance or insights would be greatly appreciated.
Thank you.
