本帖最后由 cl17726 于 2017-1-18 10:48 编辑
这还真不行,l011从0x04开始取,后面可以,不过得保证擦为0,l011擦后为0,字节寻址会hardfault,具体还不知道原因,有知道吗
1)末位FF不能去掉,不然狂闪不止.
2)手册表示,这个能去掉吗?
The boot mode configuration is also re-sampled when exiting from Standby mode, except
for category 1 devices where BOOT0 pin is latched on NRST rising edge. Consequently the
boot mode configuration must not be modified in Standby mode (except for category 1
devices). After this startup delay has elapsed, the CPU fetches the top-of-stack value from
address 0x0000 0000, then starts code execution from the boot memory at 0x0000 0004
3)字节寻址正确做法怎么切换呢?我发现怎么改都HARDFAULT PS:找到问题了,原来是这个核心只接受WORD寻址.
假设擦后代码全位0,复合寻址规定,那么可以这样.
09 00 00 00 09 00 00 00 06 48 07 49 01 60 07 48
01 60 42 69 4A 40 42 61 05 4B 5B 1C 93 42 FC D1
F7 E7 00 00 2C 10 02 40 7F FF 0F 00 00 04 00 50
LDR R0,=0x4002102C
LDR R1,=0x000FFF7F
STR R1, [R0]
LDR R0,=0x50000400
STR R1, [R0]
Application
LDR R2,[R0,#0x14]
EORS R2,R2,R1
STR R2,[R0,#0x14]
LDR R3,=0x000F0000
Delay
ADDS R3,R3,#1
CMP R3,R2
BNE Delay
B Application
对齐要求,取指要求等等限制,估计都没的话可以到40B+吧.
|