10 years, 1 month ago.

Connecting nRF24L01 to FRDM-KL46Z48M Board

Hello,

I am working on a project where I would like to use nRF24L01 with FRDM-KL46Z48M board.. However I am a bit confused about which mbed pins to connect to the nRF24L01 pins ?

What should be the proper update for the pins in this line in order to get the code working as the freedom board does not have p5, p6, p7, p8, p9, p10 pins ?

nRF24L01P my_nrf24l01p(p5, p6, p7, p8, p9, p10); mosi, miso, sck, csn, ce, irq

Thanks in advance, Moustafa

Question relating to:

1 Answer

10 years, 1 month ago.

Hi Moustafa,

From your profile, it looks like you're using the KL46Z dev board. The nRF24L01 uses the SPI interface. The p5, p6, p7, p8, p9, p10 pin names are a reference to the pinouts of an LPC1768 platform, which I'm assuming was used by the developer of this library. From the pinout diagram, there are two SPI busses you can use on your board:
SPI0 : PTA15-PTA17
SPI1 : PTD5-PTD7

It looks like the Green LED on your board uses PTD5, so probably better to use SPI0. I believe the CSN, CE and IRQ can be any digital pins.

Your code would look like the following (with csn, ce and irq replaced with the pin you've physically connected them to):

//Example declaration using SPI0 on PTA
nRF24L01P my_nrf24l01p(PTA16, PTA17, PTA15, CSN_PIN, CE_PIN, IRQ_PIN); //mosi, miso, sck, csn, ce, irq


https://developer.mbed.org/media/uploads/sam_grove/slide2.jpg https://developer.mbed.org/media/uploads/sam_grove/slide3.jpg https://developer.mbed.org/platforms/FRDM-KL46Z/

Harsh

Accepted Answer

Thanks a lot that solved the problem for me..

posted by Moustafa Alzantot 19 Oct 2014

Thanks for your support :)

posted by Amr Abdelhafez 20 Oct 2014

Hi! I´m using the kl46z and the nrf24l01 too. could you tell me in which pins did you connect CSN_PIN, CE_PIN, IRQ_PIN to the KL board please?

posted by Fernanda Suarez 29 Oct 2014