Flash writing issue

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

Flash writing issue

Jump to solution
1,047 Views
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 Kudos
1 Solution
1,009 Views
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?

View solution in original post

0 Kudos
6 Replies
1,030 Views
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 Kudos
1,022 Views
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.

Tags (1)
0 Kudos
1,010 Views
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 Kudos
1,001 Views
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 Kudos
1,000 Views
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 Kudos
989 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

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