DA14695 Add support of flash chip

⚠️
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.
10 posts / 0 new
Last post
is
Offline
Last seen:2 weeks 6 hours ago
加入:2016-08-25 06:50
DA14695 Add support of flash chip

Hi, support!

I use DA14695 chip + SDK_10.0.8.105.

Some time ago I tried to add unsupported memory chip to sdk, and now I have couple questions for you.
I wrote correct header for my flash chip (W25Q64FWXGIG) then successfully built uartboot firmware. I did some tests using the SmartSnippets Toolbox, all seemd fine.

But further I faced with problems when I tried to upload firmware to target processor (flash chip). Earlier, I used DA1468x processors, and I decide that problem is in missing cli_programmer.ini file. I copied it to sdk/binary catalogue, then tried again - firmware was successfully uploaded. I thought that problem is gone, but it still remain. Now I can`t upload firmware to flash without previous full erase of flash chip (using erase_qspi_jtag script from the studio). If I erased chip first and then tried to upload firmware - mostly, process ends successfully. Is there any specific settings in .ini file for case of DA14695? Why when I tried to use flash from the Toolbox, it uses correct uartboot.bin, but when from the Studio is not? My cli_programmer.ini file is in attach (just change extension of file to .ini). Please help me.

Thanks in advance,

Stepanov Ivan

Device:
PM_Dialog
Offline
Last seen:31 min 47 sec ago
Staff
加入:2018-02-08 11:03
Hi Ivan,

Hi Ivan,

Thanks for your question. Let me check it and I’ll get back to you.

Could you re-attach the pdf document because I am not able to open it?

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen:31 min 47 sec ago
Staff
加入:2018-02-08 11:03
Hi Ivan,

Hi Ivan,

Additionally, please provide the following clarifications.

If I understood correctly from what you mentioned, the problem exists in DA1469x and only when trying to program the QSPI flash (W25Q64FWXGIG) through the SmartSnippets Studio (SSS). Is that correct? What is the version of the SSS?

You mentioned that :

"Now I can`t upload firmware to flash without previous full erase of flash chip (using erase_qspi_jtag script from the studio). If I erased chip first and then tried to upload firmware - mostly, process ends successfully."

So, if the erase_qspi_jtag script has been executed, then you can execute the program_qspi_jtag script and the device boots correctly. Is my understanding correct?

What is the message that is appeared if you execute the program_qspi_jtag without executing the erase_qspi_jtag script?

Thanks, PM_Dialog

is
Offline
Last seen:2 weeks 6 hours ago
加入:2016-08-25 06:50
Hi,

Hi,

1. "If I understood correctly from what you mentioned, the problem exists in DA1469x and only when trying to program the QSPI flash (W25Q64FWXGIG) through the SmartSnippets Studio (SSS). Is that correct? What is the version of the SSS?"

- Yes, you are right, problem exists only on DA14695 + W25Q64FWXGIG + SSS yet. Version of SSS is 2.0.12.1622 (win7);

2. "So, if the erase_qspi_jtag script has been executed, then you can execute the program_qspi_jtag script and the device boots correctly. Is my understanding correct?"

- Yes, it is;

3. "What is the message that is appeared if you execute the program_qspi_jtag without executing the erase_qspi_jtag script?"

- Here is some log from console:

........................................................................................................................
..
.. PROGRAM QSPI
..
........................................................................................................................
.
........................................................................................................................
..
.. Programming image
..
........................................................................................................................
cli_programmer 1.26
Copyright (c) 2015-2019 Dialog Semiconductor

Configuration from E:\Projects\Active_Projects\Moby.DA1469x\SDK\binaries\cli_programmer.ini file loaded.
Uploading boot loader/application executable...
Executable uploaded.

Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Writing to address: 0x00002000 offset: 0x00000000 chunk size: 0x00002000
Verify writing to qspi address 0x2000 failed. Retrying ...
Write to qspi failed. Abort.

write to QSPI failed: unknown error (-300)

