da1468x.crash when connecting SPI device on certain pins

⚠️
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.
9个帖子/ 0新
Last post
David_33021.
Offline
最后一次露面:11 months 4 days ago
Joined:2015-07-28 15:10
da1468x.crash when connecting SPI device on certain pins

Hi,

In our custom PCB, we're connecting a Dialog DA1468x to an ST Micro LSM6DSL using SPI. We created a first prototype PCB, "Proto1", and everything worked great. We've recently created a second prototype PCB, "Proto2", which connects the LSM6DSL to different pins on the DA1468x, and the 1468x now crashes on boot.

I'm able to reproduce the problem using the pxp_reporter sample from the 1.0.12.1078 SDK and a 1468x Pro development kit with a DA14681 in the AQFN package.

根据我们的PROTO1 PCB(正常工作)引脚连接

DA1468X SPI1 CLK:P1_3 - > LSM6DSL SCL
DA1468X SPI1 DI:P0_7 - > LSM6DSL SDO
DA1468X SPI1 DO:P2_3 - > LSM6DSL SDA
da1468x.CS: P4_7 -> LSM6DSL CS

根据我们的PROTO2 PCB(启动崩溃)的引脚连接

DA1468X SPI1 CLK:P4_1 - > LSM6DSL SCL
DA1468X SPI1 DI:P1_7 - > LSM6DSL SDO
DA1468X SPI1 DO:P1_2 - > LSM6DSL SDA
da1468x.CS: P3_0 -> LSM6DSL CS

在两个例子中,

DA1468X 1V8P - > LSM6DSL VDD
DA1468X 1V8P - > LSM6DSL VDDIO
DA1468X GND - > LSM6DSL GND

要重现问题,请根据上面的一个配置将Pro DK连接到LSM6DSL,然后按如下方式修改PXP_Reporter软件:

1.从1.0.12.1078 SDK开始使用PXP_Reporter示例
2.将以下定义添加到custom_config_qspi_suota.h:

#define dg_configuse_hw_spi(1)
#define dg_configspi_adapter(1)
#define dg_configpower_1v8p(1)

3.将platform_devices.h文件添加到配置目录并定义SPI总线和设备:

SPI_BUS(SPI1)

spi_slave_device(
spi1,my_lsm6dsl,
hw_gpio_port_4,hw_gpio_pin_7,// proto1 - OK
// hw_gpio_port_3,hw_gpio_pin_0,// proto2 - 崩溃
hw_spi_word_8bit,hw_spi_pol_high,hw_spi_pha_mode_1,
hw_spi_freq_div_2,-1);

spi_bus_end.

4.在Main.c中的Periph_Init函数中,为SPI配置引脚:

#如果是1

// proto1 - 好的
#define spi_clk_port hw_gpio_port_1.
#define SPI_CLK_PIN HW_GPIO_PIN_3
#define spi_di_port hw_gpio_port_0.
#define spi_di_pin hw_gpio_pin_7.
#define SPI_DO_PORT HW_GPIO_PORT_2
#define spi_do_pin hw_gpio_pin_3.
#define lsm6dsl_cs_port hw_gpio_port_4.
#define lsm6dsl_cs_pin hw_gpio_pin_7.

#别的

// proto2 - 靴子上的崩溃
#define spi_clk_port hw_gpio_port_4.
#define SPI_CLK_PIN HW_GPIO_PIN_1
#define spi_di_port hw_gpio_port_1.
#define spi_di_pin hw_gpio_pin_7.
#define SPI_DO_PORT HW_GPIO_PORT_1
#define spi_do_pin hw_gpio_pin_2.
#define lsm6dsl_cs_port hw_gpio_port_3.
#define lsm6dsl_cs_pin hw_gpio_pin_0.

#万一

