Hi Renesas Team, I'm using DA14706 controller interfaced with MX25U25645G 256Mb flash memory in our custom board with SDK-10.2.6.49.
While writing the flash data in below partition, #define NVMS_LOG_PART_START (OQSPI_MEM1_VIRTUAL_BASE_ADDR + 0x00780000)#define NVMS_LOG_PART_SIZE (0x0187F000)The code asserts warning when the data goes beyond 16MB which could be due to default 24bit addressing in the SDK.
Updates done in order to write the data in the log partition, File: config_oqspi.h (bsp_defaults_da1470x.h)Code update:/*Defines added to include for 256MB Flash */#define dg_configOQSPI_FLASH_HEADER_FILE "oqspi_mx25u256.h" /* Default: "oqspi_mx25u6432.h" */#define dg_configOQSPI_FLASH_CONFIG oqspi_mx25u256_cfg /* Default: oqspi_mx25u6432_cfg */File: oqspi_mx25u256.hCode update:static const oqspi_flash_config_t oqspi_mx25u256_cfg = { .address_size = HW_OQSPI_ADDR_SIZE_32, /* Default: HW_OQSPI_ADDR_SIZE_24 */};Code hangs up in the code initialization itself. Debug: __STATIC_INLINE void hw_cache_enable(void){REG_SET_BIT...<here the code gets stuck >
NOTE: Reverting back this one change of HW_OQSPI_ADDR_SIZE_32 to HW_OQSPI_ADDR_SIZE_24, works. But then I won't be able to utilize the memory as the code will assert warning once it reaches 0x00FFFFFF due to below code in SDK (while flash write):
__RETAINED_CODE void hw_oqspi_erase_block(uint32_t addr){ .... switch (hw_oqspi_get_address_size()) { case HW_OQSPI_ADDR_SIZE_24: ASSERT_WARNING(addr <= 0x00FFFFFF);...
Kindly, Provide the changes required to update the memory addressing size from 24bit addressing to 32bits addressing mode.
I’d appreciate a quick response.
Regards,Rutva.
Hi Rutva,
Thank you for posting your questions online.
Let me check on this and will back to you as soon as possible.
BR,
JH_Renesas
Please try the following steps:
1) Please refer on the 5. User Guides — DA1470x Software Platform Reference (renesas.com) on section 5.7.2 Supported Flash Memories:
As you can see, for the DA1470x we do not provide any OQSPI driver for 256MBit Flash part numbers.2) Please also refer on 5. User Guides — DA1470x Software Platform Reference (renesas.com), on section 5.7.5 Add Support for a new OQSPI Flash memoryCustomer should follow the instructions on the DA1470x Software Platform Reference in order to create a flash driver for MX25U25645G.3) Customer stated the following:
File: oqspi_mx25u256.h Code update: static const oqspi_flash_config_t oqspi_mx25u256_cfg = { .address_size = HW_OQSPI_ADDR_SIZE_32, /* Default: HW_OQSPI_ADDR_SIZE_24 */ };
However, on the SDK v10.2.6.49 there is not a oqspi_mx25u256.h file. I guess that the customer created the header file for the Flash driver based on the oqspi_mx25u6432.h file.The Address size is not the only thing that they should change. For instance:
Customer should follow the instructions on the Guide (step 2) and check the MX25U25645G Datasheet for the correct values on all the parameters.4) After the customer has created their OQSPI Flash driver, they should follow the next steps to integrate it into our SDK:
1) Get a clean version of the SDK v10.2.6.49.2) Place the oqspi_mx25u256.h in the following path: ...\SDK-10.2.6.49x\sdk\bsp\memory\include
3) Modify the oqspi_memory_config_table_internal.h file:3a) Include the driver header file 3b) Add the configuration object as shown below:
#ifndef OQSPI_FLASH_CONFIG_TABLE_INTERNAL_H_ #define OQSPI_FLASH_CONFIG_TABLE_INTERNAL_H_ #include "oqspi_mx25u6432.h" #include "oqspi_w25q64jwim.h" #include "oqspi_w25q256jwiq.h" #include "oqspi_mx25u256.h" const oqspi_flash_config_t* oqspi_memory_config_table[] = { &oqspi_mx25u6432_cfg, &oqspi_w25q64jwim_cfg, &oqspi_w25q256jwiq_cfg, &oqspi_mx25u256_cfg, }; #endif /* OQSPI_FLASH_CONFIG_TABLE_INTERNAL_H_ */
4) Include the following projects: python_scripts, uartboot, cli_programmer, libbo_crypto, libmkimage, libprogrammer, mkimage. Please make sure you built all these projects (except the python_scripts) and then you should be able to test the MX25U25645G driver.
5) In order to add the option for this device on the program_oqspi_config launcher, customer will have to go on python_scripts folder:
And add the correct configuration for the MX25U25645G. The correct configuration should be taken from DA1470x Datasheet, on Table 885: OQSPIF_BURST_CMDA_REG, Table 886: OQSPIF_BURST_CMDB_REG, Table 899: OQSPIF_CTR_CTRL_REG and based on the MX25U25645G datasheet.