AM62A7: R5F Execution Time Increase After DDR Linker Changes

Part Number: AM62A7
Other Parts Discussed in Thread: SK-AM62A-LP

Hello all,

Hope you are doing well.

I am currently working on the SK-AM62A-LP Evaluation Board, specifically on the MCU_R5F core.


The OS running on the R5F core is FreeRTOS, with few periodic tasks implemented. To monitor and analyze events occurring inside FreeRTOS, SEGGER SystemView has been integrated into the FreeRTOS application.

Currently, SystemView is being used in one-shot recording mode, with a buffer of approximately 10 MB allocated in DDR (section name in the linker is sysview_buf) . The setup was initially working as expected, with the task execution times observed in the recorded event data matching the expected values and closely correlating with measurements obtained using the FreeRTOS APIs.

Memory regions mentioned in the linker script:
image.png

Order of sections in the linker and the order created in the map file has been attached below. ( This is for the configuration in which the code is executing as per the expectations )
image.png  image.png

Later, I accidentally changed the position of the sysview_buf section in the linker script and rebuilt and flashed the package. After this change, the execution time of one of the tasks increased significantly, from around 5-6 ms to 27-30 ms. Since this was a high-priority task, the increase in execution time meant that it was occupying the CPU for much longer than expected. As a result, the other tasks were not getting enough CPU time to run. So I couldn't measure the execution time of those tasks.

Changed order of sections in the linker and the order created in the map file has been attached below. ( This is for the configuration in which the code is exceeding the expected runtime. )

image.png
sysview_buf section was placed above the DDR group.
image.png

What could be the reason for the increase in execution time due to the change in the ordering of sections? Please let me know if I am missing any important concepts or if there are any mistakes in my understanding.

Thank you for your time.

  • Do you know how the MPU region attributes are configured in the R5F in FreeRTOS?  Maybe you moved that section into an uncached area and that is the reason for the slowdown.  Or possibly that region has different cache attributes. 

    Regards,

    James