cancel
Showing results for 
Search instead for 
Did you mean: 

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

tehniksit
Associate

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;
    }

0 REPLIES 0