Bug in RTD S32K3xx: Stm_Ip_StartCounting is not thread safe

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

Bug in RTD S32K3xx: Stm_Ip_StartCounting is not thread safe

432 次查看
joohau
Contributor II

The STM module of the RTD 2.0.0 (S32K3_RTD_2_0_0_D2203_ASR_REL_4_4_REV_0000_20220331) for S32K3xx does not contain any requirements regarding thread safety.
However, the implemention of the Stm_Ip_StartCounting is not thread safe! Next to that, it fails for small wait times for the same reason:


When the 
currentCntValue is obtained and an interrupt occurs the counter continuous on the background. The compare value is then set to the "old" currentCntValue + the request wait time. When the counter has already advanced past this compare value we'll have to wait a complete counter wrap before the compare value is reached. This causes the function to faile for small wait times and in case of interrupts happening during the function execution.

A new implementation and/or interrupt disabling is required in my opinion.

0 项奖励
1 回复

322 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello @joohau 

Thank you for your report. I agree that the process should be improved. I created a ticket for the team to investigate: ARTD-55075.

Best Regards,

Nam

0 项奖励