S32K1xx Platform & IP driver.

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

S32K1xx Platform & IP driver.

1,982 次查看
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 项奖励
回复
1 回复

1,954 次查看
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 项奖励
回复