MKL17 LPUART INTERRUPT ENABLE

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

MKL17 LPUART INTERRUPT ENABLE

跳至解决方案
1,360 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
982 次查看
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 项奖励
回复
1 回复
983 次查看
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 项奖励
回复