hw_gpio_configure_pin(spi_clk_port,spi_clk_pin,
hw_gpio_mode_output,hw_gpio_func_spi_clk,1);
hw_gpio_configure_pin_power(SPI_CLK_PORT, SPI_CLK_PIN,
HW_GPIO_POWER_VDD1V8P);

hw_gpio_configure_pin(spi_di_port,spi_di_pin,
hw_gpio_mode_input,hw_gpio_func_spi_di,1);
hw_gpio_configure_pin_power (SPI_DI_PORT SPI_DI_PIN,
HW_GPIO_POWER_VDD1V8P);

hw_gpio_configure_pin(spi_do_port,spi_do_pin,
hw_gpio_mode_output,hw_gpio_func_spi_do,1);
hw_gpio_configure_pin_power(SPI_DO_PORT, SPI_DO_PIN,
HW_GPIO_POWER_VDD1V8P);

hw_gpio_configure_pin(lsm6dsl_cs_port,lsm6dsl_cs_pin,
HW_GPIO_MODE_OUTPUT, HW_GPIO_FUNC_GPIO, 1);
hw_gpio_configure_pin_power(LSM6DSL_CS_PORT, LSM6DSL_CS_PIN,
HW_GPIO_POWER_VDD1V8P);

使用我们旧Proto1 PCB的PIN分配,PXP_Reporter应用程序在连接到LSM6DSL的PRO DK上运行正常。如果从我们的PROTO2 PCB从新的引脚分配更改,PXP_Reporter应用程序在启动时崩溃。

以下是我发现的一些东西:

1.如果我注释出#define dg_configpower_1v8p,它会在没有崩溃的情况下运行
2.如果我没有将芯片选择线连接到LSM6DSL,它会在没有崩溃的情况下幸存下来

以下是一些问题:

1.仅适用于SPI的1468倍的某些引脚?
2. Am I forgetting to configure something on the 1468x in order to use SPI correctly?
3. I might be able to avoid the crash if I can set up the pin on the 1468x we're using as "SPI chip select" as an output (instead of the default input-pulldown) during boot. Is this possible?
4.另一个解决方法可能是延迟凝视1V8P,直到启动完成(并且Periph_Init有机会将芯片选择引脚设置为输出)。是否有一个API可以调用它在运行时启用1V8P?

Thank you very much,
大卫

关键词:
设备:
mt_dialog.
Offline
最后一次露面:2个月6天前
Staff
Joined:2015-06-08 11:34
嗨David_33021,

嗨David_33021,

1) No, there is no special limitation on the pins one can use for the SPI interface, all the pins can be configured and be used for the SPI interface (besides a few special pins like the first pins of the P0 port which are used for the QUAD SPI for example). I tested having the P3_0 as a CS on a SPI device didn't see any issues on my side. Perhaps you could try doing the same thing with a different SPI peripheral and check if you can replicate the issue.

2)否我没有看到配置中缺少的任何东西以便使用SPI。

3) You can burn the TCS flags in the OTP header in order to have the GPIO in different configurations while booting, but something else should be the case in your issue.

4)启动加载程序运行时,1V8P配置为Active,因此否您无法执行此操作。

关于您的问题,您是否可以在设备启动的同时检查1V8P上的电压并检查轨道上是否有任何电压潜水?您还有一个上贴设备的CS吗?

谢谢mt_dialog.

David_33021.
Offline
最后一次露面:11 months 4 days ago
Joined:2015-07-28 15:10
嗨mt_dialog,

嗨mt_dialog,

非常感谢您的回复。我会尝试不同的SPI外设,并根据建议,在引导期间检查1V8P上的电压。

我们尚未在CS行上添加外部上拉到设备,但我检查了LSM6DSL的数据表,LSM6DSL在CS行上有一个内部拉出。

谢谢,
大卫

David_33021.
Offline
最后一次露面:11 months 4 days ago
Joined:2015-07-28 15:10
嗨mt_dialog,

嗨mt_dialog,

