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!
Solved! Go to Solution.
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
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!
+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?
Hello ,
LPC81x also have this register:
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
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!
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