How to update SPIFI clock Frequency
The SPIFI clock frequency is defined in the header, offset 0x1C. Table 1 lists the SPIFI serial clock frequencies that are supported. So SPIFI clock frequency can be set to 24 MHz, 32 MHz, 48 MHz, and 96 MHz.
Note: If header sets SPIFI clock frequency to zero, the serial clock defaults to 24 MHz. And this setting affects both SPI boot or SPIFI boot clock. For SPIFI, the clock and other configuration settings are retained after boot unless modified by the application program.
Header SPI/SPIFI clock frequency value |
SPI/SPIFI clock speed |
---|---|
< 24000000 (SPI only) |
12000000 (SPI only) |
< 32000000 |
24000000 |
< 48000000 |
32000000 |
< 96000000 |
48000000 |
>= 96000000 |
96000000 |
The default SPIFI clock frequency is 24 MHz and the corresponding settings is IMG_BAUDRATE=0
. To change SPIFI clock frequency, just need to add the setting of IMG_BAUDRATE=X
(X=24000000, 32000000, 48000000 or 96000000) in IDEs. The macro of IMG_BAUDRATE
is also defined in the startup_LPC54xx.s
(.c
,.cpp
) file.
The following section takes 96 MHz as an example to introduce how to change SPIFI clock frequency in each IDE.
Updating SPIFI clock frequency in IAR
In IAR, right click Project and choose Options. Then, click Assembler and Preprocessor.
Add IMG_BAUDRATE=96000000 in Defined symbols: (one per line), as shown in Figure 1.
Parent topic:How to update SPIFI clock Frequency
Updating SPIFI clock frequency in Keil® MDK/μVision
In Keil, right click Project and choose Options. Then, click Asm.
Add IMG_BAUDRATE=96000000 in Define, as shown in Figure 1.
Parent topic:How to update SPIFI clock Frequency
Updating SPIFI clock frequency in Arm® GCC
In Armgcc, open the
CMakeLists.txt
file.Add two line settings.
SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG}-DIMG_BAUDRATE=96000000")
SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE}-DIMG_BAUDRATE=96000000")
.
Parent topic:How to update SPIFI clock Frequency
Updating SPIFI clock frequency in MCUXpresso IDE
In MCUXpresso IDE, right click project and choose
Properties
.Click C/C++ Build and choose Settings. Click Preprocessor in Tool Settings.
Add IMG_BAUDRATE=96000000 in Defined symbols(-D), as shown in Figure 1.
Parent topic:How to update SPIFI clock Frequency