S32K1xx Platform & IP driver.

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

S32K1xx Platform & IP driver.

1,940 Views
SivaB
Contributor III

Hi,

Can use both Platform & IP driver to enable interrupts and install handler in same projects?

MCAL:

Platform_InstallIrqHandler(LPUART2_RxTx_IRQn, LPUART2_LIN_IP_RxTx_IRQHandler, NULL_PTR);

Driver:

Platform_InstallIrqHandler(LPUART1_RxTx_IRQn, LPUART1_LIN_IP_RxTx_IRQHandler, NULL_PTR);

Lpit_Gpt_Ip_Init(LPIT_INST_0, &LPIT_0_InitConfig_PB);
/* Initial channel 0 */
Lpit_Gpt_Ip_InitChannel(LPIT_INST_0, LPIT_0_CH_0);
/* Enable channel interrupt LPIT_0 - CH_0 */
Lpit_Gpt_Ip_EnableChInterrupt(LPIT_INST_0, CH_0);
/* Start channel CH_0 */
Lpit_Gpt_Ip_StartTimer(LPIT_INST_0, CH_0, LPIT_PERIOD);

0 Kudos
Reply
1 Reply

1,912 Views
DanNguyenDuy
NXP Employee
NXP Employee

Hello @SivaB,

You can use both Platform & IP drivers to enable interrupts and install handlers in the same projects.

If you only want to use IP, you can install interrupt at the driver layer as below.

Driver:

IntCtrl_Ip_EnableIrq(LPUART1_RxTx_IRQn);
IntCtrl_Ip_InstallHandler(LPUART1_RxTx_IRQn, LPUART1_LIN_IP_RxTx_IRQHandler, NULL_PTR);

Best regards,

Dan

0 Kudos
Reply