Problems programming PFASH using PE IntFLASH component (9S12XEQ512).

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

Problems programming PFASH using PE IntFLASH component (9S12XEQ512).

跳至解决方案
2,037 次查看
kbatke
Contributor II

I have a global address segment assigned to P-FLASH block 2 (block 1S).

My code is running in P-FLASH block 0.

 

When I use the Processor Expert routine SetBlockFlash() to write an 8-byte block of data, the routine completes with no errors but the P-FLASH does not update?


I'm using a 4.9152MHz clock and I've set FCLKDIV to 4. (Using the PLL I have a bus clock of 9.8304 MHz)

 

I've stepped through the code and I can't see what is wrong...

 

I've attached the Processor Expert setup.

 

Thanks for any help!!

 

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,729 次查看
kbatke
Contributor II

This link solved my problem.

It turns out the P-FLASH was being written... I just couldn't see it.

 

 

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

 

Thanks to the Forums!

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,729 次查看
ProcessorExpert
Senior Contributor III

Hello,

 

it seems, according to your screen-shot. The problem is in the Write mode selected in Write Method property. In this case the data will be written only if appropriate byte was in erased state before write (0xFF).

 

To avoid the problem:

- select another Wirte method (Destructive write, Safe Write) - for more details please see the hint of the Write Method property.

- erase the sector before write

 

In case the problem persist, please post here the whole project in order to analyze it

 

best regards
Vojtech Filip
Processor Expert Support Team

 

0 项奖励
回复
1,729 次查看
kbatke
Contributor II

The Write method was purposely chosen.

I do not want to erase as I am only writing once, starting at the beginning and stopping if/when I get to the end.

I do not want to spend the time erasing, nor the resources required to do a safe write.

 

The bits are erased, I have them displayed in a global memory window.

 

Does the "Flash Clock" parameter concern you?

The hint says it should be between 150 kHz & 200 kHz... the documentation in the reference manual says it should be 1 MHz.

 

I don't want to upload the project to a public board. I'm busy today as the  next rev of hardware came in... If I can't figure it out, I'll open a service request.

 

Thanks.

0 项奖励
回复
1,730 次查看
kbatke
Contributor II

This link solved my problem.

It turns out the P-FLASH was being written... I just couldn't see it.

 

 

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

 

Thanks to the Forums!

0 项奖励
回复