Hi All,
I have an external flash W25Q64 on which I have to mount a file system. I am using USBD_MSC example of NRF52840. My main goal is to create a file inside the flash memory chip. And when USB is plugged into the device it should be seen as a drive on laptop/desktop and I should be able to access the file which was created in the flash chip.I have made the connections on the NRF52840 using the pin configurations below:-
#define SDC_SCK_PIN (25)
#define SDC_MOSI_PIN (23)
#define SDC_MISO_PIN (24)
#define SDC_CS_PIN (15)
I have also configured the details in nrf_serial_flash_params.c file.
static const nrf_serial_flash_params_t m_sflash_params[] = { { .read_id = { 0xEF,0x40,0x17 }, .capabilities = 0x00, .size = 8 * 1024 * 1024, .erase_size = 2 * 1024, .program_size = 256, } }; nrf_serial_flash_params_t const * nrf_serial_flash_params_get(const uint8_t * p_read_id) { size_t i; for (i = 0; i < ARRAY_SIZE(m_sflash_params); ++i) { if (memcmp(m_sflash_params[i].read_id, p_read_id, sizeof(m_sflash_params[i].read_id)) == 0) { return &m_sflash_params[i]; } } return NULL; }
When I run the example , i get the following error:-
<info> app: Initializing disk 0 (QSPI)...
<error> app: Disk initialization failed.
1) Will this example run for W25Q64 IC??
2) This example also includes FATfs files. Will it automatically create a file system on the external SPI W25Q64 flash memory??
3) Why am I getting "Disk initialization failed." error?
4) Inside sdk_config.h do I also need to enable pin configurations for Qspi??
5) How to test this application? Currently I am using NRF52840 DK and then connecting external spi flash to it. But for USB detection how will it work?
I have attached few files here to check for the configurations
Please help me to solve this issue. I need to solve this issue on an urgent basis. Your help will be appreciated. I have also attached W25Q64 datasheet for your reference.
Thanks & Regards,
Snehal