LPC8xx Flash access time, aka setting FLASHTIM

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

LPC8xx Flash access time, aka setting FLASHTIM

跳至解决方案
2,871 次查看
sh9
Contributor III

Hi all,

I seem to be unable to find specifications that permit me working out how to correctly set the FLASHTIM field in register FLASHCFG on the LPC845. One would assume that it depends on the CPU clock frequency what the permissible settings are, but I can't find it documented anywhere.

I also looked in documents of the other members of the LPC8xx family, but no success. However, the LPC845 user manual lists a legal setting of 0x2, which is reserved on other variants, for example the LPC81x, even though the CPU frequency ratings are the same. Why the difference?

Thanks for any help!

0 项奖励
回复
1 解答
2,841 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Yes, I know your meaning know.

1. The data from LPC11U6x cannot be used as reference for LPC845, because the flash IP is different between the 2 parts.

2. There is no detail doc describe this, while I get some information from internal:

When FLASHTIM = 0   with FRO = 30 MHz, the core speed is almost same with flash access time (33ns), so, for some temperature condition, cannot guarantee for flash operation. While when  FLASHTIM = 1   with FRO = 30 MHz, the core speed is double than flash access time(66ns), MCU can run with no problem for all temperature scope.

 

Hope it helps,

Alice

 

 

在原帖中查看解决方案

0 项奖励
回复
5 回复数
2,836 次查看
sh9
Contributor III

Hi Alice, yes it helps, thanks!

I would like to recommend you add this information to a future revision of UM11029, for the benefit of all users.

I'm closing the issue, thanks for your efforts!

0 项奖励
回复
2,698 次查看
loudpotato
Contributor I

+1, an update in UM11029 would be a great thing.

Alice, according to the answer you provided, FLASHTIM=0 is good almost up to 30MHz except some temperatures, so FLASHTIM=1 should be safe up to 30MHz. Do I read this correctly? Do you know the max frequency which FLASHTIM=0 is safe to use?

0 项奖励
回复
2,860 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

 

LPC81x also have this register:

Alice_Yang_0-1605859672592.png

The reset value is 0x2 in LPC845, you can also configure as your requirement, if you haven't specific needs, just use the reset value.

In SDK lib, can find it defined in LPC845.h file.

 

 

 

Regards,

Alice

 

 

0 项奖励
回复
2,854 次查看
sh9
Contributor III

Hi Alice, thanks for your reply!

I am currently using the reset value. However, this is the highest number of clocks for Flash access, so its performance would be lowest.

My "special need", which I think is not very special, is that the code runs as fast as possible. In my case the power consumption isn't important.

So I was thinking that by changing the setting in FLASHTIM, i.e. by using the value 1 or 0 instead of 2, I could get some speed increase. However, I don't know if it is safe to do so, and there's no information I can find that allows me to determine, which values are safe to use. The LPC845.h file does not provide any information about that, either. It is providing the same information as in the user manual.

Common sense would indicate that the safe values to use are dependent on the CPU clock, i.e. the higher the CPU clock frequency is, the more clock cycles I need to configure for Flash access. But there is no data available for me to decide.

The user manual of a completely different chip, UM10732 Rev. 1.4, provides an example of what I need, in Table 354. The chip has the same FLASHCFG register as the LPC845, but its description is more comprehensive, as it includes the clock frequency data I need. I don't understand why this was omitted in the user manual for the LPC845.

Sorry for such a lot of text, I wanted to make sure you understand my problem.

Thanks!

0 项奖励
回复
2,842 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Yes, I know your meaning know.

1. The data from LPC11U6x cannot be used as reference for LPC845, because the flash IP is different between the 2 parts.

2. There is no detail doc describe this, while I get some information from internal:

When FLASHTIM = 0   with FRO = 30 MHz, the core speed is almost same with flash access time (33ns), so, for some temperature condition, cannot guarantee for flash operation. While when  FLASHTIM = 1   with FRO = 30 MHz, the core speed is double than flash access time(66ns), MCU can run with no problem for all temperature scope.

 

Hope it helps,

Alice

 

 

0 项奖励
回复