DA14531 (WLCSP17) Cannot flash external SPI (or read OTP) - Failed clearing memory address 7FC3C08. Failed configuring SPI ports and pins.

Question

How can we let SmartSnippets Toolbox turn off HW_RESET, or otherwise customize the jtag_programmer.bin ?

Context

We have been able to run our firmware (based on the ble_app_example, for SDK version: 6.0.14.1114) using Keil - so we know we can program the RAM fine.

However, once we try and use our external SPI flash we run into an error.

Looking at the scope traces of the chips Boost voltage (BAT_HIGH), we believe it is because the HW_RESET is left enabled, the voltage boosts from 1.8V to 3V for 10ms before crashing to the supply of 1.5V and then raising back to 1.8V.

We were able to fix this issue (when running from RAM) by adding the following to the start of our code: 

GPIO_Disable_HW_Reset();

 But now we are seeing the same behaviour in our boost voltage when programming with SmartSnippets, we think this is because the jtag_programmer.bin (that is flashed first) needs modifying in the same way.

We have a custom board where we are reusing various pins, due to pin constrains we cannot turn on the SPI flash via a GPIO, but are using a suitable configuration to be under the 50uA limit for the BAT_HIGH pin.

DA14531 Pin Assigned Pin
P0_4 SPIB_SCK
P0_1 SPIB_CS
P0_3 SPIB_MISO
P0_0 / RST SPIB_MOSI
P0_5 SWDIO (JTAG)
P0_2 SWCLK (JTAG)


However when trying to use the SmartSnippets Toolbox or command line we run into the following

[ERROR   SPI Flash Programmer@23-03-21 12:13:20] Failed reading memory at address 0x7FC3C08.
[WARNING SPI Flash Programmer@23-03-21 12:13:20] Failed configuring SPI ports and pins.

Command line arguments used (powershell)

& 'C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\SmartSnippetsToolbox.exe' -type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 601004718 -cmd write -offset 0x0000 -file "C:\Projects\da14531-firmware\Keil_5\out_DA14531\Objects\fwa_531.bin" -max 0x400000 -firmware "C:\Projects\da14531-firmware\sdk\config\toolbox_resources\DA1453x\common\jtag_programmer.bin" -bootable
Full Output:
Launching SmartSnippets Toolbox v5.0.22.4084
Loaded the following properties from C:\Users\CDP\SmartSnippetsToolbox\properties.txt
{ENABLE_HIDDEN_TOOLS=true, ENABLE_TS=true, ENABLE_MP=false, ENABLE_TE=true}
Command line arguments:
-type spi -chip DA14531 -clk P0_4 -cs P0_1 -miso P0_3 -mosi P0_0 -jtag 601004718 -cmd write -offset 0x0000 -file C:\Projects\da14531-firmware\Keil_5\out_DA14531\Objects\fw_531.bin -max 0x400000 -firmware C:\Projects\da14531-firmware\sdk\config\toolbox_resources\DA1453x\common\jtag_programmer.bin -bootable
Found SW-DP with ID 0x0BC11477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770031)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p1, Little endian.
FPUnit: 4 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
BTLE device selected.
Found SW-DP with ID 0x0BC11477
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Found Cortex-M0 r0p1, Little endian.
FPUnit: 4 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Firmware File C:\Projects\da14531-firmware\sdk\config\toolbox_resources\DA1453x\common\jtag_programmer.bin has been selected for downloading.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Successfully downloaded firmware file to the board.
Using default baudrate: 115200 Bd.
Added bootable header to image.
Started burning memory with 20764 bytes of data at address 0x00000.
Failed clearing memory address 7FC3C08.
Failed configuring SPI ports and pins.
Failed clearing memory address 7FC3C08.
Fail write 16384 bytes at offset 0x00
Memory burning failed.


Update 2023/03/22 

When using the SmartSnippets toolbox (GUI) I am also unable to read the OTP memory. I can confirm I am able to use the GUI tool to read the OTP memory of the devboard kit.

