yincheng.zhong
昨天 c8240d55741f0ed86099a0a8c616f4fc68372134
STM32H743/HAL/MCUFlash.c
@@ -10,6 +10,7 @@
 *******************************************************************************/
#include "MCUFlash.h"
#include "stm32h7xx_hal.h"
#include "HIDO_Debug.h"
/*******************************************************************************
 *                                  Macro                                      *
@@ -290,7 +291,10 @@
    HIDO_UINT32 remaining = _u32WriteLen;
    HIDO_UINT32 addr = _u32WriteAddr;
    HIDO_UINT8 const *src = _pu8WriteData;
    HIDO_UINT8 wordBuf[MCU_FLASH_WORD_BYTES];
    /* 使用32位数组确保4字节对齐,避免HAL_FLASH_Program中出现非对齐访问导致的HardFault */
    HIDO_UINT32 wordBuf32[MCU_FLASH_WORD_BYTES / 4];
    HIDO_UINT8 *wordBuf = (HIDO_UINT8 *)wordBuf32;
    while (remaining > 0)
    {