TI中文支持网
TI专业的中文技术问题搜集分享网站

SK-TDA4VM: EB can not config SPI baudrate

Part Number:SK-TDA4VM

Hi,

I install  MCUSW_09_00_00_10_CONFIG-windows-installer.exe and EB 24.0 ,

and try to config MCAL SPI, but get some trouble.

I config McuClock(80Mhz) and SpiExtDeviceClockDivider(1 or 2) for SPI,but Prama SpiBaudrate still 500.

1. I want to know how to change the value?

2. how I assign mcu pin to SPI peripheral in EB?

Gary Lu:

1. To change the value of SpiBaudrate, you need to calculate the desired baud rate based on the clock frequency and the desired SPI clock rate. The formula for calculating the SPI baud rate is:

SPI Baud Rate = (SPI Clock Frequency) / (2 x SpiBaudrate)

For example, if your SPI clock frequency is 10 MHz and you want a baud rate of 1 MHz, you would set SpiBaudrate to 5:

SpiBaudrate = (10 MHz) / (2 x 1 MHz) = 5

Once you have calculated the desired SpiBaudrate value, you can set it using the SPI_setConfig function in MCAL SPI.

2. To assign MCU pins to SPI peripheral in EB, you can use the Pinmux tool. The Pinmux tool allows you to configure the pin assignments for different peripherals, including SPI. Here are the steps to assign MCU pins to SPI peripheral in EB:

a. Open the Pinmux tool in EB.

b. Select the MCU device you are using.

c. Navigate to the SPI peripheral in the pinmux configuration.

d. Select the pins you want to use for SPI communication.

e. Save the pinmux configuration.

f. Generate the code for the pinmux configuration.

g. Include the generated code in your project.

With the pinmux configuration in place, you can use the corresponding pins for SPI communication in your MCAL SPI configuration.

赞(0)
未经允许不得转载:TI中文支持网 » SK-TDA4VM: EB can not config SPI baudrate
分享到: 更多 (0)