Hello, I need to run my SPI Master below 100Khz but when I try I only see 1Mhz on the scope. What is the lowest SPI clock rate allowed?
Thank you,
Joe
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello, I need to run my SPI Master below 100Khz but when I try I only see 1Mhz on the scope. What is the lowest SPI clock rate allowed?
Thank you,
Joe
Joe,
As per the device datasheet the SPI clock is derived from the SYSCLK1/6. If the device is running at 1GHz, the SPI module clock will be 166.66MHz..
Reference: Section 11.5.1 and Table 11-13 in 66AK2H data manual
The PRESCALE inside SPI module devices this module clock to obtain the resulting SPI clock. The prescale can take value from 1-255
SPICLK frequency = [SPI module clock] / [SPIFMTn.PRESCALE + 1]
When Main PLL is configured to run at ARM and DSP at DEVICE speed (1Ghz in this example). SPI clock can range from 0.65 MHz to 83.33MHz.
If the Main PLL is in bypass then SYSCLK1 runs at OSCIN. So if input clock is 100 MHz then SPI module clock is 16.66Mhz and SPICLK of 65 Khz to 8.3 MHz.
Hope this clarifies the clock setup.
Regards,
Rahul
If you are using the SPI driver provided by TI in Processor SDK RTOS then 1 MHz is the default setting in the driver as you can see from the source file
pdk_am57xx_1_0_xx\packages\ti\drv\spi\src\SPI_drv.c
The SPI module clock or SYSCLK/6 setting is in the SPI_soc.c file located here:
pdk_am57xx_1_0_xx\packages\ti\drv\spi\soc\k2h\SPI_soc.c
If you choose to modify the GEL or the bootloader to run the SYSCLK slower then you need to change the module clock in SPI_soc.c file.
Regards,
Rahul
At 1.2 GHz, the lowest SPI clock can be 0.781 MHz ( [12000/6 ]/ 256 ) or 781 KHz based on the clocking logic that I explained in my earlier post.
Regards,
Rahul