TRESOS MCAL Configuration for S32K3XX

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

TRESOS MCAL Configuration for S32K3XX

2,738 Views
Vijay_Arwapally
Contributor III

@nxp 

We would like configure and use MCAL drivers for S32K344 controller. For this we would like to use Tresos tool for configuration instead of S32DS so as to be generic incase of controller change later.

 

We have referred to the example projects provided along with the installations, but still below are the questions.

For performing port configuration, the process seems to be very tedious and error prone, there is no default port configuration listed so that it can be overridden as per project requirements. Looks like each port pin configuration needs to added explictly and configured as per IO_Table.xlxs, for various attributes in the configuration, which can easily be configured wrong.

 

What would be the best approach to perform port configuration in this case? Similar would be the question for other MCAL modules.

0 Kudos
5 Replies

2,702 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

I don't really understand your question. However, you can consider these two following configuration:

- For Pins that you don't configure and want to set them in a default mode, you can consider NotUsedPortPin configuration:

namnguyenviet_0-1645778934679.png

Unused pins will be set in GPIO mode and the direction will depend on the above configuration

- For pins that you don't want driver to touch them, add them in the UnTouchedPortPin:

namnguyenviet_1-1645779303124.png

Best Regards,

Nam

0 Kudos

2,700 Views
Vijay_Arwapally
Contributor III

Is there a way to make port and dio and other configuration easy?

To configure PTA29, below is configuration and someone reviewing it later will be finding it hard to read as it requires cross verifying Mscr value to IO_Mux.xlx:

Vijay_Arwapally_0-1645781860870.png

Is there a symbolic way to do this instead?

Similar is the problem with DIO channel, where-in it requires calculation for portH and port L and then 16 bits to arrive at the dio channel value:

Vijay_Arwapally_1-1645782280922.pngVijay_Arwapally_2-1645782297764.png

Below is the formula to arrive at DIO channel value, which seems to tedious:

Vijay_Arwapally_4-1645782672908.png

 

 

With respect IO_Mux.xlx, I have  below questions:

Vijay_Arwapally_3-1645782437456.png

Why is the direction for LPSPI1_SIN set to O-output??

There is no mention of IMCR in port configuration? Is it required to IMCR rows, whenever the pin is required to be configured as input?

Can you please clarify the doubts?

 

0 Kudos

2,696 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

About the EB Tresos Port and Dio configuration, unfortunately there is no other way:

- With Port, you can define the name for each PortPin according to its physical pin in the microcontroller, it will be easier to be maintained in the future. Or named it as its functionality.

- With Dio, it's the AUTOSAR compliant that we need to follow.

About the IO_Mux file, please create another thread as I am not an expert on that. 

Best  Regards,

Nam

0 Kudos

2,719 Views
Vijay_Arwapally
Contributor III
0 Kudos

2,709 Views
Vijay_Arwapally
Contributor III

@lukaszadrapaCan you please help?

0 Kudos