Changing Run / Power modes when using FreeRTOS

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

Changing Run / Power modes when using FreeRTOS

跳至解决方案
1,457 次查看
roger5
Contributor III

I'm experiencing some strange problems while changing Run / Power modes whilst using FreeRTOS

The firmware needs to operate at 2 different speeds.

When receiving and decoding data, it functions fine with clock speeds as low as 40Mhz, but when encoding and transmitting data, the audio encoder takes a long time to process the signal and I need to increase the clock speed / Run mode to around 96Mhz.

 

However, I have a strange problem where when I change clock speeds / run modes, from 40Mhz to 96Mhz the RTOS seems to hang for enough time to cause the input buffer to overflow.

Strangely if I lower the clock speed when in receive mode, to 32Mhz, I can switch to 96Mhz without any delay in the RTOS.

When changing Run mode and clock speeds, I've tried updating the RTOS timer interrupt to use the new clock speed by calling  vPortSetupTimerInterrupt() 

But this doesn't seem to make any difference.

 

Is there something else i should be doing when changing clock speeds to ensure that the RTOS does not hang for a while?

0 项奖励
回复
1 解答
1,428 次查看
roger5
Contributor III

Sorry Daniel

 

I thought I'd replied to all the issues I'd opened, saying they had now been resolved.

The problem was a coding bug, associated with a variable referenced by the Notification struct, which was declared as a local variable in a function, but the Notification struct was in global memory, and the local variable had gone out of scope and been overwritten.

The code has now been fixed

 

BTW.

I'm not using a development board, I'm using some hardware from a company in China which uses the MK22 as the main processor

 

Please can you close this thread as resolved.

在原帖中查看解决方案

2 回复数
1,429 次查看
roger5
Contributor III

Sorry Daniel

 

I thought I'd replied to all the issues I'd opened, saying they had now been resolved.

The problem was a coding bug, associated with a variable referenced by the Notification struct, which was declared as a local variable in a function, but the Notification struct was in global memory, and the local variable had gone out of scope and been overwritten.

The code has now been fixed

 

BTW.

I'm not using a development board, I'm using some hardware from a company in China which uses the MK22 as the main processor

 

Please can you close this thread as resolved.

1,434 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Roger:

Could you please let me know the hardware you are using and how to reproduce your issue on the EVK board?

 

Regards

Daniel

0 项奖励
回复