In program using flash DA14531MOD missing P25Q11U_DEV_INDEX

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
7 posts / 0 new
Last post
lecarter190
Offline
Last seen:5 months 1 week ago
加入:2020-02-27 18:00
In program using flash DA14531MOD missing P25Q11U_DEV_INDEX

I am trying to read/write configuration data to the flash in my program. The configuration data is a 512 uint16_t array. I am following the "Using SDK6 Peripheral Drivers" doc. I tried to change the flash configuration to the on-board P25Q11U device on-board the module. The P25Q11U_DEV_INDEX is missing from the enum in spi_flash.h of known devices.

I have included spi_flash.c and spi_531.c drivers.

Is there a specific 14531MOD example or documentation I can follow or a different driver I am missing?

Thank you,

Larry

lecarter190
Offline
Last seen:5 months 1 week ago
加入:2020-02-27 18:00
Should have included I am

Should have included I am using SDK 6.0.14.1114 and the DA14531DIAKT.

lecarter190
Offline
Last seen:5 months 1 week ago
加入:2020-02-27 18:00
我跟inued assuming the

我跟inued assuming the P25q11u is the same as the P25Q10U, I get the SPI_FLASH_ERR_WEL_ERROR error when I try a flash errase.

I also tried:

static const spi_flash_cfg_t spi_flash_cfg = {
.dev_index = P25Q10U_DEV_INDEX,
.jedec_id = P25Q11U_JEDEC_ID,
.chip_size = P25Q11U_CHIP_SIZE,
};

I added the following as recommended by the "DA14585/586 interfacing with external memory" application note for P25Q10U.

spi_set_bitmode(SPI_MODE_8BIT);
spi_transaction(0x06); //Write enable
spi_set_bitmode (SPI_MODE_16BIT);
//Write 00 to the status register, this disables all memory protection bits
spi_transaction(0x01 << 8);

Still the same error.

Thanks,

Larry

PM_Dialog
Offline
Last seen:5 days 11 hours ago
Staff
加入:2018-02-08 11:03
Hi lecarter190,

Hi lecarter190,

Thanks for your question. Please check out the SPI Flash SDK example : 6.0.14.1114\projects\target_apps\peripheral_examples\spi\spi_flash

This example aims to demonstrate how to perform the basic read/write functionalities. Just build the Keil project for DA14531 configuration and program the module. Additionally, the example sis using the UART ( UTX on P06), so place a jumper on J1.UTX to see the logging info on a serial terminal. The P25Q10U_DEV_INDEX is added on known_spi_devs_list[] structure and it is OK to interact with the on-module flash.

Thanks, PM_Dialog

lecarter190
Offline
Last seen:5 months 1 week ago
加入:2020-02-27 18:00
Thanks,

Thanks,

The example does work, I will go thru it and see what I am missing in my code. I still don't see the Index for the 11U chip, but it works as coded.

Again,

Thanks

lecarter190
Offline
Last seen:5 months 1 week ago
加入:2020-02-27 18:00
Got it, I am using the

Got it, I am using the DA14531MOD and forgot to Reserve and GPIO_Configure the internal pins to the flash. Out of sight, out of mind.

Again,

Thanks

PM_Dialog
Offline
Last seen:5 days 11 hours ago
Staff
加入:2018-02-08 11:03
Hi lecarter190,

Hi lecarter190,

Glad that you got it working and thanks for accepting my answer.

Thanks, PM_Dialog