Hi,
I am using the DA14580 as SPÏ master to exchange data with an external controller.
It appears that performances are really bad (mainly due to the latency, around 4µs between each byte sent) with the spi driver. Is there another driver that would allow me to get an higher baudrate?
Thanks!
_Matthieu
Device:
Hi Matthieu,
Sorry, but there is no better version of the spi driver, the approximatelly 4 us is the amount of time that the da waits until the transmition of the data is over. I assume that you dont use the FIFO. Try to use it in the mode you prefer in order to send data faster. The times between bytes will decrease.
Thanks MT_dialog
Hi,
你有一个例子,使用先进先出? The chip is acting as master.
Thanks.
_Matthieu
Hi Matthieu,
Sorry, but there is no example using the SPI with the FIFO. Please have a look at the datasheet in order to implement.
Thanks MT_dialog
Hi,
The datasheet does not give precise details about the way to use it. Do you have some guidelines?
Thanks.
_Matthieu
Hi again,
The main thing is that I do not understand why the FIFO would decrease the timing wetween two bytes.
_Matthieu
Hi Matthieu,
Sorry but there is no documentation in how to use the FIFO in SPI.
But if you try to set your FIFO in TX_MODE for example like this: SetBits16(SPI_CTRL_REG1, SPI_FIFO_MODE, 0x02); and then call something like this:
spi_cs_low();
while(1)
{
if(GetBits16(SPI_CTRL_REG, SPI_TXH)==0)
{
SetWord16(SPI_RX_TX_REG0, (uint16_t)i); // write (low part of) dataToSend
}
i++;
}
spi_cs_high();
You will see that the time between each successive byte decreasing.
Thanks MT_dialog