Part Number: RM57L843
Hello TI engineer:
In boot mode of my application, when in the bootloader mode, MPU is disabled successfully. But when the cacheDisable function as shown followed is called, the MCU abnormal and fly.
;-------------------------------------------------------------------------------
; Disable caches
.def _cacheDisable_
.asmfunc
_cacheDisable_
stmfd sp!, {r1}
MRC p15, #0, R1, c1, c0, #0 ; Read System Control Register configuration data
BIC R1, R1, #0x1 <<12 ; instruction cache disable
BIC R1, R1, #0x1 <<2 ; data cache disable
DSB
MCR p15, #0, R1, c1, c0, #0 ; disabled cache RAMs
ISB
ldmfd sp!, {r1}
bx lr
.endasmfunc
After trying erase, program and read back the flash with cache enable, I found the erase and program may be OK, but the read back contents are random.
I guess that the read will read from the cache memory instead of the Flash.
Q:
1) How to disable the cache?
2) Can I run the bootloader with cache enable? How to fix the read back problem?
Thank you.
