CH579 InfoFlash layout and BootLoader

1) Seems like InfoFlash page at addresses 0x00040000-0x000401FF only ustilize single word at address 0x00040010 and all other locations unused. Can I use some other bytes to store my own short data?

2) Is it possible to overwrite factory BootLoader (0x0003F000-0x0003FFFF) with my own code?


Hi,

Neither infoflash nor factory bootloader can be modified by the user on ch577/578/579.

Users can only put data in 0-252KB on CH579.


Thanks for reply!

Seems like I need to explain my current problem in more details.

My project firmware consists of two parts: the bootloader, which permanently written at 0x00000000 and application code at 0x00008000, which need to be field-upgradable. At POR bootloader checks the presense and validity of APP code and uses RB_ROM_CODE_OFS to switch into APP or obtain new APP over Ethernet. So far - so good. The trouble is switching back from APP into bootloader if needs for update detected. It seems like RB_ROM_CODE_OFS bit can't be cleared by software. POR is not a solution, as device is not phisically accessible. And GRWSN switches MCU into factory boot mode instead. So the question is: how to programmatically switch execution from APP (which run with RB_ROM_CODE_OFS set) back into my boot code? Is it a way to prevent factory bootloader from coming up after GRWSN or at all?

Datasheet mention the  bit CFG_BOOT_EN within InfoFlash, which possible can solve my question, but there is no such checkbox within WCHISPTool V2.90


1,Try to go to shutdown, and make a short rtc trig delay for wakeup before go to shutdown ,when rtc wakeup the chip ,the GRWSM would generate.

2,Here is anthor soulution for user-bootloader and app:

Put a tiny code at address 0x0000000, all interrupts will jump to the same function inside. And when an interrupt occurs, the function re-jumps to the real interrupt handle in user-bootlaoder or app by a booloader/app flag at R8_GLOB_RESET_KEEP.

(Unzip this file and put it in the EXAM folder of the CH579 SDK from wch.cn  http://www.wch.cn/downloads/CH579EVT_ZIP.html

)

icon_rar.gifch579_inter_remap.zip



只有登录才能回复,可以选择微信账号登录