Hi,
Could someone please provide any available guidelines for Bootloader Firmware using MCUBoot and External QSPI Flash based on the following specifications?
Thanks,Parth
I do not see anything wrong. If you use EK-RA4M3 and the on-board QSPI you should use the same QSPI settings an in the example project.
The MCUboot settings depend a lot on your application (for example upgrade method, image sizes etc).
I believe I may have identified the source of the issue. Here's a brief explanation, and I would appreciate your help in finding a solution. In Approach 1, the data readbacks are incorrect, while in Approach 2, everything works as expected. In Approach 1, I'm directly accessing the memory location, whereas in Approach 2, I’m using the QSPI API with commands. I need to resolve the issue with Approach 1 because the bootloader might be reading data this way (as per approach-1).
#define QSPI_DEVICE_START_ADDRESS (0x60000000)
#define QSPI_FLASH_ADDRESS(page_no) (uint8_t *) (QSPI_DEVICE_START_ADDRESS + (page_no * PAGE_WRITE_SIZE))
uint32_t address = (uint32_t)(QSPI_FLASH_ADDRESS(0));
Approach 1:
memcpy(write_buffer, (uint8_t *)(address), SIZE_64KB); R_BSP_SoftwareDelay(500,1000);
Approach 2:
data[0] = 0x03; // Read command data[1] = (address >> 16) & 0xFF; data[2] = (address >> 8) & 0xFF; data[3] = address & 0xFF; data[4] = 0x00; R_QSPI_DirectWrite(&g_qspi0_ctrl, data, 4, true); R_QSPI_DirectRead(&g_qspi0_ctrl, (uint8_t *)write_buffer, SIZE_64KB); // Reading only 3 bytes R_BSP_SoftwareDelay(500, BSP_DELAY_UNITS_MILLISECONDS);
Please assist me to resolve this issue with approach-1.
Regards,
Parth