DA14585 extern flash error

Due to the shortage of chips, the original use of da14586 was changed to da14585, so it is necessary to add an additional flash chip. then, according to the resources of the pins out of 586, the four pins of spi are defined as: P0_4, p3_0,p0_5, p1_1, CLK,EN,DI,DO. Then, when the board comes back, it is found that the board can be connected to toolbox, but an error occurs when executing erase or other instructions that operate memory: SPI memory erasing error. I tried to change the pin definition and flash_programmer.bin in toolbox, but it didn't work, so what I want to ask is, how can I solve this problem?

Thank you.

  • Hi Leven Tao, 

    Thanks for your question. I have replied to you on this RULZ thread : https://renesasrulz.com/wireles-connectivity/f/bluetooth-low-energy/28432/spi-memory-erasing-error

    Can you please indicate the flash part number that you are using? 

    Here is the list of our supported flashes : www.renesas.com/.../b-088-da145xx-flash-selector-guide

    Please note that the DA14585 booting from an external SPI slave is step 6 according to the Boot-ROM sequence and the device boots from these pins : 

    If you need to boot from different SPI pins, you will need to write a secondary bootloader. 

    Would it be possible to use the highlighted pins from the SPI FLash? 

    Please also post your reply in English. 



  • Hi PM_Renesas,

    Thank you for you reply, pins are occupied by other functions, so I can only use these pins for the time being. What code do I need to modify if I want to modify secondary bootloader?

  • the Flash that we uesd is P25Q11U.

  • Hi PM_Renesas

    Another question is, when I use toolbox to connect and try to erase programs inside 585, will toolbox also call secondary bootloader's code? I didn't see the relevant information in toolbox's log.

    I only see that toolbox download the jtag_programmer,bin into the chip.

  • Hi Leven Tao,

    The P25Q11U is supported by the flash_programmer project - please check spi_flash.h file.  

    : \\utilities\flash_programmer

    The SST does not support any flashing capabilities. When clicking into the ‘Connect’ button from the Flash Programmer, a small FW is downloaded to the target device in order to program the flash with the application FW. That small fw is generated from the flash_prgrammer project and enables and initiates the flashing procedure. It is the jtag_programmer.bin in the case of the JTAG.

    So, since the P25Q11U is already included, there is no need to modify the flash_programmer.

    I see that you are using a very old SmartSnippets Toolbox (SST) version and I am not sure if it contains the updated jtag_programmer.bin. I would strongly recommend using the latest SST version which can be found on that webpage: https://www.renesas.com/eu/en/software-tool/smartbond-development-tools


    As mentioned, the DA14585 boot from standard SPI pins. To do so, you will need to modify the OTP Header in order to boot other ones. Please check datasheet, 4.3.1 OTP Header : https://www.renesas.com/us/en/document/dst/da14585-datasheet?language=en&r=1600291


    You should configure the OTP Header with your custom pins. OTP stands for One Time Programmable, so I would suggest having a couple of samples to test this.

    Best regards,


  • Ok, thanks a lot, I'll test with you method.

  • hi PM_Renesas

     when I modified the jtag_programmer.bin, I found there are some parameters that I didn't know, like that

    Is it necessary to set these parameters? if necessary, how do I know the right value with my flash chip?

    In addition, I found that sdk6.0.16 contains the flash chip I use, and the flash chip can be recognized and erased using the latest toolbox, but what should I do if I want to successfully use this flash in the current toolbox(version 5.0.10)?

    thanks a lot.

  • Hi Leven Tao, 

    Since you are using the SDK6.0.16, there is no need to modify the flash_programmer as the specific flash part number is already supported. 

    For the SST v5.0.10, you should navigate to the installation path and replace the jtag_programmer.bin with the generated one from the SDK6.0.16 flash_programmer project. 

    I would strongly recommend NOT using the SST v5.0.10 as it's no longer supported. We support the latest SST version. 

    Best regards, 


  • hi PM_Renesas

    I put the SDK6.0.16 jtag_programmer.bin into SST v5.0.10's installation path and replace the same name file, but it still doesn't work, and log"SPI memory erasing failed.". The same circuit board can be burned and erased normally on sst 5.0.20. So is that the old version of sst does not support the latest version of bin file code?

     why I try to use sst v5.0.10 here, because it would be better to change only one bin file to make the function normal. We also use python to call some functions of sst, so if we change the version of sst, it may lead to more modifications to our python code.

  • Hi PM_Renesas

    I found another issue that like this

    I burned the bin file into the chip and found that the code was not consistent with the burned file.As shown in the picture, on the right is the burned file, and on the left is the data inside the chip after burning. You can see that it is basically inconsistent. Then I export the data on the left to check and find that the data is not consistent until after 0x1f000, and after 0x1f000 is the address of the second img file. What is the cause of this problem?