S32G3 LINFLexD UART break generation

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

S32G3 LINFLexD UART break generation

577 Views
dustinr
Contributor I

We have a UART peripheral that requires a break signal to function properly. Best I can tell from looking through the S32G3 reference manual, LINFLexD in UART mode doesn't support break generation. I also see an empty implementation in the Linux driver fsl_linflexuart.c.

static void linflex_break_ctl(struct uart_port *port, int break_state)
{
}

I seems like the LIN header could potentially be used like a UART break, but that's far less than ideal as we'd need to switch to LIN mode, then back to UART.

Does LINFlexD UART actually not support break generation? If so, what's the "preferred" way to do this?

0 Kudos
Reply
1 Reply

543 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @dustinr,

Thanks for reaching out to us. Regarding your question, for what I can see in the reference manual and RTD source code, the break cannot be generated "on demand", it is handled automatically by the LINFlexD module and It is controlled by the LINCR1[MBL] register. 

Regarding the Linux function you mentioned, it is empty because the pointer is needed for the  uart_ops struct, which is used by the Linux UART driver. 

Therefore, there is no supported mechanism to generate a break from the application side. It could be possible by changing the pin to GPIO mode and forcing a "0" on the TX line, however changing the muxing of the pins is not recommended during the application.

 

Let me know if you have more questions.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2371400%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32G3%20LINFLexD%20UART%20break%20generation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2371400%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWe%20have%20a%20UART%20peripheral%20that%20requires%20a%20break%20signal%20to%20function%20properly.%20Best%20I%20can%20tell%20from%20looking%20through%20the%20S32G3%20reference%20manual%2C%20LINFLexD%20in%20UART%20mode%20doesn't%20support%20break%20generation.%20I%20also%20see%20an%20empty%20implementation%20in%20the%20Linux%20driver%20fsl_linflexuart.c.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Estatic%20void%20linflex_break_ctl(struct%20uart_port%20*port%2C%20int%20break_state)%0A%7B%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20seems%20like%20the%20LIN%20header%20could%20potentially%20be%20used%20like%20a%20UART%20break%2C%20but%20that's%20far%20less%20than%20ideal%20as%20we'd%20need%20to%20switch%20to%20LIN%20mode%2C%20then%20back%20to%20UART.%3C%2FP%3E%3CP%3EDoes%20LINFlexD%20UART%20actually%20not%20support%20break%20generation%3F%20If%20so%2C%20what's%20the%20%22preferred%22%20way%20to%20do%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2371560%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G3%20LINFLexD%20UART%20break%20generation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2371560%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%2F244818%22%20target%3D%22_blank%22%3E%40dustinr%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20reaching%20out%20to%20us.%20Regarding%20your%20question%2C%20for%20what%20I%20can%20see%20in%20the%20reference%20manual%20and%20RTD%20source%20code%2C%20the%20break%20cannot%20be%20generated%20%22on%20demand%22%2C%20it%20is%20handled%20automatically%20by%20the%20LINFlexD%20module%20and%20It%20is%20controlled%20by%20the%26nbsp%3BLINCR1%5BMBL%5D%20register.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegarding%20the%20Linux%20function%20you%20mentioned%2C%20it%20is%20empty%20because%20the%20pointer%20is%20needed%20for%20the%26nbsp%3B%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Euart_ops%3C%2FFONT%3E%20struct%2C%20which%20is%20used%20by%20the%20Linux%20UART%20driver.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETherefore%2C%20there%20is%20no%20supported%20mechanism%20to%20generate%20a%20break%20from%20the%20application%20side.%20It%20could%20be%20possible%20by%20changing%20the%20pin%20to%20GPIO%20mode%20and%20forcing%20a%20%220%22%20on%20the%20TX%20line%2C%20however%20changing%20the%20muxing%20of%20the%20pins%20is%20not%20recommended%20during%20the%20application.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ELet%20me%20know%20if%20you%20have%20more%20questions.%3C%2FP%3E%3C%2FLINGO-BODY%3E