-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spi communication with mrf24j40 fail but board can run test_spi sucessfully #7828
Comments
Some update I checked the SPI communication with an arduino and my board. I can write on the SPI from my board to the Arduino with sucess (using the configuration of my last message) I found out that some of my mrf24j40 had their connection between pad torn up (I had to resolder them because of a poor pad design). I changed all of the one that have been torn up. I still get the [MRF24J40] Initialisation failure but now it get 'through' the init process and display some message : interrupt, end IRQ, TX prepare I will investigate the read capability on the SPI of the microcontroller |
Hello,
These problems are the reason why there is code to test the communication between the SPI master and the mrf24j40. :)
That sounds like something that could be an issue. The rest of your config looks good to me, I would suggest raising the clock speed of the SPI to at least 1Mhz. Although 100Khz should work just fine, I've had some weird issues when the clock speed is too low. Do you have a logic analyzer or an oscilloscope available that you could use to verify the SPI communication between the atsamd and the mrf24j40? |
So I put the clock speed at 1MHZ and soldered way shorter wires to reach that speed and now it's working like a charm ! Thank you very much ! When you say
Where are they ? I just found the periph_spi under tests to test the spi but nothing directly related to mrf24j40 but in mrf24j40_internal.c if ENABLE_DEBUG is enabled |
Great to hear that!
Here is the code that verifies the SPI connection between the SPI master and the mrf24j40. It is only included when debug is enabled in |
So that's what I used primarily as debug function. It's indeed helpfull Thanks again |
Hello,
I have a custom board with an atsamd21e18a and a mrf24j40ma as transceiver.
I can't get to make the communication work between those devices.
Here is the hardware configuration of my board
Correspondance between the PAx and physical pin x have been triple checked.
So far, my board.h configuration concerning the mrf24j40
#define MRF24J40_PARAM_WAKE (GPIO_PIN(PA, 27))
And my periph_conf.h concerning the mrf24j40
makefile.deb is configured to import the mrf24j40 module and its include dir
With this configuration (without mrf24j40 autoinit or imported), I can sucessfully initialise and run the bench of test_spi on my spi_dev(0)
However, during the autoinit of the mrf24j40, the spi communication fail between the microcontroller and the mrf24j40 (message issued from mrf24j40_internal.c with ENABLE_DEBUG(1))
The mrf24j40 always respond 0x00, so the write and read tests fail.
What am I doing wrong ?
Thanks for your help
The text was updated successfully, but these errors were encountered: