Skip to content

Disabling optimizations in bootloader code. Why? #26

Discussion options

You must be logged in to vote

The caches and branch prediction are enabled in SystemInit().

They are just disabled in startup so we can set up the stack and other things without having to worry about flushing the cache or anything complex.

Also, the cache does not use SRAM, so disabling it doesn't give you more available RAM (same as on the H7).

The A7 is hardly usable with the caches off. The MMU can be used to set up regions that are non-cacheable, which you need to do for DMA transfers (or else keep the cache on and make sure to flush/invalidate at the right times)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by codewitch-honey-crisis
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants