5 years, 7 months ago.

Multiple spi failure

Dear,

I'm working on a project to read a voltage from an external ADC (TI ADS1262) using SPI1 of the nucleo L432KC. This works fine.

I want to send these values wireless with the nRF24L01P using the library. But when i declare the RF module on SPI3, the read from SPI1 are not correct anymore.

nRF24L01P my_nrf24l01p(D11, D12, D13, A3, D9, D10); mosi, miso, sck, csn, ce, irq

When i put this declaration in comment, everything is working fine again.

Both components and libraries are working fine individual, but not together.

nRF24L01P Library : https://os.mbed.com/users/Owen/code/nRF24L01P/docs/8ae48233b4e4/classnRF24L01P.html#a6eef162ab8f42f677ea451534abcc164

ADS1262 Connections:

  1. define ADS1262_CS_PIN D1
  2. define ADS1262_START_PIN A1
  3. define ADS1262_PWDN_PIN A0
  4. define ADS1262_MOSI_PIN A6
  5. define ADS1262_MISO_PIN D10
  6. define ADS1262_SCLK_PIN A4

Any suggestions?

Regards, Lucas

1 Answer

5 years, 7 months ago.

Hello Lucas,

It seems that you are using pin D10 for two purposes at the same time ( ADS1262_MISO and nRF24L01P IRQ ). If you really need to have an IRQ line for the nRF24L01P then try to select a pin which is not used for any other function in your program. Otherwise just omit it in the constructor (IRQ defaults to NC - Not Connected), for example as follows:

nRF24L01P my_nrf24l01p(D11, D12, D13, A3, D9);     //mosi, miso, sck, csn, ce

ADVISE: To have a more readable code published here (on mbed pages) try to mark it up as below (with <<code>> and <</code>> tags, each on separate line at the begin and end of your code)

<<code>>
text of your code
<</code>>