Skip to main content

SmartSnippets Toolbox won't program SPI Flash

3 months ago

SmartSnippets Toolbox won't program SPI Flash

Posted byandrewl2 points 3 replies
0 upvotes

Hi, folks,

I have a custom board that we've designed and been checking out. I can boot the DA14531 to RAM using either Keil SWD via my Segger J-Link or SmartSnippets Toolbox 1-Wire UART. It works fine.

The problem is that I can't get the SmartSnippets Toolbox v5.0.14.3080 to program the SPI flash. It fails with "[ERROR General @21-01-24 22:39:22] No known chip found while opening JLink connection. Terminating proccess...". This makes no sense as the chip programs via Keil SWD just fine.

I do note that the Max Clock is a bit ... fiddly. I get an IDCODE reliably at 500KHz, but never at 1MHz. I find that the IDCODE sometimes works at 2MHz and always works at 5MHz (that's kind of weird).

Edit: I have verified this behavior on 2 other boards. Keil is fine. UART is fine. SmartSnippets is not.

Presumably, the problem is that SmartSnippets Toolbox isn't setting the Max Clock correctly. How do I set this?

Error log below.

Thanks.

[INFO General @21-01-24 22:39:22] Found SW-DP with ID 0x0BC11477 [INFO General @21-01-24 22:39:22] Scanning AP map to find all available APs [INFO General @21-01-24 22:39:22] AP[1]: Stopped AP scan as end of AP map has been reached [INFO General @21-01-24 22:39:22] AP[0]: AHB-AP (IDR: 0x04770031) [INFO General @21-01-24 22:39:22] Iterating through AP map to find AHB-AP to use [INFO General @21-01-24 22:39:22] AP[0]: Core found [INFO General @21-01-24 22:39:22] AP[0]: AHB-AP ROM base: 0xE00FF000 [INFO General @21-01-24 22:39:22] CPUID register: 0x410CC601. Implementer code: 0x41 (ARM) [INFO General @21-01-24 22:39:22] Found Cortex-M0 r0p1, Little endian. [INFO General @21-01-24 22:39:22] FPUnit: 4 code (BP) slots and 0 literal slots [INFO General @21-01-24 22:39:22] CoreSight components: [INFO General @21-01-24 22:39:22] ROMTbl[0] @ E00FF000 [INFO General @21-01-24 22:39:22] ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS [INFO General @21-01-24 22:39:22] ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT [INFO General @21-01-24 22:39:22] ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB [ERROR General @21-01-24 22:39:22] No known chip found while opening JLink connection. Terminating proccess... [ERROR SPI Flash @21-01-24 22:39:22] Failed downloading firmware file to the board.

3 months ago

PM_Dialog

Hi andrewl,

Thanks for your question online and for your interest in our BLE solutions.

For the JTAG, I assume that you are using any of the Dialog DK same as the procedure described below :

http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/debug_probe.html

In case of the SmartSnippets Toolbox(SST), are you trying to download firmware to the SPI Flash though UART or JTAG?

What are the pins that the SPI is connected to the DA14531? Make sure that proper pins have been configured – see below :

http://lpccs-docs.dialog-semiconductor.com/UM-B-083/tools/Board_Setup.html

Additionally, what is the version of the SST?

The following document describes the different booting options and how the chip can boot form FLASH :

//www.xmece.com/sites/default/files/an-b-072-da14531_booting_options_v1.5.pdf

Thanks, PM_Dialog

3 months ago

andrewl 2 points

For the JTAG, I assume that you are using any of the Dialog DK same as the procedure described below :

Effectively. I'm using an actual Segger J-Link Base instead of the DA145xx Development Kit but it's supposedly the same thing.

In case of the SmartSnippets Toolbox(SST), are you trying to download firmware to the SPI Flash though UART or JTAG?

JTAG (SWD actually) only.

What are the pins that the SPI is connected to the DA14531? Make sure that proper pins have been configured – see below :

You are putting the cart before the horse. The SST doesn't even detect an MCU that it can download the SPI bridge firmware to so the SPI pins don't even matter yet.

I have, however, verified the SPI connections. I have also tested the SPI by running autodetect from spi_flash.h directly in the DA14531. SPI_CS is on P0_1. SPI_MOSI is on P0_0. SPI_MISO is on P0_3. SPI_SCK is on P0_4. These are the connections required by the boot system, no?

Additionally, what is the version of the SST?

As I said in my original post: SmartSnippets Toolbox v5.0.14.3080.

Thanks.

3 months ago

PM_Dialog

Hi andrewl,

> > >对海温甚至不检测的单片机it can download the SPI bridge firmware to so the SPI pins don't even matter yet.

Would it be possible to share screenshots from the SST with the procedure you are fowling?

>>> I have, however, verified the SPI connections. I have also tested the SPI by running autodetect from spi_flash.h directly in the DA14531. SPI_CS is on P0_1. SPI_MOSI is on P0_0. SPI_MISO is on P0_3. SPI_SCK is on P0_4. These are the connections required by the boot system, no?

It is correct – this is the Step #1 (Boot from ext SPI Master) from the Booting Sequence :

//www.xmece.com/sites/default/files/an-b-072-da14531_booting_options_v1.5.pdf

Thanks, PM_Dialog