FreeRTOS vTaskDelay not working as expected

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FreeRTOS vTaskDelay not working as expected

2,325件の閲覧回数
MateoSegura413
Contributor III

Hello, I have a simple RTOS application that is only running 1 thread (task). I am using the vTaskDelay function to delay my code for 100ms as following:

vTaskDelay(100/portTICK_PERIOD_MS) 

However, my code does NOT get delayed for 100ms, but rather somehwere around 4 times that, so appx. 400ms (measured it with scope).  This code is being ran on the FreeRTOS example provided, and NONE of the settings have been changed.  We also tried this in 2 different machines and boards, and same result. It also happens with with pdMS_TO_TICKS macro and same results. Any idea as to what the issue might be?  

Thanks in advance

0 件の賞賛
返信
4 返答(返信)

2,314件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @MateoSegura413,

Please specify the MCU, S32DS IDE version and the RTD or SDK version.

 

Thank you,

BR, Daniel

0 件の賞賛
返信

2,305件の閲覧回数
MateoSegura413
Contributor III

Hi and thanks for your response, here's the info you need:

- MCU: S32K344

- S32DS Version 3.4

- S32K3xx development package version 3.4.3

- RTD AUTOSAR 4.4 Version 1.0.0

- FreeRTOS for S32K3 1.0.0

I'm using theFreeRTOS_Toggle_Led_Example_S32K344, no changes were made.

I also tried to create a blank application project and add RTOS and same results.

Thanks for your help!

 

0 件の賞賛
返信

2,285件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @MateoSegura413,

I just tested it on S32K3X4EVB-Q257 (Sch-47827 REV A) with 16Mhz crystal, and it works as expected.

What boards do you use? EVBs or you custom boards?

What is frequency of the crystal there?

 

Thank you,

BR, Daniel

 

0 件の賞賛
返信

2,270件の閲覧回数
MateoSegura413
Contributor III

@danielmartynek 

I reinstalled S32DS and it works correctly now. 

Thank you for your answer.

0 件の賞賛
返信