S32K3xx SpiBaudrateConfigRef set

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

S32K3xx SpiBaudrateConfigRef set

352 Views
karmegancjk
Contributor III

Hi,

Configuration Components for SDK Peripheral Drivers— LPSPI:

1. Lpspi → SpiExternalDevice → SpiUseBaudrateConfig → SpiBaudrateConfigRef? What is the purpose of this setting, and how do you configure it?

2. What is the difference between SpiUseBaudrateConfig and SpiCalculatedBaudRate for SPI baud rate selection?

3. I need a user-friendly way to configure the SPI baud rate. How can I do that?

Regards,

Karmegan C

 

 

 

Tags (3)
0 Kudos
Reply
4 Replies

335 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @karmegancjk,

All of the configuration parameters are described inside the respective driver user manual. Under "C:\NXP\S32DS.3.6.1\S32DS\software\PlatformSDK_S32K3\RTD\Spi_TS_T40D34M50I0R0\doc" you can find RTD_SPI_UM.pdf

1. SpiBuadrateConfigRef is the reference node used in order to calculate the Spi baud rate.

Julin_AragnM_0-1747409664696.png

2. SpiUseBaudrateConfig uses the reference node, SpiCalculatedBaudRate uses the following formula:

SpiCalculatedBaudrate = Function clock / (SpiPrescalerValue * (SpiScaler + 2))

3. You can use the existing example "Spi_Transfer_S32K344" to use as base. Also, chapter 3.6.13 of the previously mentioned file shows how to configure baud rate:

Julin_AragnM_1-1747409941606.png

Best regards,
Julián

0 Kudos
Reply

305 Views
karmegancjk
Contributor III

Hi,

I am not able to assign SpiBaudrateConfig_0 to SpiBaudrateConfigRef in Lpspi Driver.

IDE : S32DS 3.5.13.

RTD : R22_11 V4.0.0.

How do I set the path of SpiBaudrateConfig_0 in SpiBaudrateConfigRef?

0 Kudos
Reply

269 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @karmegancjk,

Apparently, only the MCAL Spi component generates a valid SpiBaudRateConfigRef value. I did not notice this since I was basing the project in MCAL and not IP:

Julin_AragnM_0-1747778044468.png

Julin_AragnM_1-1747778068172.png

I think this is not intended, so for now, either configure the SPI component without the "UseBaudrateConfig" parameter or with the MCAL component to generate the reference. I will ask internally to see if this is expected behavior.

Best regards,
Julián

0 Kudos
Reply

241 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @karmegancjk

I've confirmed with the internal team, and this is a bug. It is planned to be fixed in the next RTD release.

Best regards,
Juli[an

0 Kudos
Reply