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

299件の閲覧回数
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 返答(返信)

272件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @sushmasan 

May I ask which chip you are using?

BR

Harry

0 件の賞賛
返信

261件の閲覧回数
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 件の賞賛
返信