3
votes

Trying to run code from a STM32F429s CCM but I always get a Hard Fault with the IBUSERR flag set as soon as I hit the first instruction in the CCM.

The instruction is valid and well aligned. Is it possible that the STM32F4xx does not allow execution from the CCM? (Data access works well).

alios

1
On this part the CCM has a performance advantage only when used to access data concurrently with DMA access to other on-chip memory by avoiding bus contention.Clifford

1 Answers

6
votes

The CCM in these parts is only connected to the data bus. Instructions cannot be fetched from this memory -- only flash memory, SRAM1, and external memory should be used for code.

System architecture for STM32F42xxx and STM32F43xxx devices

For more information, refer to section 2.1 ("System Architecture") of the reference manual, which is where the above image came from.