Trigger pulse delay longer than expected — is SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY causing inaccur

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Trigger pulse delay longer than expected — is SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY causing inaccur

373 次查看
Manjunathb
Contributor II

 

Hello NXP Team,

I’m working with an NXP MCU based on the Cortex-M33 core (e.g., i.MX93 mcimx9352), and I noticed that when I use:

SDK_DelayAtLeastUs(10, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);

 

to generate a 10 µs trigger pulse, the actual pulse width measured on the oscilloscope is around 16 µs.

I’m using the default SDK definition:

#define SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY (250000000UL)

which, according to the datasheet, is the maximum clock frequency supported by the M33 core.

  1. Is SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY supposed to match the actual core frequency at runtime, or is it just a max-safe default?

  2. Is there a recommended way to dynamically query the actual core clock and pass it to SDK_DelayAtLeastUs() instead of relying on the macro?

Any clarification or best practices would be appreciated. Thanks in advance!

Best regards
Manjunath B

 

i.MX93 CONTROL-AND-TIMING-RELAY 

标签 (1)
0 项奖励
回复
1 回复

301 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi,

SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY is not real frequency, it's the maximum value.

You can use CLOCK_GetFreq to get real frequency, the pass this value to SDK_DelayAtLeastUs.


Best Regards,
Zhiming

0 项奖励
回复