s32k3 uart

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

s32k3 uart

880 Views
leoCR7
Contributor I

hello dear NXP team...

I have configured the UART0 interrupt receive for s32k311...… I am trying to receive data in callback function but i am not Receiving any data...i dont know whats the issue....please resolve the issue....i have uploaded my project here below.

0 Kudos
Reply
1 Reply

848 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @leoCR7,

The AsyncReceive function enables reception and immediately leaves function. The application has to get the receive status to know when the receive is complete. You can either repeatedly call GetReceiveStatus or use interrupt callback function and use callback events in it. After receiving is completed (defined number of bytes received), you need to call AsyncReceive again to start new reception.

However, inside the callback, instead of calling AsyncReceive again, use the Lpuart_Uart_Ip_SetRxBuffer function for continuous reception. You can use AsyncReceive in the end transfer event.

You can refer to this example routine: [RTD600 IP] S32K312-EVB Lpuart interrupt echo - NXP Community. It is based on the S32K312, but you can simply copy over the configuration.

Best regards,
Julián 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2140962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Es32k3%20uart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2140962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehello%20dear%20NXP%20team...%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20configured%20the%20UART0%20interrupt%20receive%20for%20s32k311...%E2%80%A6%20I%20am%20trying%20to%20receive%20data%20in%20callback%20function%20but%20i%20am%20not%20Receiving%20any%20data...i%20dont%20know%20whats%20the%20issue....please%20resolve%20the%20issue....i%20have%20uploaded%20my%20project%20here%20below.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2141064%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20s32k3%20uart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2141064%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F252869%22%20target%3D%22_blank%22%3E%40leoCR7%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20AsyncReceive%20function%20enables%20reception%20and%20immediately%20leaves%20function.%26nbsp%3BThe%20application%20has%20to%20get%20the%20receive%20status%20to%20know%20when%20the%20receive%20is%20complete.%20You%20can%20either%20repeatedly%20call%26nbsp%3BGetReceiveStatus%20or%20use%20interrupt%20callback%20function%20and%20use%20callback%20events%20in%20it.%20After%20receiving%20is%20completed%20(defined%20number%20of%20bytes%20received)%2C%20you%20need%20to%20call%26nbsp%3BAsyncReceive%20again%20to%20start%20new%20reception.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EHowever%2C%20inside%20the%20callback%2C%20instead%20of%20calling%20AsyncReceive%20again%2C%20use%20the%20Lpuart_Uart_Ip_SetRxBuffer%20function%20for%20continuous%20reception.%20You%20can%20use%20AsyncReceive%20in%20the%20end%20transfer%20event.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EYou%20can%20refer%20to%20this%20example%20routine%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FRTD600-IP-S32K312-EVB-Lpuart-interrupt-echo%2Fta-p%2F2141060%22%20target%3D%22_blank%22%3E%5BRTD600%20IP%5D%20S32K312-EVB%20Lpuart%20interrupt%20echo%20-%20NXP%20Community%3C%2FA%3E.%20It%20is%20based%20on%20the%20S32K312%2C%20but%20you%20can%20simply%20copy%20over%20the%20configuration.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E