I'm working with renesas RZ A1H cortext A9 processor and i have one problem with Boot loader. In boot loader if L1 cache is initialize then it wont jump to the user application and it stuck after jump function. also I'm initializing L1 cache again in my user application.
Everything works fine if L1 cache is not initialize in bootloader.
If this is just a "public announcement", then I would like to add, that the ART accelerator, which is a cache to the Flash on the STM32 MCUs, also cause issues when bootloading.
I would just turn off any caching on any architecture when bootloading.
How to overcome this issue of cache?? In bootloader i need cache to perform operation faster but it wont booting my application.
Is there any steps that needed before jumping to the user application???
On that MCU the issue was:
10 The MCU was containing code.
20 We overwrote the Flash.
30 We were expecting that the new code will be excecuted, but the old was, since it was in the cache
The solution was to 25 flush the cache. Or to turn it off if possible.
On some architectures, the caches contains random garbage on powerup and needs to be cleared before being enabled.
do you have cache flush assembly code for cortex A9 processor or programming guide ?
You can probably find code easily on the net (eg. any open-source OS that supports the Cortex-A9). The cache maintenance operations are performed via CP15, and are documented in the ARMv7-A architecture reference manual, and the Cortex-A9 technical reference manual for the core-specific bits.