Skip to main content
tehniksit
Associate
January 26, 2021
Question

stm32h743 SDcard IAP application can't copy bin file to the flash

  • January 26, 2021
  • 0 replies
  • 437 views

It stops at comparing values written into the flash. At the begginig some data are copying well, but then it doesn't match and return FLASHIF_WRITINGCTRL_ERROR. It always stops at the same position, but when I change size of stack it becomes different.

if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, FlashAddress, ((uint32_t)(Data+i))) == HAL_OK)
 {
 /* Check the written value */
 if (*(uint32_t*)FlashAddress != *(uint32_t*)(Data+i))
 {
 /* Flash content doesn't match SRAM content */
 return(FLASHIF_WRITINGCTRL_ERROR);
 }
 /* Increment FLASH destination address */
 FlashAddress += 32;
 }

This topic has been closed for replies.