Following the steps in this document I can load a firmware to M4 core and start its execution.
The Rpmsg library on A5 core doesn’t allow to configure M4 core clock and/or bus clock.
When I write a firmware for M4 core and I load and execute it on M4 core through a debugger (for example Keil ULINK-pro) I must set all the clocks through CCM (Clock Controller Module) registers.
How A5 core sets M4 core and bus clocks when it runs WinCE 6?
Which CCM registers can M4 core modify (and how) without falling into HardFault?
After a deeper investigation, I think that the issue I described here is produced by M4 core when it tries to set CCM registers (clock and PLLs).
Its impossible to tell or the registers we modify as we have algorithms taking care of this automatically. Best is if you tell us what registers you want to write and we can check. You could also use memmap library on WinCE to write clock registers from A5 before running M4.
This is the list of registers I set in my M4 firmware:
- CCM->CCSR to get 396MHz CA5, 396 MHz DDR, 132MHz CM4, and 66MHz bus
I suspect the problem is either in one or more of these registers, or in loading the firmware from A5 (LoadAddr 0x3f040000 - ExecuteAddr 0x1F0403A1 - CodeSize 128*1024)
I see you are changing a lot of clocks that A5 is using.
CCSR not ok You can change that M4 part from M5 but please do not change this clock ( if you need extra PLLs enable them, but do not disable the ones that are enabled. )
CACRR same as CCSR
Here are settings for PLL I use
ANADIG_PLL4_NUM = 0x04DD2F15;
ANADIG_PLL4_DENOM = 0x1FFFFFDB;
I’m going to check carefully all of these settings.
When A5 loads a firmware and starts M4 core (Rpmsg library), at which speed does it configures core clock for M4?
And bus clock?
One more thing: when you set ANADIG_PFD_528_SYS register, do you mean ANADIG_PLL2_PFD (at address 0x40050100)?
I can’t find ANADIG_PFD_528_SYS in VFxx hardware reference manual.