1. When I am using the evmomapl138 SPI flash driver to written AISgen result into FLASH, I used scope and see that the frequency is only ~150KHz.
2. However when booting from SPI1 FLASH, the frequency scope see is ~2.4MHz.
· Even this ~2.4MHz speed is far slower than the 30MHz SPI1 speed I actually specified in AISgen
What has caused this huge difference?
Table 30-26 of SPRUH77 said:It determines the bit transfer rate if the SPI is the network master and is directly derived from the SPI module clock. If the SPI is configured as slave, PRESCALE needs to be configured to a valid value, but PRESCALE is ignored.The clock rate can be calculated as:SPI clock frequency = SPI module clock/(PRESCALE + 1)
1. CFGCHIP3. ASYNC3_CLKSRC = 0
1. SPIFMT0 = SPIFMT1 = SPIFMT2 = SPIFMT3 = 00010208,
2. And tried setting SPIDAT1.DFSEL to all 0, 1, 2 ,3 values and test
o In this situation whatever value DFSEL is, the clock rate should be = 150 MHz / (2+1) = 50 MHz