As far as I could understand, both S32SDK_S32K1xx_RTM_3.0.0 and S32SDK_S32K14x_RTM_2.0.0 won't support the idle line interrupt - LPUART_INT_IDLE_LINE.
Is that correct?
I need to deal with Rx frames with lengths I don't know in advance. So far, I'm doing that by passing a large Rx buffer and by pooling it's content until I find a complete, consistent frame. It works, but a pure interrupt solution would be cleaner and faster.
What would it take to add LPUART_INT_IDLE_LINE support? Any plans to add it?
Best regards,
Joao
解決済! 解決策の投稿を見る。
Hi Joao Roscoe
No, unfortunately, this option is not available in SDK software yet, sorry for the inconveniences that this may cause you. Still, you could add the support of this interrupt in the LPUART_DRV_IRQHandler of the lpiart?driver.c file, here you can create your handler for the specific LPUART_INT_IDLE_LINE interruption.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note: If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------
Hi Joao Roscoe
No, unfortunately, this option is not available in SDK software yet, sorry for the inconveniences that this may cause you. Still, you could add the support of this interrupt in the LPUART_DRV_IRQHandler of the lpiart?driver.c file, here you can create your handler for the specific LPUART_INT_IDLE_LINE interruption.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note: If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------
Hi TIC,
I try to add the LPUART idle line interrupt - LPUART_INT_IDLE_LINE based on S32SDK_S32K1xx_RTM_3.0.0.
LPUART_SetParityMode(base, lpuartUserConfig->parityMode);
LPUART_SetStopBitCount(base, lpuartUserConfig->stopBitCount);
/* Config: 8 idle character(s) must be received before the IDLE flag is set.*/
base->CTRL = (base->CTRL & ~LPUART_CTRL_IDLECFG_MASK) | (3 << LPUART_CTRL_IDLECFG_SHIFT);
/* Idle character bit count starts after stop bit. */
base->CTRL = (base->CTRL & ~LPUART_CTRL_ILT_MASK) | (1 << LPUART_CTRL_ILT_SHIFT);
/* Enable LPUART Rx IDLE interrupt */
LPUART_SetIntMode(base, LPUART_INT_IDLE_LINE, true);
/* Handle idle line interrupt */
if (LPUART_GetIntMode(base, LPUART_INT_IDLE_LINE))
{
if (LPUART_GetStatusFlag(base, LPUART_IDLE_LINE_DETECT))
{
LPUART_IdleLineIrqHandler(instance);
}
}
After that, it still can not trigger the LPUART_INT_IDLE_LINE interruption when I send a string to the LPUART.
Is it configured correctly? Is there anything that I haven't done?
Have a great day,
Cyril