Pinout for booting DA14586 from serial interface

⚠️
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.
11 posts / 0 new
Last post
TP2017
Offline
Last seen: 6 months 1 week ago
Joined: 2017-07-15 18:18
Pinout for booting DA14586 from serial interface

I'm confused about the pins to use to connect the DA14586 to an external device (MSP430) for booting from a serial interface (I'd like to use an SPI interface).

I read AN-B-001 "Booting from serial interfaces" and saw that the booting pin assignments (step 1/SPI Master) were P0_0/SCK, P0_3/CS, P0_5/MOSI, and P0_6/MISO. That seems clear enough, but something I read in the DA14586 datasheet has me confused. The datasheet says that "During the boot sequence, the four SPI pins of port P2 are used to access the internal Flash memory" (P2_0/CLK, P2_3/EN, P2_4/DO, P2_9/DI). This sounds a little like the same thing to me. Is the datasheet telling me about a different function?

Once I've booted the DA14586 using the serial interface I'd like to control the DA14586 using the same SPI interface. Is that possible?

Device: 
MT_dialog
Offline
Last seen: 9 months 2 weeks ago
Staff
Joined: 2015-06-08 11:34
Hi TP2017,

Hi TP2017,

The 586 comes with an embedded flash and the OTP header is preprogrammed in order to boot from the pins of the embedded flash using the "Boot specific mapping" field in the OTP header. The AN-B-001 document concerns the 580/581/583 family, the booting procedure is quite the same but not exactly the same and the 586 which comes with the embedded flash doesn't follow the same architecture as the 583 (which also comes with an embedded flash). So in the 585/586 case the booting procedure is described in the document UM-B-079 DA14585_586 SDK 6 Software Platform Reference document in Appendix G. So how exactly the 586 boots, it will check for booting from the internal flash (as the appropriate field in the OTP header instructs) after failing to boot from the internal flash it will start executing the UART sequence as it is described in the appendix figure 31 and continue with the rest of the booting protocol. After you have booted your fw then you can use the pins as you like.

Thanks MT_dialog

TP2017
Offline
Last seen: 6 months 1 week ago
Joined: 2017-07-15 18:18
Thank you for your response.

Thank you for your response. I'm still unsure about the pin assignments, though. Appendix G of the UM-B-079 DA14585_586 SDK 6 Software Platform Reference lists P0_0/SCK, P0_3/CS, P0_6/MISO, and P0_5/MOSI for the Step A boot process. I also noticed the same pinout designated on Table 21 of the DA14586 datasheet. However, I on Table 1 Pin Description (p. 19 of DA14586 datasheet) it shows P2_0/SPI_CLK, P2_3/SPI_EN, P2_4/SPI_DO, and P2_9/SPI_DI and has a comment "Note: During the boot sequence, the four SPI pins of port P2 are used to access the internal Flash memory. Therefore these pins shall not be remapped or used for any other purpose.". That is the part that confused me. I'd like to be sure I haven't misread the documentation and assign the wrong pins before I commit to a board design.

Thanks

MT_dialog
Offline
Last seen: 9 months 2 weeks ago
Staff
Joined: 2015-06-08 11:34
Hi TP2017,

Hi TP2017,

As mentioned above, the bootloader for the 585 and the 586 is the same, the difference between those two devices is that the 586 has an internal flash in order to store code, since its has an internal flash and most probably the user would like to store some code in it, due this OTP special flag the Boot rom code will not directly execute the serial booting procedure but it will first check the SPI interface on the special pin that are declared in that field and if it fails to boot from there it will then go and execute serial booting. When the device finds your fw from the external flash, it will mirror the code to the RAM of the 585 and the pins will be remmaped according to the your fw, but the booting procedure will be over and the mirroring procedure will be done, so you wont have to access the flash again for reading code, but in order to read any data from the flash you will need to configure the pins from your fw as SPI pins in order to access the internal flash. But be aware that if you plan to connect any external sensors on those pins you should make sure that they dont interfiere with the booting 
procedure.

Thanks MT_dialog 

TP2017
Offline
Last seen: 6 months 1 week ago
Joined: 2017-07-15 18:18
which serial boot pinout?

