Flash writing issue

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

Flash writing issue

跳至解决方案
3,184 次查看
dhanaraj_d
Contributor II

Hi

I am using MPC5645S. Out of 5 boards, am facing issue in 1 board.

Whenever i tried to write flash memory from address 0x10000 some random number of bytes are written and then going to exception.

This we have sorted it out by changing from port0 to port1 since PFLASH2P has two AHB-Lite slave ports. Then it started working. But am not able to find the root cause why from port0 am not able to write into flash memory.

0 项奖励
回复
1 解答
3,146 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

OK, but this does not change access port, these configures waitstates and other attributes for given port.

Recommended values for PFCR0 = 0x3001_7B17, PFCR1 = 0x007C_7B43 for 125 MHz system clock.

Do you have it so?

在原帖中查看解决方案

0 项奖励
回复
6 回复数
3,167 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, I am not sure if I understand the question.

What actually you are changing to solve the issue? I am asking because port 0 is CPU instruction port, port 1 for all other accesses, thus write should go over port 1.

0 项奖励
回复
3,159 次查看
kumar_yogarajah
Contributor I

Hi 

FLASH_REG CFLASH0.PFCR0.R is used as FLASH_REG during flash configuration.

With the above configuration among five boards ,in one board alone an exception is thrown while writing data in flash while in other boards data is written in flash without any issue.

When FLASH_REG CFLASH0.PFCR0.R is changed as FLASH_REG CFLASH0.PFCR1.R the exception is not thrown and data is written in flash. I am not able to understand the reason for exception in one particular board alone.

标记 (1)
0 项奖励
回复
3,147 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

OK, but this does not change access port, these configures waitstates and other attributes for given port.

Recommended values for PFCR0 = 0x3001_7B17, PFCR1 = 0x007C_7B43 for 125 MHz system clock.

Do you have it so?

0 项奖励
回复
3,138 次查看
kumar_yogarajah
Contributor I

Hi, 

Thanks for the reply. After using PFCR0 = 0x3001_7B17 value exception is not thrown and data is properly written in flash

0 项奖励
回复
3,137 次查看
kumar_yogarajah
Contributor I

Hi,

    Previously PFCR0 = 0x30015217 is used. I am using 124MHz system clock. After changing PFCR0 = 0x3001_7B17 the issue is resolved. Whether I have to change any other configuration for using 124MHz system clock?

0 项奖励
回复
3,126 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

No, it should be enough. This flash configuration is valid for 125MHz and all lower frequencies.