MKL17 LPUART INTERRUPT ENABLE

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

MKL17 LPUART INTERRUPT ENABLE

Jump to solution
819 Views
murraykevin
Contributor II

I am trying to enable the interrupt to fire on the Rx line of the LPUART0.  I have enabled the LPUART0 Module as well as the clock source in SIM I have configured my pin and am able to use a polling communication successfully.  I have enabled the RIE bit in the CTRL register and have created the function

void LPUART0_IRQHandler()

{

     //IRQ code

}

What else and i missing to get this interrupt to fire.

Thank you for you help

Labels (1)
Tags (1)
0 Kudos
1 Solution
441 Views
davidsherman
Senior Contributor I

You will also need to enable it in the NVIC_ISER.  The bits in that register correspond to the IRQ number of LPUART0, which would be 12 for the MKL17.  The priority is set in NVIC_IPR3, bits 6 and 7 (00 = highest, 11 = lowest).  The ARM M0+ manuals give much more info about the NVIC than the Freescale documentation.  Those can be found on arm.com.

View solution in original post

0 Kudos
1 Reply
442 Views
davidsherman
Senior Contributor I

You will also need to enable it in the NVIC_ISER.  The bits in that register correspond to the IRQ number of LPUART0, which would be 12 for the MKL17.  The priority is set in NVIC_IPR3, bits 6 and 7 (00 = highest, 11 = lowest).  The ARM M0+ manuals give much more info about the NVIC than the Freescale documentation.  Those can be found on arm.com.

0 Kudos