i.MX7D M4 running 10x slower than expected

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX7D M4 running 10x slower than expected

465 Views
MvZ
Contributor I

Hi all,

I'm developing part of a system on the M4 core of the i.MX7D package as part of the Toradex Colibri board, using Keil µVision (bare metal).

As a starter I figured I'd blink the one available user LED on the carrier board, which I initially thought I wasn't succeeding at as the LED stayed dark. However, after 10 minutes of reading documentation, I found the LED had at some point come on after some adjustments and looking at the disassembly, worked out that the M4 core appears to be running at 24MHz, rather than the expected 240MHz.

How is this possible, when as best as I can tell, the initialisation is the same as any of a number of provided example projects, and the default core clock should be 240MHz?
Furthermore, the CCM_TARGET_ROOT1 register also contains the appropriate expected values: ENABLE = 1, MUX = 1 (SYS_PLL_DIV2), no post-div. According to u-boot, SYS_PLL = 480MHz, so that should be correct. The clock gates for this are also set (as per BOARD_ClockInit()).
The device itself appears to be convinced that its system clock is running at 240MHz, but everything points to the instruction speed being just barey 12MIPS: 23 assembly instructions (-O0) in a loop of 1,000,000 cycles gives a blink frequency of 0.6Hz.

Have I missed some crucial step that's not included in most provided examples, or is this somehow expected behaviour? I've worked on Cortex-M4's before and this is not the performance I expected...

Labels (1)
Tags (2)
0 Kudos
1 Reply

457 Views
b36401
NXP Employee
NXP Employee

Please note that the performance may be limited by the periphery or memory the program is running from not the core.

0 Kudos