This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 4256dd934f Fix onchip flash erase fail
4256dd934f is described below
commit 4256dd934f58c2ba6f5aadcf684c9bd2c09335ce
Author: laoniaokkk <[email protected]>
AuthorDate: Wed Sep 20 11:48:44 2023 +0800
Fix onchip flash erase fail
---
arch/arm/src/at32/at32f43xx_flash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/src/at32/at32f43xx_flash.c
b/arch/arm/src/at32/at32f43xx_flash.c
index dac79b1cf3..75815f62f6 100644
--- a/arch/arm/src/at32/at32f43xx_flash.c
+++ b/arch/arm/src/at32/at32f43xx_flash.c
@@ -290,7 +290,7 @@ ssize_t up_progmem_eraseblock(size_t block)
flash_unlock();
modifyreg32(flash_ctrl, 0, FLASH_CTRL_SECERS);
- modifyreg32(flash_addr, 0, block * AT32_FLASH_PAGESIZE);
+ modifyreg32(flash_addr, 0, block * AT32_FLASH_PAGESIZE + AT32_FLASH_BASE);
modifyreg32(flash_ctrl, 0, FLASH_CTRL_ERSTR);
while (getreg32(flash_sts) & FLASH_STS_OBF)