Hi @jingpan
Sorry about making you confused. What I mean is that, when I select the 'Link application to RAM' (when programing to ram), it can read and write the hyper flash normally. But when I don't select 'Link application to RAM' (when programing to flash), the program will get stuck when running to the first "FLEXSPI_SoftwareReset(base)".
Link application to RAM
And Thanks for your mention of 'linkscripts', I solve the problem by adding 'fsl_clock.o' to SRAM, it can read and write the hyper flash when programing to flash. But the program will get stuck at the second 'FLEXSPI_SoftwareReset(base);' in function 'flexspi_nor_flash_page_program' and lead to a fault, and if I remove it, the program can run normally. I'm not sure the reason why only this 'FLEXSPI_SoftwareReset(base);' will lead to a problem. And I also found that if I run the flexspi_nor_flash_page_program by one step, the program won't get stuck at the second 'FLEXSPI_SoftwareReset(base);' in function 'flexspi_nor_flash_page_program'.
Thanks a lot.