11 posts / 0 new
Last post
omri
Offline
Last seen:3 years 6 months ago
Joined:2014-12-23 13:15
Booting from SPI master

I am using ~300khz SPI clock to try and download the DA14580 image via SPI master.
I am resetting the DA14580 by setting the RST pad to 1 for 10ms and then back to 0.
Then i wait 111ms (103 + 8 as stated in the AN-B-001 document).
Now i put the SPI CS low and start the booting sequence:
0 x70 0×50 0 x00 t紧随其后wo 'length' bytes and so on....
The AN-B-001 document says i expect to get 0x20 (NACK) or 0x02 (ACK) on the MISO line on the 4th byte i send.
Instead i am getting this:

MOSI MISO
0x70 0x00
0x50 0xD9
0x00 0x00
0xCD 0xC0 <-- MOSI=length low byte / MISO expect 0x20 or 0x02
0x0F 0xE7 <-- MOSI=length high byte
0x9F 0x83 <-- MOSI=CRC
0x01 0xCF <-- MOSI=Mode
0x00 0x83

What am i doing wrong?

I have an osciloscope image to show if needed.

omri
Offline
Last seen:3 years 6 months ago
Joined:2014-12-23 13:15
Update: When using 512khz i

Update: When using 512khz i am now able to receive the 1st ACK of the boot sequence but not the next one.
1. Do you have sample code i can get that implements the master spi boot from external MCU?
2. What if i am using 656.25khz instead of 512khz, what shoulf i do?

RvA
Offline
Last seen:3 weeks 4 days ago
Staff
Joined:2014-02-07 14:10
Hi Omri,

Hi Omri,

We will take a look at your issue and come back to you as soon as possible.

Best regards,

RvA(Dialog)

RvA
Offline
Last seen:3 weeks 4 days ago
Staff
Joined:2014-02-07 14:10
Hi Omri,

Hi Omri,

It appears that the SPI module is sensitive to reflections and spikes on the cable wires between the DA14580 and the external microcontroller. So the cause for your issue could be your setup. Short wire connections will help, but for a more detailed advice we need to have picture of your setup.

If you like to I can share my contact details with you so you can send a picture of your setup as well as the scope plots.

With kind regards, RvA (Dialog)

omri
Offline
Last seen:3 years 6 months ago
Joined:2014-12-23 13:15
I'd be glad to share it all

I'd be glad to share it all with you.

thanks

RvA
Offline
Last seen:3 weeks 4 days ago
Staff
Joined:2014-02-07 14:10
Hi Omri,

Hi Omri,

I have sent you an email. Thanks and best regards,

RvA(Dialog)

aihuazou
Offline
Last seen:5 years 7 months ago
Joined:2015-02-08 03:23
Hi Rva:

Hi Rva:
I meet the same problem with Omri, Could you help me ?
Thks

RvA
Offline
Last seen:3 weeks 4 days ago
Staff
Joined:2014-02-07 14:10
Hi aihuazou,

Hi aihuazou,

There could be a relation to the HW setup, As we have seen similar issues before which were solved by improving the setup. Here is a picture of the setup as we have it for testing

Basically the wiring is using short equal length wires, having sufficient ground returns. I would recommend to use ground returns from the connectors close to the signal lines.

Also the SPI clock is important. Note that The SPI master must provide a clock with a frequency of maximum 512 kHz. This is discussed in UM-B-013.

Best regards, RvA

aihuazou
Offline
Last seen:5 years 7 months ago
Joined:2015-02-08 03:23
Hi Rva :

Hi Rva :
Can you give me a reference design of the booting from master spi ,I use the demo of the "\DA1458x_SDK_3.0.6\host_apps\da1458x\proximity\reporter\host_proxr.uvproj" as the host MCU project and the "\DA1458x_SDK_3.0.6\dk_apps\keil_projects\proximity\reporter_fe_spi" as the slave mcu project, but I failed.
Thks

slamvan
Offline
Last seen:1 month 3 weeks ago
Joined:2016-07-14 15:54
please, how write for send

please, how write for send firmware to da14580 from mcu external Spi master?

thanks

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

Hi slamvan,

Please check the following project in the SDK .....\DA1458x_SDK\5.0.3\projects\host_apps\da1458x\proximity\reporter, in that demo project the 580 acts as an SPI master and sends the fw into another 580 over spi. Also the fw for downloading in the 580 is available in the ......\DA1458x_SDK\5.0.3\projects\target_apps\ble_examples\prox_reporter_ext_spi project.

Thanks MT_dialog