Good Morning,
It is some time I'm having issues while using DA14580 as an SPI slave. My implementation is based on "prox_reporter_ext_spi" example.
Setup:
The current pin configuration is as follows (same as in the example):
GPIO_ConfigurePin(SPI_GPIO_PORT, SPI_CLK_PIN, INPUT_PULLUP, PID_SPI_CLK, false);
GPIO_ConfigurePin(SPI_GPIO_PORT, SPI_CS_PIN, INPUT_PULLDOWN, PID_SPI_EN, false);
GPIO_ConfigurePin(SPI_GPIO_PORT, SPI_DO_PIN, OUTPUT, PID_SPI_DO, false);
GPIO_ConfigurePin(SPI_GPIO_PORT, SPI_DI_PIN, INPUT_PULLDOWN, PID_SPI_DI, false);
Besides DA14580 we have another slave using the same SPI interface (except the CS pin) - SPI flash.
The master is STM32L4.
Parameters:
While trying to use different SPI clock frequencies we settled on 1.25MHz which provides a stable communication.
In addition in order to make the communication stable I had to add delay of several milliseconds after each SPI transaction.
Issues:
1. Sometimes the communication with the SPI flash gets "stuck" and nothing but system reset helps.
2. After the initial initialization of DA14580 (reset via the reset pin and software loading via UART) in order to
reset DA14580 again I have to perform several reset sequences (reset ON/OFF) with delay in between in order
to start loading the software via UART.
Questions:
1. While reading the serial boot document (AN-B-001) I noticed that the maximal recommended SPI clock speed is 500kHz.
Would you advice to use 500kHz instead of 1.25MHz in my case and why?
2. In most cases that I've seen, SPI interface pins are not configured with pull up/down resistors except the CS pin.
Would you advice to remove these pull up/down settings? If you suggest to leave them as is please explain why.
3. Any reasons regarding the described "reset" issue?
Thanks in advance,
Ron.
Hi shpasser,
Thanks for you question online. Do you have a custom board with the DA14580 and STM32L4? When the DA14580 acting as SPI Slave, we have observed some issues with the cables’ sensitivity. Regarding the sensitivity, due to spikes and reflections, in most of the cases, this was the reason that there wasn't any communication from the DA14580's side towards the master. Would it be possible to use a logic analyzer, probe the SPI lines and share an SPI capture?
Regarding your questions, I will check them internally and let you know.
Thanks, PM_Dialog
I am indeed using a custom board with STM32L4 and DA14580 on it.
I checked with our board designer and he says there is no way we will be able to connect a logic analyzer.
Thanks in advance.
Please answer my questions
Hi shpasser,
Apologies for the delay and thanks for pinging me – probably I missed your previous reply. Please find below me answers:
Thanks, PM_Dialog