飞凌ok1601板子提供的rt-thread-OK1061-S 加载flexspi nor flash 不能正常运行,j...
您好,我使用飞凌提供的 源码包rt-thread-OK1061-S 加载flexspi nor flash 不能正常运行。我想在板子起来后通过写nor flash进行后续远程升级代码。所以需要把nor flash 读写功能使能。
加载drv_flexspi.cdrv_flexspi_nor.cfsl_flexspi.c 三个文件后 ,调用 INIT_PREV_EXPORT(rt_hw_flexspi_init); 初始化后,打印dbg_log(DBG_INFO, "NorFlash Init\r\n");后, 板子一直反复重启,麻烦帮忙看看什么问题呢,比较急,谢谢。
我们的开发板目前不支持这个驱动。
重启的原因是,代码在flash中执行的,现在又操作flash,会导致重启。 谢谢回复,
但是我用SDK_2_5_0_EVKB_IMXRT1061的源码包,加载测试代码 \boards\evkmimxrt1060\driver_examples\flexspi\nor\polling_transfer:
flexspi_nor_flash_ops.c flexspi_nor_polling_transfer.c 就可以正常读写啊?
Vendor ID: 0x15
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.
您可以在网上搜一下有没有相关内容,看看两者有什么区别 我对比了下两者的map文件,发现 sdk里面的norflash 函数是定义在 iram 空间的(0x20000000),
i.FLEXSPI_WriteBlocking 0x20000be4 Section 0fsl_flexspi.o(i.FLEXSPI_WriteBlocking)
i.flexspi_nor_enable_quad_mode 0x20000c7a Section 0flexspi_nor_flash_ops.o(i.flexspi_nor_enable_quad_mode)
i.flexspi_nor_flash_erase_sector 0x20000cd4 Section 0flexspi_nor_flash_ops.o(i.flexspi_nor_flash_erase_sector)
i.flexspi_nor_flash_init 0x20000d38 Section 0flexspi_nor_flash_ops.o(i.flexspi_nor_flash_init)
i.flexspi_nor_flash_page_program 0x20000dbc Section 0flexspi_nor_flash_ops.o(i.flexspi_nor_flash_page_program)
i.flexspi_nor_get_vendor_id 0x20000e16 Section 0flexspi_nor_flash_ops.o(i.flexspi_nor_get_vendor_id)
i.flexspi_nor_wait_bus_busy 0x20000e54 Section 0flexspi_nor_flash_ops.o(i.flexspi_nor_wait_bus_busy)
i.flexspi_nor_write_enable 0x20000ea6 Section 0flexspi_nor_flash_ops.o(i.flexspi_nor_write_enable)
.constdata 0x20000ed4 Section 24fsl_flexspi.o(.constdata)
而 rtthreadsdk的 nor flash函数是定义在flash空间的(0x60000000),
FLEXSPI_GetInstance 0x60007e61 Thumb Code 38fsl_flexspi_1.o(i.FLEXSPI_GetInstance)
FLEXSPI_Init 0x60007ef5 Thumb Code 428fsl_flexspi_1.o(i.FLEXSPI_Init)
FLEXSPI_ReadBlocking 0x600080fd Thumb Code 172fsl_flexspi_1.o(i.FLEXSPI_ReadBlocking)
FLEXSPI_SetFlashConfig 0x600081a9 Thumb Code 284fsl_flexspi_1.o(i.FLEXSPI_SetFlashConfig)
FLEXSPI_TransferAbort 0x600082d9 Thumb Code 34fsl_flexspi_1.o(i.FLEXSPI_TransferAbort)
FLEXSPI_TransferBlocking 0x60008345 Thumb Code 190fsl_flexspi_1.o(i.FLEXSPI_TransferBlocking)
FLEXSPI_TransferHandleIRQ 0x60008403 Thumb Code 346fsl_flexspi_1.o(i.FLEXSPI_TransferHandleIRQ)
FLEXSPI_UpdateLUT 0x6000855d Thumb Code 80fsl_flexspi_1.o(i.FLEXSPI_UpdateLUT)
请问你知道如何将某个文件的函数定义在iram 或者 flash空间么?
您可以试试把对flash的操作放进ram中,具体方法您可以查一下 搞定了 多谢
页:
[1]