cancel
Showing results for 
Search instead for 
Did you mean: 

Run code from CCM RAM F429

Srdjan Nikolic
Associate II
Posted on February 07, 2018 at 13:42

I am trying to develop sort of second stage bootloader that will be executed from the CCM RAM.

First stage bootloader as USB host reads image from external USB flash and write it on the CCM.

When all data are in the CCM, interrupts are disabled; Stack pointer is set accordingly, VTOR set to 0x10000000. But then jump to the address on CCM causes an exception.

Blx r3    

Where r3 is 0x10006f5d causes hard fault.

lr(r14) = 0xffffffe9

pc(r15) = 0xfffffffe

aspr = 0x61000003

Same procedure that will write application (properly configured) in flash after the first 64K and then jump to it works fine.

Does anyone know:

1.    That F429 has CCM RAM that allows instructions be executed from there?

2.    Are there any specific configurations that need to be set in order to allow execution from CCM?

3.    Anything else I missed to notice.

Thanks,

Srdjan

4 REPLIES 4
Posted on February 07, 2018 at 14:00

There's no way to execute code from CCM on 'F429.

JW

AvaTar
Lead
Posted on February 07, 2018 at 14:00

Check RM0090, page 62.  (

http://www.st.com/resource/en/reference_manual/dm00031020.pdf

)

If the SRAM section has no connection to the I-Bus,you can't execute code from there.

That F429 has CCM RAM that allows instructions be executed from there?

No.

I-Bus attached RAM yes, but not CCM. That's actually the meaning of the euphemism CCM ...

Posted on February 07, 2018 at 14:33

CCM on the F4 is not set up for code execution, there might be a trick with the MMU, but I'd recommend using high SRAM address.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 07, 2018 at 14:11

Thanks, that was quick and clear.