LPuart interrupt driver example doesnt work when implemented as a task in freertos.

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

LPuart interrupt driver example doesnt work when implemented as a task in freertos.

1,963 次查看
fayizonline
Contributor II

Hi,

I ported the lpuart interrupt code under driver examples of sdk 2.3.1 for imxrt and ran in imxrt evaluation board with A0 revision.

When i try to run that it takes user input and echoes back properly provided it is entered one by one.

When i copy paste a lot of characters in to the terminal it stops and doesn't take any input from that moment.

Seems like the interrupt doesn't trigger from that moment.

My buffer is more than the required size.This code works fine when run as bare metal code. What am i doing wrong here.

I tried running the code

I tried using freertos api for task yield and  also without it taking care the interrupt priority for freertos. But that didnt help.

Did anyone else face this issue?

Uart interrupt Interrupt priority is set as 5

The below is my FreeRTOSconfig.h macros

#define configPRIO_BITS 4 /* 15 priority levels */

#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY ((1U << (configPRIO_BITS)) - 1)
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 2
#define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))

#define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))

Thanks

Fayiz

标记 (2)
0 项奖励
回复
2 回复数

1,689 次查看
roelsemarc
Contributor I

where can i find the interupt example because i am looking for it now but can't find it anywhere

0 项奖励
回复

1,689 次查看
fayizonline
Contributor II

I got it working finally. My code was an XIP code called from bootloader application. which had XIP_EXTERNAL_FLASH symbol defined.

I didn't add XIP_EXTERNAL_FLASH in my application code . Adding that made the code to work.

0 项奖励
回复