The STM32Fxxxx flash sector size to erase is 16K. When the DCT1 and DCT2 are updated the corresponding sectors are erased and updated with new values. With current implementation the sector size is the limiting factor for DCT size.
With different DCT storage implementation, the DCT flash size could be reduced.
Thanks your replying.I use STM32F10x MCU with flash page size is 2k.
By the way, the flash will be erased in 8K page "chunks" regardless. So it is not recommended to change to 2K.
Thanks for your reply.sorry，I don't understand 8K page "chunks" .stm33f103 page size is 2k,I try make dct size to 2k.It can work,but the app start addrees must be more than 0x08008000。
#define ERASE_DCT_1() platform_erase_flash( FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY1_START_ADDRESS), FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY1_END_ADDRESS) )
#define ERASE_DCT_2() platform_erase_flash( FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY2_START_ADDRESS), FLASH_ADDRESS_TO_PAGE(PLATFORM_DCT_COPY2_END_ADDRESS) )
/* for stm33f103 the size of the page is 2k !!!! , it depends on the type of the stm32f1 device, high, low and medium density devices exist */
#define PLATFORM_FLASH_PAGE_SIZE ( 2*1024 )
Shanghai R&D Center
Zhejiang Shenghui Lighting Co., Ltd
Make sure the data is written would fit into the reserved flash memory.
Thanks for your reply.
I find only download application will change the bootloader data by WICED IDE.Download boot and dct is ok.
But I don't find the reason of the openocd write application change boot.
if I download bootloader,dct,application by jlink,The code run ok.
Discussion is being locked. If you have any follow-up, please start a new discussion.