FLASH example For MPC5606B 

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FLASH example For MPC5606B 

Jump to solution
2,148 Views
曾经怀念
Contributor II

hello All

      I'm going to use FLASH module, but I don't know how to configure it. Who can provide me an example?

MPC5606B  144p, codewarrior10.6

 

thanks

Labels (1)
0 Kudos
Reply
1 Solution
1,849 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

 

if you want to erase/program the flash, you can use this SSD flash driver:

http://www.nxp.com/files/soft_dev_tools/software/device_drivers/MPC56XX_C90LC_JDP_SSD_100_DEVD.exe

 

If you want to see C code example:

https://community.nxp.com/message/592976?commentID=592976#comment-592976

 

Regarding configuration of flash – it is necessary to initialize PFCR0 and PFCR1 as needed. If you use CodeWarrior 10.6, the configuration is done by FlashConfig() function in __ppc_eabi_init.c file. Required number of wait states (depending on system frequency) can be found in datasheet.

 

Regards,

Lukas

View solution in original post

0 Kudos
Reply
8 Replies
1,850 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

 

if you want to erase/program the flash, you can use this SSD flash driver:

http://www.nxp.com/files/soft_dev_tools/software/device_drivers/MPC56XX_C90LC_JDP_SSD_100_DEVD.exe

 

If you want to see C code example:

https://community.nxp.com/message/592976?commentID=592976#comment-592976

 

Regarding configuration of flash – it is necessary to initialize PFCR0 and PFCR1 as needed. If you use CodeWarrior 10.6, the configuration is done by FlashConfig() function in __ppc_eabi_init.c file. Required number of wait states (depending on system frequency) can be found in datasheet.

 

Regards,

Lukas

0 Kudos
Reply
1,849 Views
曾经怀念
Contributor II

Hi Lukas,

The information you provide is useful to me。

but the code can only run in debug mode,when I turn the power off and then on again,the program can not work

HLK3.PNG

build.PNG

Regards

0 Kudos
Reply
1,849 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Have you disabled the watchdog? It is automatically turned off by debugger...

void DisableWatchdog(void)
{    
   
   SWT.SR.R = 0x0000c520;     /* Write keys to clear soft lock bit */
   SWT.SR.R = 0x0000d928;
   SWT.CR.R = 0x8000010A;     /* Clear watchdog enable (WEN) */     
}

Regards,

Lukas

1,849 Views
曾经怀念
Contributor II

Hi Lukas,

Thanks a lot for your reply.

there's another problem forgot to ask you, why only HLK4~HLK7 show ????????   

hlk3_start.PNGhlk7_end.PNG

Regards

 

0 Kudos
Reply
1,849 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there's no memory at 0x10_0000 - 0x1F_FFFF:

pastedImage_1.png

pastedImage_2.png

Regards,

Lukas

0 Kudos
Reply
1,849 Views
曾经怀念
Contributor II

Hi Lukas,

      i'm very grateful to you for your help. 

      it's my fault . I found that my microcontroller reference manual is MPC5607B.

     Could you shw me the C code example of  emios->Input pulse width measurement mode

thanks

0 Kudos
Reply
1,849 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I found this one in my repository...

Lukas

0 Kudos
Reply
1,849 Views
曾经怀念
Contributor II

Hi Lukas,

 

      where? I can't find it!
      I want to measure duty ratio ,but there is nothing return .How do i configure it ?
thanks
0 Kudos
Reply