How can we let SmartSnippets Toolbox turn off HW_RESET, or otherwise customize the jtag_programmer.bin ?
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.
jtag_programmer.bin
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.
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.
[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
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.
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
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.
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.
Fail write 16384 bytes at offset 0x00
Memory burning failed.
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.