6 years, 6 months ago.

SPI not functioning correctly

I am using the Nucleo board with the nRF24L01P chip library (found here: https://os.mbed.com/cookbook/nRF24L01-wireless-transceiver). If I use two mbed chips, the rf chips talk to each other just fine. When I try the same thing with the nucleo, the default settings are different and the correct tx and rx registers cant be found. I took some screen shots of the spi signals of both mbed and the nucleo and they appear different but I dont know how to fix that. The nrf library seems to instantiate the correct polarity and phase of the SPI but nothing works. I have posted the screen shots and my code below.

/media/uploads/vceyssens3/nucleo_waveform.png

/media/uploads/vceyssens3/mbed_waveform.png

https://os.mbed.com/users/vceyssens3/code/Nucleo_blink_led/

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32L031K6T6 microcontroller.

Hey From your report, it's hard to tell whether issue comes from SPI or anywhere else. You'd need to instrument the library and see what fails. I don't have a nRF24L01P to test with. Can you share the first console logs of the working setup and the failing one ?

posted by Laurent Meunier 26 Oct 2017

The first console logs for the working setup: nRF24L01+ Frequency : 2402 MHz nRF24L01+ Output Power: 0 dBm nRF24L01+ Data Rate: 1000 kbps nRF24L01+ TX Address: 0xE7E7E7E7E7 nRF24L01+ RX Address: 0xE7E7E7E7E7

Console Log for failing setup: nRF24L01+ Frequency : 2400 MHz nRF24L01+ Output Power: -18 dBm nRF24L01+ Data Rate: 1000 kbps nRF24L01P: Unknown getTxAddress width value 0

The code throws an error after this last entry because it didnt find the correct TX address

posted by Vincent Ceyssens 29 Oct 2017
Be the first to answer this question.