LPC54628J5 – 8 flash access cycles at 220 MHz causes occasional garbage read

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC54628J5 – 8 flash access cycles at 220 MHz causes occasional garbage read

129 Views
Contributor II

The user manual states (UM10912 rev 2.4, page 126):

 

8 system clocks flash access time (for system clock rates up to 168 MHz and for system clock rates 180 MHz < CCLK <= 220 MHz).

9 system clocks flash access time (for system clock rates up to 180 MHz).

At 220 MHz the system clock/access time can be lower when compared to 180 MHz because the power library optimizes the on-chip voltage regulator.

 

Running with 9 cycles at 220 MHz works without issues, but when decreasing to 8 cycles I have problems with occasional garbage data when reading from flash resulting in hard-to-debug crashes. I've tried both using a 25 MHz external oscillator and the FRO 12 Mhz and the issue remains. I'm using the MCUxpresso config tool to generate the clock setup code.

0 Kudos
5 Replies

116 Views
NXP TechSupport
NXP TechSupport

Hello @bergem,

That is strange since in the BOARD_BootClockPLL220M this is set automatically depending on the frequency used, I did some test with this and could reproduce this behavior. Can you let me know which SDK versión are you using and how are you modifying this register?

Best Regards,

Alexis Andalon

0 Kudos

99 Views
Contributor II

I was using 2.7.0 before and it was working. When I upgraded to 2.8.0 I started getting weird crashes. After some debugging, I noticed that CLOCK_SetFLASHAccessCyclesForFreq() had been updated.

In 2.7.0 it calls CLOCK_SetFLASHAccessCycles(kCLOCK_Flash9Cycle) at 220 MHz, while in 2.8.0 it calls CLOCK_SetFLASHAccessCycles(kCLOCK_Flash8Cycle).

By modifying BOARD_BootClockPLL220M() to call CLOCK_SetFLASHAccessCycles() instead of CLOCK_SetFLASHAccessCyclesForFreq() I force it to use kCLOCK_Flash9Cycle which solves the problem on 2.8.0.

0 Kudos

79 Views
NXP TechSupport
NXP TechSupport

Hello @bergem,

The latest SDK is the 2.8.2, this has the same API as 2.8.0 but could have changes in the powerlib. Could you try using the latest SDK?

Best Regards,

Alexis Andalon

0 Kudos

67 Views
Contributor II

I've tried 2.8.2 and the problem is still there.

0 Kudos

32 Views
NXP TechSupport
NXP TechSupport

Hello @bergem,

I've done some tests and I'm unable to reproduce this issue. Would be possible to share a code where I can reproduce this in the Evaluation Board?

Best Regards,

Alexis Andalon

0 Kudos