which serial boot pinout?

I think I understand your last comment, but I'd like to be certain before I order a prototype board.

I'm looking for the specific pinout for serial booting for the DA14586. Is it P0_0/SCK, P0_3/CS, P0_6/MISO, and P0_5/MOSI (Table 21, p. 45 of datasheet) or is it P2_0/SPI_CLK, P2_3/SPI_EN, P2_4/SPI_DO, and P2_9/SPI_DI (Table 1 p. 19 of datasheet)? The datasheet seems to contradict itself.

(from Table 1, p. 19: "Note: During the boot sequence, the four SPI pins of port P2 are used to access the internal Flash memory. Therefore these pins shall not be remapped or used for any other purpose.") Does this mean that P2 SPI pins are used for serial booting on the DA14586?

Thanks

MT_dialog
Offline
Last seen: 9 months 2 weeks ago
Staff
Joined: 2015-06-08 11:34
Hi TP2017,

Hi TP2017,

As mentioned above, the 586 uses the same bootloader as the 585, so the bootloader procedure is exactly the same, but since the 586 has an embedded flash the OTP Header field Boot specific mapping is burned from factory in order to boot first from the P2_0/SPI_CLK, P2_3/SPI_EN, P2_4/SPI_DO, and P2_9/SPI_DI and if that fails it will go and execute the standard bootloader procedure. I undertstand that the datasheet is a bit confusing since it describes the standard sequence and not the 586 option with the burned OTP field, will check it with the authors of the datasheet.

Yes, that is what i ve been mentioning throughout the post.

Thanks MT_dialog

TP2017
Offline
Last seen: 6 months 1 week ago
Joined: 2017-07-15 18:18
Thank you very much for your

Thank you very much for your help.

jasmeet singh
Offline
Last seen: 1 year 4 months ago
Joined: 2020-07-15 09:46
hi 

hi 

I am using DA14586 with internal flash . And one of my sensor is connect to da14586 through spi interface as this P0_0/SCK, P0_3/CS, P0_6/MISO, and P0_5/MOSI.

I am configuring these spi pins like this         GPIO_ConfigurePin(GPIO_PORT_0, GPIO_PIN_3, OUTPUT, PID_SPI_EN, true);
#if 1
arch_puts("test 1 \n\r");
#endif
        GPIO_ConfigurePin(GPIO_PORT_0, GPIO_PIN_0, OUTPUT, PID_SPI_CLK, false);
#if 1
arch_puts("test 2 \n\r");
#endif
        GPIO_ConfigurePin(GPIO_PORT_0, GPIO_PIN_6, OUTPUT, PID_SPI_DO, false);
#if 1
arch_puts("test 3 \n\r");
#endif
        GPIO_ConfigurePin(GPIO_PORT_0, GPIO_PIN_5, INPUT, PID_SPI_DI, false);
 

but it is not booting up.

So, how i can make my sensor interface through spi or what is the right proccedure to do this .

 

Thanks & Regards

Jasmeet Singh

PM_Dialog
Offline
Last seen: 2 days 8 hours ago
Staff
Joined: 2018-02-08 11:03
Hi Jasmeet Singh,

Hi Jasmeet Singh,

Is there any specific reason why you are using that GPIO for the sensor? Did you try to connect it in any other GPIOs?

Thanks, PM_Dialog

jasmeet singh
Offline
Last seen: 1 year 4 months ago
Joined: 2020-07-15 09:46
hi 

hi 

In page number 45 TABLE no. 21 of datasheet (DA14586). They have given  Peripheral Pin Mapping for spi master that is the reason we are using these gpios as spi lines for our sensor.

no we did not try with other gpios.

Thanks & Regards 

Jasmeet Singh

PM_Dialog
Offline
Last seen: 2 days 8 hours ago
Staff
Joined: 2018-02-08 11:03
Hi Jasmeet Singh,

Hi Jasmeet Singh,

This is the booting sequence as the BootROM checks specific GPIOs in order to boot from different serial devices. In general, you can use any GPIO as SPI -  you will need to configure it in your firmware too. In the meanwhile, could you please probe the SPI signal with a logic analyzer tool and share a capture?

Thanks, PM_Dialog