programming flash in mpc5604b

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

programming flash in mpc5604b

跳至解决方案
1,342 次查看
jeyshree
Contributor I

Hai,

One of my friends in participating in free scale smart car race.So we are in need of storing some data in flash.For that we have to program the MCR register of flash module.For programming the PGPDO register we have a format like

SIU.PGPDO[1].R

Do we have any such format for MCR register of flash as there are several MCR registers in different modules.If so please do mention it.thanks for your reply in advance.

标记 (4)
0 项奖励
1 解答
761 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

using of Qorivva header files is described in this document:

http://www.freescale.com/files/32bit/doc/eng_bulletin/EB758.pdf

It will look like this

CFLASH.MCR.R = 0x...;

or for data flash:

DFLASH.MCR.R = 0x...;

SSD flash drivers for MPC5604B can be downloaded here:

http://www.freescale.com/files/soft_dev_tools/software/device_drivers/MPC56XX_C90LC_JDP_SSD_100_DEVD...

Lukas

在原帖中查看解决方案

0 项奖励
6 回复数
762 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

using of Qorivva header files is described in this document:

http://www.freescale.com/files/32bit/doc/eng_bulletin/EB758.pdf

It will look like this

CFLASH.MCR.R = 0x...;

or for data flash:

DFLASH.MCR.R = 0x...;

SSD flash drivers for MPC5604B can be downloaded here:

http://www.freescale.com/files/soft_dev_tools/software/device_drivers/MPC56XX_C90LC_JDP_SSD_100_DEVD...

Lukas

0 项奖励
761 次查看
jeyshree
Contributor I

Sir,
Thanks for your reply.It helped me a lot.I have an another question.Now i want to load few datas in flash.I saw a snippet in the datasheet of MPC5604B at page number 456.
I configured the MCR register in the way you said.But there is bug in these lines.
(0x00AAA8) = 0x55AA55AA; /* Latch Address and 32 LSB data */
(0x00AAAC) = 0xAA55AA55; /* Latch 32 MSB data */
Is there any other way to specify the data and the address where the data has to be loaded?Sorry to disturb.Thanks for your reply in advance.

0 项奖励
761 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

take a look at code I posted in this thread:

https://community.freescale.com/message/328958#328958

Lukas

761 次查看
jeyshree
Contributor I

Thank you so much sir.Program ran successfully.Yet we have another doubt.It enables to save data till 0X12E90 th address.After that address,we are unable to save data.It does not show any bugs.But the intended data is not getting saved.We have enabled bank3 with address ranging from 0x010000–0x017FFF.so we must be able to save data till 0X017FFF.what shall we do now?

Sorry for disturbing you continuously.Thank you for all your replies.Have a great day.

0 项奖励
761 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Not sure what's wrong, I would need more details.

Have you disabled interrupts before programming?

Could you share some code to reproduce the problem?

Lukas

0 项奖励
761 次查看
jeyshree
Contributor I

sorry sir.that was our mistake.the program works fine.thank u.

0 项奖励