MKL17 LPUART INTERRUPT ENABLE

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

MKL17 LPUART INTERRUPT ENABLE

ソリューションへジャンプ
1,439件の閲覧回数
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 解決策
1,061件の閲覧回数
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 返信
1,062件の閲覧回数
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 件の賞賛
返信