Can CPU frequency be configured before execution of Boot ROM in standalone mode?
There is a function SPI_Pinmux_Option2() (GPIO configuration) in the boot ROM. If I use debugger to step into this function and step through all the codes inside the function then I am able to correctly receive data from SPI flash and start the application.
But if I just step over the function without stepping into it. Then it fail to receive the data from SPI flash (SPI flash return 0xFFFF instead of keyvalue=0x08AA), and start application from on-chip flash instead.
Inside this function it initialize (GPIO-19, CS for SPI flash, output high) and then drive it low immediately to enable SPI flash (SPI flash, active-low). This high-low transition is too fast that the SPI flash cannot recognize. (MCU clock 120MHz, SPI flash max frequency 104MHz)