Problem with K60 MCU UART interrupt mode Typical Usage code

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

Problem with K60 MCU UART interrupt mode Typical Usage code

ソリューションへジャンプ
2,425件の閲覧回数
dkarthik
Contributor II

I'm trying to learn K60 MCU UART using Typical usage of Processor expert component. I added Serial_LDD component and set to UART5 for communication to PC via debugger in TWRK60D100M kit. I used the exact code as in Typical usage. UART for polling mode works but Interrupt mode doesn't work. (I enabled interrupt in Serial Component)
.

Is there any other interrupts in the processor that should be enabled or Should I be including something in the code to enable additional interrupts. Please help.

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,996件の閲覧回数
dkarthik
Contributor II

Hi,

Problem Solved. It is because of OS. I don't know how to use interrupts when OS is included in the project. Without any OS the interrupt mode works.

Thank you,

Karthikeyan

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,996件の閲覧回数
BlackNight
NXP Employee
NXP Employee

I recommend that you use the AsynchroSerial component instead: it uses the Serial_LDD internally, but is much easier to use.

1,997件の閲覧回数
dkarthik
Contributor II

Hi,

Problem Solved. It is because of OS. I don't know how to use interrupts when OS is included in the project. Without any OS the interrupt mode works.

Thank you,

Karthikeyan

0 件の賞賛
返信
1,996件の閲覧回数
mjbcswitzerland
Specialist V

Hi


You can get UART code for all 6 UARTs in parallel in interrupt driven or DMA driven mode: http://www.utasker.com/forum/index.php?topic=1721.0

If you need to use PE you may need to enable global interrupts for it to work (?) [eg. with asm("cpsie   i")]

Regards

Mark

http://www.utasker.com/kinetis.html

1,996件の閲覧回数
dkarthik
Contributor II

Hi Mark,

Thanks for the utasker link.

The global interrupts of FreeRTOS are disabled before receiving the character and enabled after the reception so that the ISR is given control. (Similarly for sending a character). It is taken care by ENTER_CRITICAL() and EXIT_CRITICAL() tasks.

UART interrupts are enabled in the initialization code.

Thank you,

Karthik

0 件の賞賛
返信