mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 07:40:27 +00:00
arch/arm/src/imxrt: Start the DWT cycle counter for perf events.
CONFIG_ARCH_PERF_EVENTS is on by default for ARMv7-M, but imxrt never called up_perf_init(), so perf_gettime() read zero and anything timed with it, rpmsg_ping for one, reported 0 ns. Initialise the counter with BOARD_CPU_FREQUENCY after the MPU is set up, as samv7 and stm32h7 do. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: Lourens Naude <lourens@bearmetal.eu>
This commit is contained in:
parent
879a19e153
commit
447ebd7fd5
1 changed files with 4 additions and 0 deletions
|
|
@ -282,6 +282,10 @@ void __start(void)
|
|||
imxrt_mpu_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_PERF_EVENTS
|
||||
up_perf_init((void *)BOARD_CPU_FREQUENCY);
|
||||
#endif
|
||||
|
||||
/* Enable I- and D-Caches */
|
||||
|
||||
up_enable_icache();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue