Unable to program the SPI Flash on DA14531 module

⚠️
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 https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
tsgowtham
Offline
Last seen: 1 year 4 months ago
Joined: 2020-05-04 12:39
Unable to program the SPI Flash on DA14531 module

Hi,

I have a custom PCB which uses the DA14531 module. I'm able to run my program on the SysRAM using Keil. But I get the following error when I try to program or erase the SPI Flash on the module using the SmartBond Flash Programmer tool.

[INFO    General          @20-09-15 19:07:20] BTLE device selected.
[INFO    SPI Flash        @20-09-15 19:07:20] Firmware File D:\DiaSemi\SmartBondFlashProgrammer1.0.4\common_resources\SupportPackages\DA1453x\toolbox_resources/common/jtag_programmer.bin has been selected for downloading.
[INFO    SPI Flash        @20-09-15 19:07:21] Successfully configured SPI ports and pins.
[INFO    SPI Flash        @20-09-15 19:07:21] Successfully downloaded firmware file to the board.
[INFO    SPI Flash        @20-09-15 19:07:21] Started erasing from 0x00 to 0x3FFFF (64 sectors)
[ERROR   SPI Flash        @20-09-15 19:07:21] Failed erasing memory.
[INFO    General          @20-09-15 19:07:22] BTLE device selected.
[INFO    SPI Flash        @20-09-15 19:07:23] Firmware File D:\DiaSemi\SmartBondFlashProgrammer1.0.4\common_resources\SupportPackages\DA1453x\toolbox_resources/common/jtag_programmer.bin has been selected for downloading.
[INFO    SPI Flash        @20-09-15 19:07:23] Successfully configured SPI ports and pins.
[INFO    SPI Flash        @20-09-15 19:07:23] Successfully downloaded firmware file to the board.
[INFO    SPI Flash        @20-09-15 19:07:23] Adding bootable header.
[INFO    SPI Flash        @20-09-15 19:07:23] Started erasing from 0x00 to 0x5FFF (6 sectors)
[ERROR   SPI Flash        @20-09-15 19:07:24] Adddittional error info at JTAG address 0x7FC3C0C. (MSB first): FF FF FF F8.
[ERROR   SPI Flash        @20-09-15 19:07:24] Fail write 16384 bytes at offset 0x00
[ERROR   SPI Flash        @20-09-15 19:07:24] Failed burning memory.

The custom board has 4 pins for programming, SWCLK, SWDIO, GND and 3V and all these pins are connected to the motherboard of the Pro-DK. I have seen this issue on 2 custom PCBs, so it does not seem to be an issue due to a faulty module. What could be causing this issue?

Thanks

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

Thanks for your question. I assume that the SWD connections between the Pro-Dk and your custom board is correct, as you can program the System-RAM.

However, could you please check if you have the same jumper’s configuration as the attached image?

Can you detect the JTAG ID in the Flash Programmer?

You mentioned that you have seen this issue on 2 custom boards, so can you program the flash of your rest boards? Do you have any spare board to try it?

You should remove the Daughter Board Module from the Pro-DK too.

If your custom board already has a power supply, battery for instance, the 3V3 (red line) is not required.

In addition to, it is recommended to use good quality jumper wires.

Thanks, PM_Dialog

Attachment: 
tsgowtham
Offline
Last seen: 1 year 4 months ago
Joined: 2020-05-04 12:39
Hi PM_Dialog,

Hi PM_Dialog,

I reacreated the exact jumper configuration which you have provided and I'm still facing this issue. I am able to detect the JTAG ID in the flash programmer and all my attempts at programming the Flash was with the daughter board removed. I doubt I'll be able to get my hands on few more boards to try this for now. My board currently does not have another power supply and I believe that the jumpers are of good quality. I did try another pair of jumpers just to be sure and it didn't work with those too. The custom firmware jtag_programmer.bin does get loaded, so I doubt it's an issue with the jumper cables.

One thing I would like to clarify is if it is ok to use P0_0 as a normal GPIO? P0_0 is connected to a sensor on my PCB but the line should not be set or reset till my program starts running. I have verified that I'm able to program the flash on the Daughterboard with the same sensor connected with the same pinout.

Thanks

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

You mentioned that you are using a custom firmware jtag_programmer.bin. To do so, I would strongly recommend using the default jtag_programmer.bin. – as it is within the Flash Programmer Tool.

If you check the log file, you will see that the flashing procedure is done correctly :

[INFO    SPI Flash        @20-09-15 19:07:23] Firmware File D:\DiaSemi\SmartBondFlashProgrammer1.0.4\common_resources\SupportPackages\DA1453x\toolbox_resources/common/jtag_programmer.bin has been selected for downloading.

[INFO    SPI Flash        @20-09-15 19:07:23] Successfully configured SPI ports and pins.

[INFO    SPI Flash        @20-09-15 19:07:23] Successfully downloaded firmware file to the board.

Then the erase procedure takes place which is not succeeded.

So, please try to use the default jtag_programmer.bin.

Thanks, PM_Dialog

tsgowtham
Offline
Last seen: 1 year 4 months ago
Joined: 2020-05-04 12:39
Hi PM_Dialog,

Hi PM_Dialog,

I think you misunderstood what I meant or I should have phrased it a bit better. I am using the default  jtag_programmer.bin provided in the Flasher tool. I don't even know how the jtag_programmer firmware works, so the last thing I would be doing is to modify it. 

Also, just pointing to it again, but can you please take a look at my last post about the P0_0 pin?

Thanks

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

In the DA14531MOD, the P0_0  is connected to the internal flash as well -  it is the MOSI signal. That might cause trouble.

For the programming you need the MOSI as well. If the external sensor blocks the signal, then programming is not possible.

Would it be possible to put the sensor into another GPIO to test it?

Additionally, you should ensure that the external sensor does not interfere with MOSI at the booting time.

Thanks, PM_Dialog

tsgowtham
Offline
Last seen: 1 year 4 months ago
Joined: 2020-05-04 12:39
Hi PM_Dialog,

Hi PM_Dialog,

I desoldered the DA14531 module from the PCB and was able to program the module's Flash using jumper attached to the pads. So I guess the isue was due to P0_0 being connected to the sensor.

Thanks

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi tsgowtham,

Hi tsgowtham,

Yes, probably the sensor connected to P0_0 was blocking the programming, so I would recommend to connect it to another GPIO.

Thanks, PM_Dialog