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.
Solved! Go to Solution.
Hello,
Please check whether this node is available in your DaVinci Configurator:
After enabled SpiPhyUnitAlternateClockRef and refer to the MCU clock reference point, I can see SPI_DUAL_CLOCK_MODE is STD_ON.
However, I'm not sure the same thing happens with DaVinci, cause I don't have DaVinci on hands.
Best Regards,
Nam
Hello,
Please check whether this node is available in your DaVinci Configurator:
After enabled SpiPhyUnitAlternateClockRef and refer to the MCU clock reference point, I can see SPI_DUAL_CLOCK_MODE is STD_ON.
However, I'm not sure the same thing happens with DaVinci, cause I don't have DaVinci on hands.
Best Regards,
Nam
Yes, by calling Spi_SetClockMode(SPI_ALTERNATE), the SPI baud-rate can be changed to alternate baud-rate value during runtime.
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?