Now i can simulate the SDCARD to a U-disk with SDK's example (RT1052). I change the SD driver to the HYPERFLASH driver , but it doesn't work .
Hi @vwsncr
I hope you are doing excellent!
Generally speaking, I think that this can be achieved by creating an adapter file for the Hyperflash memory, like the usb_sdcard_adapter.c / .h we have on the evkbimxrt1050_dev_msc_disk_bm example.
I do not know if you are also using our i.MXRT1050 EVK, but please try to verify proper operation of the Hyperflash memory before hand. Please see the evkbimxrt1050_flexspi_hyper_flash_polling_transfer example.
Also, I recommend you to you create a linkerscrypt to run the Hyperflash memory APIs from SRAM, this in the case you are performing XIP from this memory. Or for test purposes link whole application to SRAM.
I do not know what is the source of the error, but if is related to the Hyperflash adapter : Please try to diagnose which kind of error you are getting. For example, first see if you can initialize properly the memory and read out some commands, then see if erase operation is successful, and then if write is works too.
All the best,
Diego.
Thanks !
I 'm also using the board i.MXRT1050 EVK. The USB and FLASH drivers all copy from example projects you said. I have tryed to write and erase the flash , it works well.
I use a part of flash to save and run the program code , the other part simulate as U-disk .I don't know it is a good way or not .
And i don't know how to create a linkerscrypt to run the Hyperflash memory APIs from SRAM.
Hi @vwsncr
Thanks for your reply,
The hyperflash example I mentioned containts a linker scrypt folder, that you can reuse on your project.
The use of the linker scrypt folder to link flash APIs to SRAM, is particularly useful when the MCU is doing XIP and the application is writing/reading from the same flash memory. It seems that you are doing this, so I recommend you testing this way too.
Diego