Parents
  • Hi There,

    Thank you for posting your question online.
    Can you share the external SPI Flash you are working on? You can find the supported SPI Flash modules for DA14531 on the AN-B-088 document:AN-B-088: DA145xx Flash Selector Guide (renesas.com)
    You should also refer to the AN-B-072 document: AN-B-072: DA14531 Booting from OTP and Serial Interfaces (renesas.com)
    On chapter 4.Booting Sequence and Booting Pins you can find this table:

    The pins you have selected are for SPI slave. If you want to use a combination of pins not highlighted on this table you should configure the secondary_bootloader or you should burn the OTP System Preferences header accordingly.
    The PIN configuration you have selected, is the default one. So you do not need to configure the SPI pins via CLI.
    Can you please try a CLI command on the powershell that would look like this:

    SmartSnippetsToolbox.exe -type spi -chip DA14531 -jtag JTAG_ID -firmware "jtag_programmer_531.bin" -cmd write -file *bin/hex file location" -verify


    Your JTAG pins are correct according to the DA14531 Datasheet, since you were able to download from the Keil IDE to the DA14531 RAM as well.


    Kind Regards,
    OV_Renesas

  • We are currently using: AT25DF041B-UUN-T, which appears to not be in the list of supported modules listed (Are you able to share why that might be the case?). 

    Here is the output of the command suggested (note: I had to manually enter Y for a bootable SPI)

    & 'C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\SmartSnippetsToolbox.exe' -type spi -chip DA14531 -jtag 601004718 -cmd write -file "C:\Projects\da14531-firmware\Keil_5\out_DA14531\Objects\fw_531.bin" -firmware "C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\common_resources\SupportPackages\DA1453x\toolbox_resources\common\jtag_programmer_531.bin" -bootable -verify
    
    Launching SmartSnippets Toolbox v5.0.22.4084
    Loaded the following properties from C:\Users\CDP\SmartSnippetsToolbox\properties.txt
    {ENABLE_HIDDEN_TOOLS=true, ENABLE_TS=true, ENABLE_MP=false, ENABLE_TE=true}
    Command line arguments:
    -type spi -chip DA14531 -jtag 601004718 -cmd write -file C:\Projects\da14531-firmware\Keil_5\out_DA14531\Objects\fw_531.bin -firmware C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\common_resources\SupportPackages\DA1453x\toolbox_resources\common\jtag_programmer_531.bin -bootable -verify
    Found SW-DP with ID 0x0BC11477
    Scanning AP map to find all available APs
    AP[1]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x04770031)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    BTLE device selected.
    Found SW-DP with ID 0x0BC11477
    AP map detection skipped. Manually configured AP map found.
    AP[0]: AHB-AP (IDR: Not set)
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Firmware File C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\common_resources\SupportPackages\DA1453x\toolbox_resources\common\jtag_programmer_531.bin has been selected for downloading.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    T-bit of XPSR is 0 but should be 1. Changed to 1.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Successfully downloaded firmware file to the board.
    Using default baudrate: 115200 Bd.
    Do you want SPI Flash memory to be bootable? ([Y / N]?)
    Y
    Added bootable header to image.
    Started burning memory with 21396 bytes of data at address 0x00000.
    Failed clearing memory address 7FC3C08.
    Failed configuring SPI ports and pins.
    Failed clearing memory address 7FC3C08.
    Fail write 16384 bytes at offset 0x00
    Memory burning failed.

Reply
  • We are currently using: AT25DF041B-UUN-T, which appears to not be in the list of supported modules listed (Are you able to share why that might be the case?). 

    Here is the output of the command suggested (note: I had to manually enter Y for a bootable SPI)

    & 'C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\SmartSnippetsToolbox.exe' -type spi -chip DA14531 -jtag 601004718 -cmd write -file "C:\Projects\da14531-firmware\Keil_5\out_DA14531\Objects\fw_531.bin" -firmware "C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\common_resources\SupportPackages\DA1453x\toolbox_resources\common\jtag_programmer_531.bin" -bootable -verify
    
    Launching SmartSnippets Toolbox v5.0.22.4084
    Loaded the following properties from C:\Users\CDP\SmartSnippetsToolbox\properties.txt
    {ENABLE_HIDDEN_TOOLS=true, ENABLE_TS=true, ENABLE_MP=false, ENABLE_TE=true}
    Command line arguments:
    -type spi -chip DA14531 -jtag 601004718 -cmd write -file C:\Projects\da14531-firmware\Keil_5\out_DA14531\Objects\fw_531.bin -firmware C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\common_resources\SupportPackages\DA1453x\toolbox_resources\common\jtag_programmer_531.bin -bootable -verify
    Found SW-DP with ID 0x0BC11477
    Scanning AP map to find all available APs
    AP[1]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x04770031)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    BTLE device selected.
    Found SW-DP with ID 0x0BC11477
    AP map detection skipped. Manually configured AP map found.
    AP[0]: AHB-AP (IDR: Not set)
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    Found Cortex-M0 r0p1, Little endian.
    FPUnit: 4 code (BP) slots and 0 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Firmware File C:\Program Files\SmartSnippetsToolbox\SmartSnippetsToolbox5.0.22\common_resources\SupportPackages\DA1453x\toolbox_resources\common\jtag_programmer_531.bin has been selected for downloading.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    T-bit of XPSR is 0 but should be 1. Changed to 1.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Successfully downloaded firmware file to the board.
    Using default baudrate: 115200 Bd.
    Do you want SPI Flash memory to be bootable? ([Y / N]?)
    Y
    Added bootable header to image.
    Started burning memory with 21396 bytes of data at address 0x00000.
    Failed clearing memory address 7FC3C08.
    Failed configuring SPI ports and pins.
    Failed clearing memory address 7FC3C08.
    Fail write 16384 bytes at offset 0x00
    Memory burning failed.

Children
No Data