Problem trying to boot DA14580 using external SPI

⚠️
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//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
11 posts / 0 new
Last post
AlejandroCastillo
Offline
Last seen:1 year 1 month ago
加入:2017-07-13 12:11
Problem trying to boot DA14580 using external SPI

Hi team,

我们使用自定义硬件萤火虫es a DA14580 device. We want to boot it through another microcontroller as master (ADuCM4050) by using SPI protocol, so we have implemented some functions following the Application note document (booting from serial interfaces). The first packet sent is composed by the preamble, a 0x00 and the Length LS byte. If everything was fine, we may receive an ACK (its value is 0x02) in the position 3 of rx buffer (from 0), but that's not the case. In fact, we obtain the results shown in the attached pdf.

The problem here is that the SPI should send data, and then, receive the response from DA14580, but it seems that rx buffer catchs the [0xce, 0xc0, 0x02, 0xc0] secuence instead of [0xc0, 0xdc, 0xd4,0x02]. The SPI bit rate set is the lowest.

Any idea about this?

谢谢。

Attachment:
Device:
PM_Dialog
Offline
Last seen:2 days 59 min ago
Staff
加入:2018-02-08 11:03
Hi Alejandro,

Hi Alejandro,

Thanks for your question. Let me check it and I will get back to you.

问候,pm_dialog

PM_Dialog
Offline
Last seen:2 days 59 min ago
Staff
加入:2018-02-08 11:03
Hi Alejandro,

Hi Alejandro,

您是否在外部微控制器和DA14580之间设置了布线,或两者都放在同一个PCB中?在第一种情况下,我建议使用较短的电线来降低噪声。在第二种情况下,请检查您正确终止SPI行的PCB。通常,我们使用33欧姆终端电阻。关于敏感性,由于尖峰和反射,在大多数情况下,这是没有从DA14580朝向大师的任何通信的原因。

Thanks, PM_Dialog

AlejandroCastillo
Offline
Last seen:1 year 1 month ago
加入:2017-07-13 12:11
Hi team,

Hi team,

谢谢回复。我们在同一PCB中有两个组件。我们在推荐之后将电阻放在SPI线路中,但它尚未正常工作。这很奇怪,因为da14580向微量响应,所以我们认为问题与时机有关(似乎微米提出了一个问题,并且对话框在ADUCM4050完成其问题之前发送答案,所以它无法拍摄它检查是否是ACK或NACK)。

Is possible that DA14580 is configured with a different bit rate, master/slave mode or any other and it ignores the SPI configuration of microcontroller? We don't see any other thing that could be generating this situation.

谢谢。

PM_Dialog
Offline
Last seen:2 days 59 min ago
Staff
加入:2018-02-08 11:03
Hi Alejandro,

Hi Alejandro,

让我检查你的问题,我会告诉你。

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen:2 days 59 min ago
Staff
加入:2018-02-08 11:03
Hi Alejandro,

Hi Alejandro,

It’s little bit strange… As mentioned before, this might be due to spikes, reflections and noise between the SPI signals. This is the in most common reason that there wasn't any communication from the DA14580's side towards the master. Regarding the bitrate, since the DA14580 is acting as a slave, the clock is generated by the other microcontroller which is acting as a master.

Thanks, PM_Dialog

AlejandroCastillo
Offline
Last seen:1 year 1 month ago
加入:2017-07-13 12:11
Hi team,

Hi team,

谢谢回复。Finally, we decided to buy the DA14580 Dev-kit basic to work and discover what could be the problem. It seems that it is related with microcontroller configuration. When it tries to communicate with a chip to read or receive data, it sends "X" first and then receives "Y"; however, if it tries to write only, it receives responses by the way, so you can access to ACK in Rx buffer by deactivating the Read command in the SPI receiving function. And well... if we run the code, it receives the two first ACK, I mean, preamble and length+crc ACKs (not always), but not the 0xAA and 0x02 secuence in the end. We checked the Flash content and it was empty (full of 0xFF).

We followed the instructions of manuals and connected both devices as follows (SCLK, /CS, MISO and MOSI pins belong to microcontroller):

- SCLK to P0_0 of Dev-kit.

- /CS to P0_3 of Dev-kit.

- MISO to P0_6 of Dev-kit.

- MOSI to P0_5 of Dev-kit.

We already inserted a delay function (110 ms) and tried to connect with SPI pins of DA14580 Dev-kit (Flash), but it doesn't work. Is there any other point that we may to consider?

If we find a solution, we'll post it.

谢谢。

AlejandroCastillo
Offline
Last seen:1 year 1 month ago
加入:2017-07-13 12:11
Hi team,

Hi team,

Finally, we really think that the problem is caused by wires connecting both devices, as you refered previously, because of spikes and reflections. Data received through MISO line is similar to data that we expect to receive, and sometimes appear reflected values as 0x70 and/or 0x50 hex data (they both are data used to init boot process).

问题是我们需要使用这些电线来连接它们之间的设备。我们怎样才能避免这些影响?是否有任何可能影响的因素?也许是一个跳线,我们可以除去(或不)或除了四条SPI线外还必须连接的任何引脚吗?

Thank you very much.

PM_Dialog
Offline
Last seen:2 days 59 min ago
Staff
加入:2018-02-08 11:03
Hi AlejandroCastillo,

Hi AlejandroCastillo,

In fact that you have a custom hardware and the lines are connected without fly wires, this is related to your PCB. Typically we use 33 Ohm termination resistor.

Thanks, PM_Dialog

AlejandroCastillo
Offline
Last seen:1 year 1 month ago
加入:2017-07-13 12:11
Hi team,

Hi team,

We found the solution. The datasheet has a "non-desired effects" section where it explains possible bad responses related with the voltage regulator and ADC (one introduces noise effect to the other), so we tried to use shielded cable to check if we can reduce this and... it worked!

感谢您的关注。

PM_Dialog
Offline
Last seen:2 days 59 min ago
Staff
加入:2018-02-08 11:03
Hi AlejandroCastillo,

Hi AlejandroCastillo,

很高兴你识上你发出并感谢征兆。如果您有任何其他问题,请创建一个新的论坛线程!

Thanks, PM_Dialog