Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
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:
- define ADS1262_CS_PIN D1
- define ADS1262_START_PIN A1
- define ADS1262_PWDN_PIN A0
- define ADS1262_MOSI_PIN A6
- define ADS1262_MISO_PIN D10
- 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>>