Hi,
I'm testing the S32K144 chip in S32DS v2.0. There is one example, named lpuart_echo_s32k144. It takes the RX data using polling method.
I want to change this to interrupt method.
lpuart_echo_s32k144 example uses the SDK. I could add the api easily as below.
INT_SYS_InstallHandler(LPUART1_RxTx_IRQn, LPUART1_RxTx_IRQHandler, (isr_t *)0);
INT_SYS_EnableIRQ(LPUART1_RxTx_IRQn);
And I added ISR like below.
void LPUART1_RxTx_IRQHandler(void){
...
}
I think this ISR calls both RX and TX cases. When I checked CTRL register, TIE and RIE are enabled.
Then, how can I seperate RX and TX? Is there any state register?
Please give me a sample.
Thanks,
BR, Seunghyun Um
Hi,
Yes, there is one interrupt for both.
Unfortunately, I don't have such a sample code.
But it is explained in Chapter 48.4.6 of the RM.
Regards,
Daniel
Thanks Daniel. Chapter 48.4.6 of the RM is very helpful for me.
And I found one sample (S32K144 LPUART1_RxTx_IRQHandler )
Thank you,
BR, SHUm