Keil's system_LPC43xx.c doesn't set the internal flash timing register

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by starblue on Thu Apr 11 04:15:06 MST 2013

Just a note to those using the Keil toolchain like me:


The default value of FLASHTIM in the FLASHCFGx registers is 4 after reset (appropriate up to 107 MHz according to the user manual).

The system_LPC43xx.c file from Keil changes the clock frequency but doesn't set FLASHTIM accordingly

(at room temperature it runs fine at that setting, so nobody seems to notice).

With the correct setting the execution time increases by about 40% in my application.


BTW, the CREG structure in the LPC43xx.h header in the latest CMSIS (2012-12-12) doesn't contain FLASHCFGA/B,

it would be .nice if it could be updated.