I checked 1V8P on an oscilloscope during boot, using the DA1468x Pro DK connected to the LSM6DSL with our Proto2 pin assignments.

1) With the CS line disconnected, 1V8P is a steady 1.8V through boot (and also when I reset the Pro DK with switch K2).
2) With the CS line connected, 1V8P starts at 1.8V immediately after I release the Pro DK's reset switch (K2), then drops to about 1V within less than 200 ms. At that point, 1V8P immediately returns to 1.8V and then falls back toward 1.0V again, repeating this pattern indefinitely (presumably as the 1468x is in a crash and reboot cycle).

谢谢,
大卫

mt_dialog.
Offline
最后一次露面:2个月6天前
Staff
Joined:2015-06-08 11:34
嗨David_33021,

嗨David_33021,

That means that for some reason the sensor that you have attached on the dev kit or on the proto board draws quite some power, more than the 1V8P can provide without voltage drops, so when the voltage drops the brown out detector kicks in and resets the board (1.65V is the typical value for the 1V8P). This sounds like more of short circuit. Now why exactly this occurs only when you have the CS on the P3_0 is quite strange,since there is no limitation or any kind of difference between those two pins, have you tried this using another sensor ? Or perhaps probe the P3_0, do you see the line toggling or driven at all from the 68x device, can you check if any toggling of the line is correlated with the fact that the 1V8P drops to 1V ? You can also measure the current on the supply 1V8P and also the the current on the CS and check if there is a current rush during boot.

也想从上一篇文章中发表评论的东西,(我不认为它必须与您当前的问题做任何事情,但您应该照顾它,以避免您可能拥有的任何未来问题),如图所示数据表引脚P1_0,P1_5和P1_7可能会影响RF活动时切换时的无线电性能。建议使用低速使用,而不是无线电激活。

谢谢mt_dialog.

David_33021.
Offline
最后一次露面:11 months 4 days ago
Joined:2015-07-28 15:10
嗨mt_dialog,

嗨mt_dialog,

谢谢您的意见。我们会根据您的建议进行调查。

Also, thank you for pointing out that P1_7 is sensitive to high speed toggling. We had observed in the DA14680/681-01-KnownLimitations doc that we should avoid P1_0 and P1_5, but the KnownLimitations doc didn't mention P1_7 and we missed it in the datasheet.

大卫

David_33021.
Offline
最后一次露面:11 months 4 days ago
Joined:2015-07-28 15:10
嗨mt_dialog,

嗨mt_dialog,

I burned the OTP using write_tcs to set our SPI clock pin, P4_1, as an output, initially logic high. With this change, our Proto2 setup on the Pro DK and our Proto2 PCBs (I've tested two so far) survive boot and operate normally. Yay!

谢谢,
大卫

mt_dialog.
Offline
最后一次露面:2个月6天前
Staff
Joined:2015-06-08 11:34
嗨David_33021,

嗨David_33021,

很高兴你发现了你的出路,谢谢你的分享,但是,只是出于好奇心,你是否弄清楚了为什么通过设置TCS中的P4_1 Quals究竟与你的设置有关?

谢谢mt_dialog.

David_33021.
Offline
最后一次露面:11 months 4 days ago
Joined:2015-07-28 15:10
嗨mt_dialog,

嗨mt_dialog,

不,不幸的是,还没有。我们可以在DA1468X Pro套件上重现问题似乎很奇怪。我们买了另一个LSM6DSL分组板,以附加到DA1468X Pro套件并观察到同样的问题,因此它不是我们特定的LSM6DSL突破的一个问题。我们的PROTO2构建中的每一个PCB都有问题,而我们的PROTO1建立的所有PCB(相同的DA14680和LSM6DSL和相同的软件,只是在DA1468x上使用不同的引脚)很好。

我们仍在调查我们为我们的(希望)最终PCB构建准备。如果我们发现任何东西,我会告诉你。

谢谢,
大卫