Hardware initialization of MPC5675K

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
SimonT
Newbie
Posts: 8
Joined: Thu Aug 28, 2014 1:14 pm

Hardware initialization of MPC5675K

Post by SimonT » Thu Aug 28, 2014 1:30 pm

Hardware initialization of a MPC5675
Hello,

I am currently working on a port of erika to the MPC5675K. My code is working as long as I compile it for being executed from ram. I can compile the code for being executed from flash, too. The problem is that the code isn´t working after I flashed it into the mcu. Now my question is whether I have to write the routines for initializing of the PLL, MMU and SRAM or if the init-files of the codewarrior compiler are used. It would be nice I you could give me a tip.

Regards
Simon

fesposito
Newbie
Posts: 21
Joined: Mon Nov 07, 2011 4:14 pm

Re: Hardware initialization of MPC5675K

Post by fesposito » Fri Aug 29, 2014 9:30 am

Hi Simon,

It sounds to be a MMU configuration issue. In general when you run your application from SRAM your debugger (e.g. Lauterbach in our cases) inits SRAM and MMU for you.

If you run your code from Flash you have to provide this additional functionalities (e.g. additional code). Please consider our port to Leopard as example (MPC5643L), check ee_boot.S file of this architecture for details.

Let me know and enjoy Erika.

Ciao
Francesco

SimonT
Newbie
Posts: 8
Joined: Thu Aug 28, 2014 1:14 pm

Re: Hardware initialization of MPC5675K

Post by SimonT » Sun Sep 21, 2014 3:07 pm

Hello,

you were right. When the cpu is powered on, there is no entry in the mmu. Due to the fact that the sran is no initialized, the mmu-initialization function (written in C) of erika is not working. I solved the problem by writing a short initialization which makes only one entry for the whole memory area in the mmu. After that the sram is initalized and then the mmu-initialization function of erika is run.

Thanky for your help!

Regards
Simon

Post Reply