Flash writing issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,724件の閲覧回数
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 解決策
1,686件の閲覧回数
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 返答(返信)
1,707件の閲覧回数
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 件の賞賛
返信
1,699件の閲覧回数
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 件の賞賛
返信
1,687件の閲覧回数
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 件の賞賛
返信
1,678件の閲覧回数
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 件の賞賛
返信
1,677件の閲覧回数
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 件の賞賛
返信
1,666件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

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