CH32v3x: Doc update, precision on flash programming
mean00 opened this issue · 1 comments
mean00 commented
Hi,
1- There is a small typo in the CH32V2/3 v1.7 ref manual. In 32.5.6, for CH32V3x the page size is 256 bytes not 128. Later on it says 64*4 bytes = 256
2- The way the flash programming is explained is a bit confusing. It says
Use 32-bit mode to write data to the FLASH address, for example
*(uint32_t*)0x80000000 = 0x12345678;
which makes sense for a CH32F103 or similar chip where the flash is at an address which starts at 0x08000000.
But there is an extra zero.
I think what it actually meant is you have to make sure bit 31 is set
i.e. it could be reworded to
Use 32-bit mode to write data to the FLASH address with the bit 31 set, for example
*(uint32_t *)( (1<<31) |0x1000)=0x12345678
to write at flash address 0x1000
Thank you!
qiyongshuang commented
Thanks for your finding ,we will fix it in next version.
1.CH32V3x the page size is 256 bytes
2.Use 32-bit mode to write data to the FLASH address, for example
(uint32_t)0x80000000 = 0x12345678;
there is an extra zero.