AnsweredAssumed Answered

flash program single byte in stm32L031g6

Question asked by Heo WooHyeok on Nov 20, 2017
Latest reply on Nov 20, 2017 by Clive One

I want to write 1byte variable to the internal flash memory. 

It works well when I write 4bytes variable like this.

if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, Address, vari4) == HAL_OK)

but when I write 1 byte variable to the memory like this, it works only first time.

when I call HAL_FLASH_Program next time it doesn't work and goes to the Hardfault_handler

if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, Address, vari1) == HAL_OK)

Is it impossible to Program single byte data to internal flash memory in stm32l031g6?