Hi,
Can customer change QSPI_CLK in boot during boot running on QSPI? The default value in ROM code is 12MHZ. Can we change it to 48MHZ?
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.
Hi,
Can customer change QSPI_CLK in boot during boot running on QSPI? The default value in ROM code is 12MHZ. Can we change it to 48MHZ?
Hi Nancy,
As noted in 5.2.6.7 QSPI of AM437x TRM
"The ROM Code initializes the QSPI controller, pin muxing, and clocks to communicate with the QSPI device. The controller is initialized in Mode 3 and the clock is set to operate at 12 MHz."
Best,
-Hong
HI,
The SPI clock generator uses the QSPI_FCLK clock as an input, and generates the qspi1_sclk, which is a divided version of the QSPI_FCLK clock. The divide ratio is a 16-bit value configured through the QSPI_CLOCK_CNTRL_REG[15:0] DCLK_DIV bit field and thus provides a division factor in a range from 1 to 65536. The QSPI_FCLK clock is divided by the DCLK_DIV value + 1 to provide the qspi1_sclk clock. When DCLK_DIV = 0x0 the QSPI_FCLK clock equals the DCLK clock. The value in the DCLK_DIV bit field applies only when the QSPI_CLOCK_CNTRL_REG[31] CLKEN bit is set to 0x1. Figure 27-3 shows the SPI_CLKGEN block.
QSPI_FCLK is 12M or 48M ? If it is 48M, then the DCLK_DIV of QSPI_CLOCK_CNTRL_REG is 0, CLKEN is 1, and the output qspi1_SCLk should be 48M.
Is the maximum size of qspi1_sclk only 12M?
Hi Nancy,
As described in 5.2.6.7 QSPI of AM437x TRM, 12MHz QSPI clock is configured in bootrom to support QSPI boot mode operation.
Best,
-Hong
Yes, QSPI clock can be re-configured after initial QSPI boot process.
Depending on your SW OS, here are some early e2e posts on SPI clock configurations in u-boot on AM335x for your reference.
e2e.ti.com/.../am3359-mcspi-slave-clock-configuration-am3359
e2e.ti.com/.../am3352-am3352-u-boot-spi-read-too-slow
Hope it helps.
Best,
-Hong
hi,With the help of Nancy, I found out the reason that there was something wrong with QSPISetPreScaler in qspi. c, and the DCLK_DIV of QSPI_CLOCK_CNTRL_REG could not be modified successfully. I solved the problem by using the driver in PDK_AM437X_1_0_17. thank you
The DCLK_DIV for QSPI_CLOCK_CNTRL_REG is probably set to 3 in ROM code. But when you look at the register value with CCS, it always reads 0. It is an incorrect display. It might be mistaken for having been set to 0. It is recommended to add a table in the manual explaining the frequencies corresponding to different DCLK_DIV.