SPI slave

non-blocking SPI slave implementation

Mon, 2016-08-15 17:30--BB

Dear reader,
I am trying to implement SPI communication between the DA14580 and a host mcu, for data package transfer. The DA14580 is acting as a SPI slave (8-bit, POL=0, PHA=0, bi-directional FIFO, DREADY interrupt line, own flow control). As a starting point I used thespi_hci.c. However, I noticed that thespi_hci_write_func()is blocking and is not - as thespi_hci_read_func()is - interrupt based. I am trying to make the write function interrupt based, however some things are not clear to me:

SPI driver slave mode.

Tue, 2015-11-10 17:45--zwang308

Hi Dialog,

I am using your SPI driver and configure it as slave mode. The Rx side seems to be fine, but for Tx side, I always get two bytes of junk data(always the last two bytes of the previous package).

e.g.

I want to send 01 02 03 04 05 for the first package and data received by master side is 00 00 01 02 03; I send the package again and for this time, data received by master is 04 05 01 02 03.

The source code is pasted below:

When DA14580 go to ext-sleep mode, then BLE stops.

结婚,2015-01-28 11:49--Maro

Hi Support Team,

I 'm creating the software from fh_proxr_sdk (v3.0.6) and added SPI slave driver.

The SPI slave driver works well on #undef CFG_EXT_SLEEP condition.
But on EXT_SLEEP mode, BLE stack seem to be stopped.

BLE works in IDLE mode(just after start up).
But BLE stack stops after entered EXT_SLEEP mode .

I found that the problem is related with spi_dready_high(); operation.

If I don't call spi_hci_flow_on_func() (the function include spi_dready_high();) at initializing, BLE stack doesn't stop after entered EXT_SLEEP mode ..

Subscribe to RSS - SPI slave