USART interrupt handler is invoked only once if Free RTOS API used inside it

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

USART interrupt handler is invoked only once if Free RTOS API used inside it

290 次查看
sushmasan
Contributor II

Hello Team,

I am seeing an issue, where the USART interrupt handler is invoking only once when I use the free rtos API inside usart interrupt handler, even though there is a new data arrived.

This is the API called from usart interrupt handler,

BaseType_t xHigherPriorityTaskWoken = pdFALSE;
						xSemaphoreGiveFromISR(RcvSemaphore(), &xHigherPriorityTaskWoken);
						portYIELD_FROM_ISR(xHigherPriorityTaskWoken);

 

When I comment the free RTOS api everything works fine.

Did anyone see similar type of issue?

The reason why I am using freertos api inside the interrupt handler is, I have created free task and in the task handler where I am waiting for a semaphore, which is released from usart interrupt handler when all the data is received, so in the free rtos task handler the data will be processed.

 

Regards,
San

0 项奖励
回复
2 回复数

263 次查看
Harry_Zhang
NXP Employee
NXP Employee

Hi @sushmasan 

May I ask which chip you are using?

BR

Harry

0 项奖励
回复

252 次查看
sushmasan
Contributor II

Hi @Harry_Zhang ,

I am using LPC55S69.

Finally I found the root cause of the issue.
As part of the processing the received message, in one of the function I am mistakenly using a global array index, the same was used in interrupt handler, due to this there was an array out of bound issue happening.
After using a local variable for index, there is no more issue seen.

Regards,
San

0 项奖励
回复