⚠️
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.
12 posts / 0 new
Last post
joachimkr
Offline
Last seen: 4 months 3 weeks ago
Joined: 2018-07-06 08:58
Building a flash-booted custom board

Hello, valued Dialog staff members!

I developed an application, running on a DA14531, which drives an SPI connected device. All operations work fine, the Bluetooth BLE functions also work, I can connect and get notifications on value changes.

All software fuctions are developed using Keil and are running from device RAM.

Now, I want to go into production on the easiest path: Using an identical schematic as your pro development kit, but stripped down. So I want the exact same SPI flash, connected to the DA14531 for booting my software. The target hardware blocks are the DA14531, the foreign SPI device with all it's stuff and an SPI flash from Macronix. SPI shall be like a bus, with distinct chip select signals. I will use the larger pinout version of the DA14531. 

On the daughter board, there is a connector, unpopulated. I understand, this is a 'common' layout for connecting to programmer tools. Following questions arise:

- can I program the development board's flash device, therefore testing the boot ? What steps are required, to program the flash with my binary? This is my first attempt to use that flash, after testing the dedicated flash sample project successfully. But that project focuses on that device' capabilities. No project shows, how to make an application persistent, so it will run after applying power.

- the Keil produces binaries, but how can or must I modify the build, so it will run, via flash storage from RAM?

- For production of a first series, I want to create a 'device', probably part of the pro kit, in order to use the 10 pin micro pitch connector. How can I do that?  What must I take care for with this connector, in order to be able to program my board's flash, hopefully make test/debug?  My idea was, to build a wire harness, with a PCI-X connector on one side and a 10 pin micro pitch on the other end. Would that be enough? My small target mechanics do not allow a PCI-X connector format.  Alternate way: I remember another kit, housed in a white flat drum with lots of sensors, led, button, where a PCB came with it, carrying such a connector. My hope was, this PCB could be used for the same purpose?

Thanks for help,  Joachim

Keywords: 
Device: 
PM_Dialog
Offline
Last seen: 2 days 9 hours ago
Staff
Joined: 2018-02-08 11:03
Hi Joachim,

Hi Joachim,

Thanks for your question and for your interest in our BLE solution.

1. You can program the flash using the Flash Programmer from SmartSnippets Toolbox. Please see section 15. SPI Flash Programmer from the UM-B-083 SmartSnippets Toolbox User Manual (HTML) user guide.I am attaching below useful documents to check too :

You should also place the jumpers in J1 header in the “SPI Position”.

2. Could you please clarify this statement? I should also build the Keil project and use the Toolbox in order to burn the flash with the specific binary. You will find an option to make the device boot too, so that is can boot from flash.

3. The Pro-Dk, as all our DKs, contain a Segger J-Link device that provides SWD capability. By default the J-Link interface is connected onto target device (DA14531 daughter board in our case). However, it is possible to connect it to your own board, allowing the Pro-DK to act as a Debug Probe. In case of the DA14531 Pro-Dk, you should ensure that the jumpers are placed to the correct positions and then connect the own board to the DK using jumper wires – please see attached.

DA14531 Pro-DK – Custom board

J2 Pin4 (black)    à GND

J2 Pin 1 (red)  à Supply Voltage

J1 Pin 23 (blue)  à SWDIO

J2 Pin 21 (yellow)  à SWCLK

Please note that if your own 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: 
joachimkr
Offline
Last seen: 4 months 3 weeks ago
Joined: 2018-07-06 08:58
Hello,

Hello,
Thanks for your answer!

What I understood is, there are only 2 signals, apart from sharing 3.3V power. So, the 10 pin header is completely unused, there is no match?

Do these 2 signals allow a debug session in my target hardware?
If yes, how do I have to deactivate them with resistors, in order to start booting from the Macronix flash, when no Segger hardware is present?

What I do not fully understand: The Keil environment produces a binary file and uses the Segger hardware/software to load it into the SoC's RAM.
Maybe a detail is missing: When I place an SPI flash device onto my hardware, I can 'burn' it into that flash, given, I attach it identical to your Pro Development Boardset. The SmartSnippets toolset is used for that and is capable to reach the Macronix flash (?) 
2nd point not clear: The image, which is produced by Keil for execution from RAM is identical to the image used to flash ? Address scheme is identical?
Do I have to touch/modify the boot script headerfile in some way?

If the SmartSnippets toolset takes care for me, I would assume, it takes care for programming my device's boot header and the result would be, that the image is run from SoC's RAM in identical layout - is that correct?

Thanks for answering such basic and essential questions!
I read a lot, already, but essentials are distributed over lots of material.

Greetings,
Joachim

