I want to use an MSP430 configured as an SPI Master to boot the DA14586. (using pins P2_0/SPI_CLK, P2_3/SPI_EN, P2_4/SPI_DO, P2_9/SPI_DI as specified in the datasheet). When the MSP430 sends the SPI Master boot protocol (according to UM-B-079 Software Platform Reference Table 40) I don't get a response (I'm expecting ACK or NACK for bytes 3 & 6). Instead, the DA14586 switches to SPI Master and searches for external flash modules (according to the booting sequence in UM-B-079).
How do I make sure the DA14586 knows I'm trying to boot it from an external SPI Master? Is there a time frame that I need to start communicating? It looks like the DA14586 tries to communicate with an external flash after about 13ms (I used an oscilloscope to check). I've been trying to send the Master boot protocol from the MSP430 before 13ms, but it seems to ignore my attempt to boot it.
Hi TP2017,
The pins used in your configuration are connected to the integrated flash on the DA14586. The Flash here is in Slave configuration and DA14586 in Master configuration. The boot sequence depends on the Bootloader implemented. I am checking the bootloader internals with our team and will get back to you about the options available for the use case.
Best,
LC_Dialog
Hi TP2017,
As I have mentioned previously, the pins you've connected the external MCU in your design are conflicting with the connections to the Integrated Flash memory. The ROM bootloader in the DA14586 will try to boot from this Integrated Flash memory and this will make it very difficult to boot from your external MCU. I would recommend to use other GPIOs available and preferably the Port 0 pins.
Please let us know if you have more concerns.
Best,
LC_Dialog
My question is whether the DA14586 will boot from an SPI Master, as stated in Appendix G of UM-B-079 SDK 6 Software Platform Reference (Appendix G.4 G.4.1 "DA14585/586 connected to SPI Master"). I'm assuming from your response that the DA14586 doesn't start by follow the Booting protocol described in G.4.1 of the reference. It sounds like the DA14586 starts at step G.4.3. If you can confirm this, I'll change our design to accommodate the actual protocol used by the DA14586.
Is the source for the boot code available? If I understand your response, the documentation doesn't match the DA14586's booting protocol. I'd like to confirm the details of the booting protocol before I commit to any more design changes.
Thanks
Hi TP2017,
To clarify, there are 2 parts to this.,
DA14586将引导你按照协议were referring to in Appendix G. Having said that, this is however part of the serial interface boot process. But the DA14586 (specifically) has an integrated flash in the package which will be checked first before moving to the serical interfaces as explained below in detail.
The DA14586 is configured to boot from the integrated Flash (Slave) as described in the DA14586_datasheet_3v2 page 39. If this flash does not have a valid header, the device cannot boot here and will proceed to the serial interfaces as described in the Appendix G. When booting from the serial interfaces, the 586 will first check for an external SPI master and follows the order as described in the Table 39 and also Figure 31 in Appendix G of UM-B-079. The booting GPIO combination has been clearly described in Table 38 in Appendix G.
The source code of the ROM bootloader is not available. However, a similar implementation is provided to customers in the DA14585/86 SDK -> utilities -> secondary_bootloader if the application requires a secondary bootloader to boot from custom pins.
Hope this answers your concerns..
Best,
LC_Dialog
Am I using the wrong pins?
I understand your point that checking the flash is the first part and the serial interface boot protocol is the second part of the boot process. My problem is that I am unable to get the DA14586 to respond to the booting protocol (G.4.1 of UM-B-079) using an external SPI master. I was wondering what I was doing wrong, and thought there might be some more information (e.g. timing, pinout) that would help me.
I re-read the resources you referenced. If I understand correctly, Figure 31 of UM-B-079 shows that, if there is a boot specific flag=0xAA in the OTP (as in the case of the DA14586), then the DA14586 tries to boot from the pins shown in Table 1 of DA14586_datasheet_3v2 page 19. If that fails, the DA14586 looks for an external source on the pins listed in Table 38 of UM-B-079.
The pins thatI am usingfor booting areP2_0/SPI_CLK, P2_3/SPI_EN, P2_4/SPI_DO, and P2_9/SPI_DI. I got this understanding from a forum discussionhttps://support.dialog-semiconductor.com/comment/17898#comment-17898and Table 1 of DA14586_datasheet_3v2 page 19. I think this might work if I made the external an SPI Slave and booted from it as shown after "Init SPI config" inFigure 31 of UM-B-079.
If I understand the sources, the pinsI should use to boot from an SPI MasterareP0_0/SCK, P0_3/CS, P0_6/MISO, P0_5/MOSI or P0_0/SCK, P0_1/CS, P0_2/MISO, P0_3/OSIlisted inTable 38 of UMB-079. These pins are used in the second part of the DA14586's search for an external source.
If my understanding is correct, I still need information about timing my SPI Master boot protocol signal. I've put an oscilloscope on the signal lines, and I might be able to use that data to time the SPI Master, howeverI'd like to know if there is a more certain way to determine when the DA14586 will respond to an external SPI Master. Will it respond any time before it goes to the step after "Ext SPI Master?".
I did not find the part where the DA14586 loads the program from internal flash in Figure 31 of UM-B-079. I think it must be somewhere after "OTP blank?", but I can't find it.
谢谢你的帮助。同时,谢谢你的tip on the secondary_bootloader. I'll take a look at it.
Hi TP2017,
If you want to configure your external MCU as a SPI Master, then you should consider using one of the pin configurations specified in the Table 38 of UM-B-079.
The DA14586 timing requirement is about 8 msec while booting from the external SPI Master and it should send the protocol data sequence (0x70 0x50) to the SPI Slave (586) which will send an ACK/NACK in return.
Regarding your question, where the DA14586 loads the program from internal flash.. It will do so at the EXT SPI slave? stage in the Figure 31 of UM-B-079.
Best,
LC_Dialog