CH579 Flash address mapping with RB_ROM_CODE_OFS

Hello!

What is a flash address map when RB_ROM_CODE_OFS bit is set? CodeFlash is moved 0x8000 bytes down, but is DataFlash addressing shifted same way (i.e. became 0x00036800-0x00036FFF)?

I need read and write access to DataFlash from my APP code, which run with RB_ROM_CODE_OFS bit set and it looks like read access to DataFlash actually return data from InfoFlash.

RB_ROM_CODE_OFS 是指code運(yùn)行取地址的時(shí)候,會(huì)固定加上0x8000,這樣你從0地址開始存放的代碼,就要從32K的位置開始存放。
但是這個(gè)標(biāo)志位不影響讀配置和dataflash,他至少改變code運(yùn)行取地址,dataflash還是可以使用EVT里面的flash例子參考。


I did some research and found the following:

If RB_ROM_CODE_OFS is set, all Flash addresses are moved 0x8000 bytes down, but only for CPU accesses, Flash controller still uses unmodified addressing for erase/write operations!

I.e:

0x00008000-0x0003E7FF became 0x00000000-0x000367FF (part of CodeFlash)

0x0003E800-0x0003EFFF became 0x00036800-0x00036FFF (DataFlash)

0x0003F000-0x0003FFFF became 0x00037000-0x00037FFF (SystemFlash)

0x00040000-0x000403FF became 0x00038000-0x000383FF (InfoFlash)

Actually, InfoFlash pages are repeated multiple times, so still readable at 0x00040000 area.

Hope that information will help other users.


只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频