PM_Dialog
Offline
Last seen: 2 days 9 hours ago
Staff
Joined: 2018-02-08 11:03
Hi joachimkr,

Hi joachimkr,

>>>So, the 10 pin header is completely unused, there is no match?

Can you please indicate in which pin on the Pro DK are you referring to ?

To use the debug your custom board via JTAG using the Por-DK, you should just follow the procedure described in the following user manual :

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

Which flash are you using?  Please also see the AN-B-072 application note to see a list of supported FLASH/EEPROM memories.

https://www.dialog-semiconductor.com/sites/default/files/an-b-072-da14531_booting_options_v1.4.pdf

For programming the Flash, you should just take to the binary image as created by Keil, and use the Flash Programmer of the SmartSnippets toolbox. No need to modify the binary – you should just need to make the device bootable.

 Please refer to the user manual :

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

Thanks, PM_Dialog

joachimkr
Offline
Last seen: 4 months 3 weeks ago
Joined: 2018-07-06 08:58
Hello, thanks for the swd

Hello, thanks for the swd link. I understood that now.

You asked me to indicate for pins on the pro kit. But I refer to an entire set of 10 unpopulated pins on the DA14531 daughter board. They look like, to carry exactly the required pins. I own a board from Dialog, named the DA14585IOTMSENSOR kit. It came along with a USB to Segger interface board, ending with 10 pins, 2 rows of 5 pin, fine pitch flat cable with female connector. The same connector, male, is located but unpopulated on the DA14531 daughter.

Question is, if I can use the USB to Segger board, if I create and populate the 10 pin connector. If yes, do you have a pin list for this flat cable ?

You asked for the flash device: I intend to use the Macronix, as the one on the daughter board DA14531.

I understood, the binary file is exactly the same, for RAM and for flash, with DA14531.

Thanks a lot,

Joachim

joachimkr
Offline
Last seen: 4 months 3 weeks ago
Joined: 2018-07-06 08:58
As we did refer by words only

As we did refer by words only, I am talking about J4, which is named 'debug' connector. Attached is the image, where you will see J4. I want to use this as blueprint.

Attachment: 
joachimkr
Offline
Last seen: 4 months 3 weeks ago
Joined: 2018-07-06 08:58
Here is the equivalent

Here is the equivalent connector, populated on the DA14585 IoT  Sensor kit. You see the same connector and I own the entire kit with (Segger) hardware. It makes sense to consolidate this connector and programmer interfaces.
Attached is the photo from that bottom side, PCB.  I exchanged by mistake female / male. 

Attachment: 
PM_Dialog
Offline
Last seen: 2 days 9 hours ago
Staff
Joined: 2018-02-08 11:03
Hi Joachim,

Hi Joachim,

Sorry but I am little bit confused. Do you have the DA14585 IoT  Sensor kit? Which mother board are you using? If you have the correct connection between your own board and your motherboard, you can use any connect you want.

Thanks, PM_Dialog

joachimkr
Offline
Last seen: 4 months 3 weeks ago
Joined: 2018-07-06 08:58
I have both Development kits:

I have both Development kits: The sensor kit for DA14585, housed in a white case and with a programmer/debugger connector

AND

I have the DA14531 Development Kit Pro, with another connection to the target, through the PCI-X connector.

My purpose, target is,
to connect my own board, with DA14531, which is currently in development, to the 10 Pin connector.
Question is, whether bundling the required pins in a matching cable or using the debugger board with cable and connector is a better choice.

PM_Dialog
Offline
Last seen: 2 days 9 hours ago
Staff
Joined: 2018-02-08 11:03
Hi Joachim,

Hi Joachim,

The DA14585 IoT  Sensor kit doesn’t contain a JTAG interface. Please see UM-B-102: DA14585 Getting Started Guide with the IoT Multi Sensor Development Kit and figure 6. To flash it over JTAG, you need another board named Interface Board.

Since you have a custom board with the DA14531, you should you the Pro-DK in order to flash it. The below tutorial contains all the required steps:

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

Thanks, PM_Dialog

joachimkr
Offline
Last seen: 4 months 3 weeks ago
Joined: 2018-07-06 08:58
OK Thanks,

OK Thanks,
I will inspect the J4 header on the daughter board of the DA14531 kit and will make a wire harness, as required.
So, that fact, having a 2 row by 5 small pitch connector, does not mean, they are identical.
Best Regards,
Joachim

PM_Dialog
Offline
Last seen: 2 days 9 hours ago
Staff
Joined: 2018-02-08 11:03
Hi Joachim

Hi Joachim

Thanks for accepting my answer. If you have a follow-up question, please raise a new forum post.

Thanks, PM_Dialog