.
........................................................................................................................
. ERROR:
. cli_programmer.exe" has exited with code: 1
.
. call: "E:\Projects\Active_Projects\Moby.DA1469x\SDK\binaries\cli_programmer.exe" --cfg C:\Users\Ivan\AppData\Local\Temp\tmpu48vidhc --check-booter-load --no-kill gdbserver write_qspi 8192 C:\Users\Ivan\AppData\Local\Temp\tmpg67lr5ul
........................................................................................................................
.
.
........................................................................................................................
..
.. FINISHED
..
........................................................................................................................

4. Here is content of my cli_programmer.ini file:

-----------------------------------------------------------------------------------------

;This is a cli_programmer configuration file.

[cli]
initial_baudrate = 57600
timeout = 5000
bootloader_fname = E:\Projects\Active_Projects\Moby.DA1469x\SDK\binaries\uartboot.bin

[uartboot]
baudrate =
tx_port =
tx_pin =
rx_port =
rx_pin =

[gdb server]
port = 2331
host_name = localhost
gdb_server_path = "C:\Program Files (x86)\SEGGER\JLink_V644f\JLinkGDBServerCL.exe" -if SWD -device Cortex-M0 -singlerun -silent -speed auto -select -port 2331 -swoport 2332 -telnetport 2333 -log jlink.log
no_kill_mode = 0

[bin2image]
chip_rev =

[target reset]
target_reset_cmd =

-------------------------------------------------------------------------

Thanks in advance

PM_Dialog
Offline
Last seen:31 min 47 sec ago
Staff
加入:2018-02-08 11:03
Hi Ivan,

Hi Ivan,

The program_qspi_jtag script will do the following: First, it will “Erase sector”, then it will “Program sector”, and finally will do the whole flash verification.

Since you can erase (erase_qspi_jtag) the QSPI Flash, and then you can program it (program_qspi_jtag) properly, we suspect that the most probable reason might be due to erase sector step. When executing the erase_qspi_jtag script, the erase chip will take place and it will erase the whole flash, so after that it expected that you can program it.

To do so, could you please check the “erase sector” command in your flash driver? Is it according to the datasheet?

Probably it might be like.erase_opcode = CMD_SECTOR_ERASEin the QSPI flash configuration structure.

Additionally, you can do the following as a test:

  • Erase the flash - (erase_qspi_jtag)
  • Program the flash with a working firmware – (program_qspi_jtag)
  • 验证执行代码正确- device boot after HW reset
  • Then, open the cli_programmer - can be found under SDK_10.0.8.105\binaries path
  • Open a terminal and try to erase a flash sector - ( erase_qspi)
  • Please type cli_programmer –h for help
erase_qspi 
erases bytes of QSPI flash starting at
note: actual area erased may be different due to size of erase block

Thanks, PM_Dialog

is
Offline
Last seen:2 weeks 6 hours ago
加入:2016-08-25 06:50
Hi, PM_Dialog

Hi, PM_Dialog

Thanks for your reply.

I checked my flash description, and all seems fine. All ocodes are correct and equals values from datasheet. Problem still exists.

One important moment, as basis I used existing winbond description file from sdk (w25q32fw), and just do some corrections (at least size). Other opcodes are the same.

And one more, sometimes I can upload firmware two or three times, but I think this is because of firmware file is the same at all cases.

Regards, Ivan.

PM_Dialog
Offline
Last seen:31 min 47 sec ago
Staff
加入:2018-02-08 11:03
Hi Ivan,

Hi Ivan,

Does the same problem exist when using the CLI programmer? Did you try to perform chip erase, sector erase and program it through the CLI?

Thanks, PM_Dialog

is
Offline
Last seen:2 weeks 6 hours ago
加入:2016-08-25 06:50
Hi PM_Dialog,

Hi PM_Dialog,

Sorry, I missed that. I`ll do this tests as soon as possible.

Thanks for your help, Ivan.

PM_Dialog
Offline
Last seen:31 min 47 sec ago
Staff
加入:2018-02-08 11:03
Hi Ivan,

Hi Ivan,

No problem - please get back to me with the results. Waiting for feedback!

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen:31 min 47 sec ago
Staff
加入:2018-02-08 11:03
Hi Ivan,

Hi Ivan,

Could you please let us know if there is any progress on this?

Thanks, PM_Dialog