diff --git a/drivers/lhal/src/flash/bflb_sflash.c b/drivers/lhal/src/flash/bflb_sflash.c index 30f3af7c8..973c44dc7 100644 --- a/drivers/lhal/src/flash/bflb_sflash.c +++ b/drivers/lhal/src/flash/bflb_sflash.c @@ -1133,7 +1133,7 @@ void ATTR_TCM_SECTION bflb_sflash_set_burst_wrap(spi_flash_cfg_type *flash_cfg) dummy_clks = flash_cfg->burst_wrap_cmd_dmy_clk; cmd = flash_cfg->burst_wrap_cmd; wrap_data = flash_cfg->burst_wrap_data; - arch_memcpy4((uint32_t *)flash_ctrl_buf, &wrap_data, 4); + arch_memcpy4((uint32_t *)flash_ctrl_buf, &wrap_data, 1); flash_cmd.cmd_buf[0] = (cmd << 24); flash_cmd.rw_flag = SF_CTRL_WRITE; flash_cmd.dummy_clks = dummy_clks; @@ -1169,7 +1169,7 @@ void ATTR_TCM_SECTION bflb_sflash_disable_burst_wrap(spi_flash_cfg_type *flash_c dummy_clks = flash_cfg->de_burst_wrap_cmd_dmy_clk; cmd = flash_cfg->de_burst_wrap_cmd; wrap_data = flash_cfg->de_burst_wrap_data; - arch_memcpy4((uint32_t *)flash_ctrl_buf, &wrap_data, 4); + arch_memcpy4((uint32_t *)flash_ctrl_buf, &wrap_data, 1); flash_cmd.cmd_buf[0] = (cmd << 24); flash_cmd.rw_flag = SF_CTRL_WRITE; flash_cmd.dummy_clks = dummy_clks;