S32K312 EVB Uart Not working

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

S32K312 EVB Uart Not working

616 Views
nikhilvv07
Contributor II

hi,

Am Newbie in NXP S32K.

Am trying to implement UART Communication to Communicate with Terminal software in autosar mode by using Evaluation board XS32K312EVB-Q172 hardware.

i configured Uart as following 

nikhilvv07_0-1703071734051.png

 

nikhilvv07_1-1703071775927.pngnikhilvv07_2-1703071809980.png

 

 

In main.c i added 

#include "Mcal.h"
#include "Mcu.h"
#include "Port.h"
#include "Dio.h"
#include "IntCtrl_Ip.h"
#include "Lpuart_Uart_Ip.h"
#include "CDD_Uart.h"

 

and from main() i called Uart_Init(NULL_PTR);

but when start Debug the control moves to hardware fault loop.

is there any missing in my configuration?

 

0 Kudos
6 Replies

574 Views
nikhilvv07
Contributor II

Hi Robin,

Thank you for your support. i will check the same and update you.

 

some more questions regarding UART.

> Where can i initialize Lpuart_Uart_Ip_StateStructureType structure.

It seems it holds rx and tx buffers and other related information. But in application i did not intialized these struct variables. and it says driver doesnot provide memory for it.

So how can we initiate this struct. ?

 

> from where can i get received bytes?

in some other example i have seen they are setting callback event. But here i did not find any settings like that. instead i hope we can check in call back when it called by checking Lpuart_Uart_Ip_EventType.

is it correct ?

is there any way to check the receive buffer and read the receive data by bytes.? 

 

thanks,

Nikhil

0 Kudos

544 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Nikhil,

Sorry, I’ve been busy lately, so I haven’t replied to you until now.
I see that you are using AUTOSAR MCAL HLD (High Level Driver). I suggest you create a new question so that my colleague in charge of MCAL software can help you.


Best Regards,
Robin

0 Kudos

540 Views
nikhilvv07
Contributor II

Hi Robin,

Sure i will create a new ticket.

Can u please tell me from where you have find out MCAL HLD option and how to select this option?

 

 

0 Kudos

520 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

The Configuration Component that you selected belongs to AUTOSAR MCAL HLD.

nikhilvv07_0-1703071734051.png

For more detail, please read AN13435: SDK/MCAL to Real-Time Drivers - Application Note

516 Views
nikhilvv07
Contributor II

HI Robin,

As per the discussion i raised new query of the same issue.

Thank you for sharing the document. 

I Hope your colleague will respond soon as possible for the query. meanwhile can you clarify following points.

> Where can i initialize Lpuart_Uart_Ip_StateStructureType structure.

It seems it holds rx and tx buffers and other related information. But in application i did not intialized these struct variables. and it says driver doesnot provide memory for it.

So how can we initiate this struct. ?

 

> from where can i get received bytes?

in some other example i have seen they are setting callback event. But here i did not find any settings like that. instead i hope we can check in call back when it called by checking Lpuart_Uart_Ip_EventType.

is it correct ?

 

-Nikhil

 

0 Kudos

579 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

I checked the project you sent me via private message and found that you forgot to enable the Peripheral Clock of LPUART0.

Peripheral Clock Enable McuPeripheral.pngenable Peripheral Clock of LPUART_0.png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------