Problem with K60 MCU UART interrupt mode Typical Usage code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with K60 MCU UART interrupt mode Typical Usage code

Jump to solution
1,189 Views
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.

Labels (1)
Tags (2)
0 Kudos
1 Solution
760 Views
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

View solution in original post

0 Kudos
4 Replies
760 Views
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.

761 Views
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 Kudos
760 Views
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

760 Views
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 Kudos