雷竞技电竞平台对话半导体客户支持- SPI Slave SPI_CLK SPI_EN https://support.dialog-semiconductor.com/resource-keywords/spi-slave-spiclk-spien SPI从模式的SPI_CLK输入是合理的! https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software/sensible-spiclk-input-spi-slave-mode < div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >我们使用PAN1740作为SPI奴隶(SPI_SMN = 1)在一起STM32大师我们目前连接/CS, CLK, MISO和MOSI和GND(没有进一步的握手线)。主机驱动SPI时钟与125 kHz,共同GND是保证,O-Scope显示良好的终止线信号。我们在DA14580中启用了SPI中断(SPI_MINT=1)模式,并以无fifo模式接收/发送(SPI_FIFO_MODE=0x03)现在工作。但是为了使它工作,我们需要一个奇怪的DA14580从模式的SPI配置,所以我们假设,我们仍然有配置问题:

首先,我们为SPI_CLK (Port/Pin p0_ 0)配置了GPIO,像几个演示代码和HCI演示那样输入:被干扰的接收/发送字节和被干扰的MISO行使用(不是CLK对齐的MISO过渡)。当我们把SPI_CLK引脚改为OUTPUT (for Slave !?)时,它工作得很好:
- GPIO_ConfigurePin(SPI_CLK_GPIO_PORT, SPI_CLK_GPIO_PIN, OUTPUT, PID_SPI_CLK, false);

2) SPI Slave should ignore Master CS (SPI_EN)?
We enabled the DA14580 SPI Slave CS usage as described in demo code and HCI demo, to use the master driven CS:
- SetBits16(SPI_CTRL_REG,SPI_EN_CTRL,1);
But together with the conditions above, it does not work: It leads into the same disturbed IRQs/Rx/Tx bytes as described above. Switching CS-usage off makes all signals reliable:
- SetBits16(SPI_CTRL_REG,SPI_EN_CTRL,0);
Pls. note, that the SPI Master (STM32) generates well terminated SPI signals, decoded by a LogicAnalyser without errors. Master CS (of course low-active) goes to LOW ~7 us before CLK starts with first transitio, and goes back to HIGH ~7us after the last CLK transition (all 125 kHz SPI-CLK frequency).

So our question is: Is SPI_CLK and SPI_EN usage as described above intended for a DA14580 SPI Slave?

Device: 
Tue, 01 Nov 2016 13:08:49 +0000 拉尔夫。 4862年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software/sensible-spiclk-input-spi-slave-mode#comments