This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2634: EVT

Part Number: AM2634
目前发现一个问题如下:
1.代码中之前有一个地方用for循环做延时,次数为0x20000次;
2.后续开启HSM固件的CMAC计算功能后,发现此for循环延时时间长了很多;
3.排查后,发现改变syscfg中MPU ARMv7中一个区域的Region Attributes选项会导致此问题发生;
4.同样的循环次数下,当选项改为Cached+Sharable后,for循环延时时间为40ms,改为Cached后,for循环延时时间为5ms;
5.时间观测,使用的100us中断定时器中的变量;
6.后询问其他同事得知,此选项如果选为Cached,会无法访问OTP区域;
7.目前延时可以用定时器去实现,但改为Cached+Sharable后,for循环时间变长,是否是代码运行时间变慢,或者时钟频率等受到影响未知,现求助您帮助解答。
  • Hi Hang,

    Using a timer is suggested for timeout and delay. If a memory region is configured as a sharable attribute, then the memory system needs to ensure the coherency of data between the different processor. When data access is indicated as Sharable, the cache controller needs to ensure that the value is coherent with the other cache units. This is necessary because the value could have been cached and modified by another processor. The same operation to sharable memory will take longer time.

    是否是代码运行时间变慢,或者时钟频率等受到影响未知

    The system clock is not impacted by the MPU settings. The code execution performance can be affected. 

    6.后询问其他同事得知,此选项如果选为Cached,会无法访问OTP区域;

    For peripheral registers, and OTP, the strongly-ordered attribute is recommended.