This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI Master

I have been trying to implement a SPI Master on the nRF51822 Eval board in order to read data from an Analog Devices ADXL345 3-axis Accelerometer. I chose to start with the project spi_master_example, which is targeted at the nRF6310 board. All I did was to swap over the pin allocations (in example_config.h) for SPIM1_MOSI and SPIM1_MISO so that I could use 2 jumpers on header P5 to connect SPIM1_MOSI to SPIM0_MISO and SPIM1_MISO to SPIM0_MOSI. I also changed any references in the project options from NRF6310 to NRF10001. It compiles, loads and runs, but the LED shows an error with and without the jumpers installed. Please can anyone help.

Parents
  • Hi Stefan, I have read the thread you posted and I had already changed all references to the board. However, this example does not use "boards.h". Instead it uses "example _config.h" and that is where I changed the pin allocations.It turns out that my problems were self-inflicted - I had mis-read the code and had incorrectly allocated the pins. Once I had corrected my error, everything worked correctly. Sorry to have wasted your time.

  • Hi Julian

    I apologize for guiding you incorrectly. I did not realize that the example did not use boards.h. Thanks for pointing that out. I am however very glad to hear that you found the problem. No , you are not wasting my time. My job is to answer your questions the best way I can, so feel free to post any additional questions you might have.

Reply Children
No Data
Related