S32K324 Lpuart_lin Master Continually Returning Status "LPUART_LIN_IP_STATUS_TX_BUSY"

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

S32K324 Lpuart_lin Master Continually Returning Status "LPUART_LIN_IP_STATUS_TX_BUSY"

Jump to solution
5,369 Views
the_chuck77
Contributor II

Hi,

I am using the S32K324 in a project, and am running into issues using the Lpuart_lin driver. Executing the function "Lpuart_Lin_Ip_SendFrame" returns "LPUART_LIN_IP_STATUS_SUCCESS", however when polling the LIN instance's status after it returns "LPUART_LIN_IP_STATUS_TX_BUSY". All subsequent calls to "Lpuart_Lin_Ip_SendFrame" return a fail.

I checked the RX and TX lines going into my LIN transcoder, as well as the LIN output and I can see a 650 microsecond low pulse followed by nothing. There is no data sent apart from this break, which is seen on all 3 lines.

Any ideas as to what could be causing the issue? I have attached the file containing the Init and Send functions I have created.

Thanks!

 

EDIT: Wanted to add, the LIN instance has a "CurrentNodeState" of "LPUART_LIN_IP_NODE_STATE_SEND_BREAK_FIELD".

0 Kudos
Reply
1 Solution
5,307 Views
the_chuck77
Contributor II
Hi Petr,

Thanks for the response, I had already added the interrupt handler to IntCtrl_Ip. The issue turned out to be, I was initializing the interrupt and configuring the interrupt routing after initializing the LIN.

Now that I am initializing the interrupt before the LIN I am successfully sending LIN frames.

Thanks!

View solution in original post

0 Kudos
Reply
3 Replies
5,324 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

it looks like driver interrupt is not called to next frame bytes are not processed. Try to check that.
You can also refer to RTD demo examples.

BR, Petr

1,719 Views
jichengyou
Contributor I

hello @PetrS 

I have encountered the same problem now, when MCU sends as host, LPUART_LIN_IP_STATUS_TX_BUSY, and
the LIN instance has a "CurrentNodeState" of "LPUART_LIN_IP_NODE_STATE_SEND_BREAK_FIELD".

But now the api for rerouting interrupts seems to have been removed, leaving only the IntCtrl_Ip_Init function.

I can't find another solution, please tell me if there is another way to check my error.

 

0 Kudos
Reply
5,308 Views
the_chuck77
Contributor II
Hi Petr,

Thanks for the response, I had already added the interrupt handler to IntCtrl_Ip. The issue turned out to be, I was initializing the interrupt and configuring the interrupt routing after initializing the LIN.

Now that I am initializing the interrupt before the LIN I am successfully sending LIN frames.

Thanks!
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1843988%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K324%20Lpuart_lin%20Master%20Continually%20Returning%20Status%20%22LPUART_LIN_IP_STATUS_TX_BUSY%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1843988%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20S32K324%20in%20a%20project%2C%20and%20am%20running%20into%20issues%20using%20the%20Lpuart_lin%20driver.%20Executing%20the%20function%20%22Lpuart_Lin_Ip_SendFrame%22%20returns%20%22LPUART_LIN_IP_STATUS_SUCCESS%22%2C%20however%20when%20polling%20the%20LIN%20instance's%20status%20after%20it%20returns%20%22LPUART_LIN_IP_STATUS_TX_BUSY%22.%20All%20subsequent%20calls%20to%20%22Lpuart_Lin_Ip_SendFrame%22%20return%20a%20fail.%3C%2FP%3E%3CP%3EI%20checked%20the%20RX%20and%20TX%20lines%20going%20into%20my%20LIN%20transcoder%2C%20as%20well%20as%20the%20LIN%20output%20and%20I%20can%20see%20a%20650%20microsecond%20low%20pulse%20followed%20by%20nothing.%20There%20is%20no%20data%20sent%20apart%20from%20this%20break%2C%20which%20is%20seen%20on%20all%203%20lines.%3C%2FP%3E%3CP%3EAny%20ideas%20as%20to%20what%20could%20be%20causing%20the%20issue%3F%20I%20have%20attached%20the%20file%20containing%20the%20Init%20and%20Send%20functions%20I%20have%20created.%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EEDIT%3A%20Wanted%20to%20add%2C%20the%20LIN%20instance%20has%20a%20%22CurrentNodeState%22%20of%20%22LPUART_LIN_IP_NODE_STATE_SEND_BREAK_FIELD%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2038371%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K324%20Lpuart_lin%20Master%20Continually%20Returning%20Status%20%22LPUART_LIN_IP_STATUS_TX_BUSY%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2038371%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F52961%22%20target%3D%22_blank%22%3E%40PetrS%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20encountered%20the%20same%20problem%20now%2C%20when%20MCU%20sends%20as%20host%2C%20LPUART_LIN_IP_STATUS_TX_BUSY%2C%20and%3CBR%20%2F%3Ethe%20LIN%20instance%20has%20a%20%22CurrentNodeState%22%20of%20%22LPUART_LIN_IP_NODE_STATE_SEND_BREAK_FIELD%22.%3C%2FP%3E%3CP%3EBut%20now%20the%20api%20for%20rerouting%20interrupts%20seems%20to%20have%20been%20removed%2C%20leaving%20only%20the%20IntCtrl_Ip_Init%20function.%3C%2FP%3E%3CP%3EI%20can't%20find%20another%20solution%2C%20please%20tell%20me%20if%20there%20is%20another%20way%20to%20check%20my%20error.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1845312%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K324%20Lpuart_lin%20Master%20Continually%20Returning%20Status%20%22LPUART_LIN_IP_STATUS_TX_BUSY%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845312%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%20Petr%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20the%20response%2C%20I%20had%20already%20added%20the%20interrupt%20handler%20to%20IntCtrl_Ip.%20The%20issue%20turned%20out%20to%20be%2C%20I%20was%20initializing%20the%20interrupt%20and%20configuring%20the%20interrupt%20routing%20after%20initializing%20the%20LIN.%3CBR%20%2F%3E%3CBR%20%2F%3ENow%20that%20I%20am%20initializing%20the%20interrupt%20before%20the%20LIN%20I%20am%20successfully%20sending%20LIN%20frames.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1845138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K324%20Lpuart_lin%20Master%20Continually%20Returning%20Status%20%22LPUART_LIN_IP_STATUS_TX_BUSY%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845138%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Eit%20looks%20like%20driver%20interrupt%20is%20not%20called%20to%20next%20frame%20bytes%20are%20not%20processed.%20Try%20to%20check%20that.%3CBR%20%2F%3EYou%20can%20also%20refer%20to%20RTD%20demo%20examples.%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E