How to Change SPI Baudrate With MCAL

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to Change SPI Baudrate With MCAL

ソリューションへジャンプ
1,826件の閲覧回数
biyangdong
Contributor II

Hello,I used S32K14X_MCAL4_3_RTM_HF4_1_0_1 Mcal version with Vector Davinci tools, i want change SPI baudrate in runtime,for example,spi_init() with baudrate 3.702Mhz,when one condition satisfied,i want to change the spi baudrate to 10Mhz,is there any api functions or ways in mcal code support this function,i can't find it from AUTOSAR_MCAL_SPI_UM file. the one ways i know from it is that change spi input clock by the api function Spi_SetClockMode.

 

SPI Baudrate.pngSPI Baudrate2.png

タグ(1)
0 件の賞賛
返信
1 解決策
1,785件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello,

Please check whether this node is available in your DaVinci Configurator:

namnguyenviet_0-1617690941302.png

After enabled SpiPhyUnitAlternateClockRef and refer to the MCU clock reference point, I can see SPI_DUAL_CLOCK_MODE is STD_ON. 

namnguyenviet_1-1617691028681.png

However, I'm not sure the same thing happens with DaVinci, cause I don't have DaVinci on hands.

Best Regards,

Nam

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,786件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello,

Please check whether this node is available in your DaVinci Configurator:

namnguyenviet_0-1617690941302.png

After enabled SpiPhyUnitAlternateClockRef and refer to the MCU clock reference point, I can see SPI_DUAL_CLOCK_MODE is STD_ON. 

namnguyenviet_1-1617691028681.png

However, I'm not sure the same thing happens with DaVinci, cause I don't have DaVinci on hands.

Best Regards,

Nam

 

 

0 件の賞賛
返信
1,815件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Yes, by calling Spi_SetClockMode(SPI_ALTERNATE), the SPI baud-rate can be changed to alternate baud-rate value during runtime.

 

0 件の賞賛
返信
1,799件の閲覧回数
biyangdong
Contributor II

Thanks for your reply.

but i also have a question,the configuration tools of EB tresos or davinci configurator haven't the configure item SpiEnableDualClockMode in SpiNonAUTOSAR group,the config code in Spi_Cfg.h this functon is off, i cann't to enable it and use,if this to say it is not support in S32K146 chips?

EBTresos configurator item.pngEBTresos configurator.png

 

Davinci configurator item.png

 

 

0 件の賞賛
返信
1,798件の閲覧回数
biyangdong
Contributor II

EBTresos configurator code.png

0 件の賞賛
返信