nRF24LE1 + STM32F101

Hello,

I am new to this board, and am not sure whether this fits here in or with the ARM section.

However, I have two devices, each equipped with the STM32F101T8 MCU, and the nRF24LE1 chip.

Is it possible for me to set up a RF link between the two devices, without using the MCU on the nRF24 chip, using only SPI(or USART or I2C althoug SPI is preferred) commands(STM32 as master of course)? And how would I go on about to do that?

with regards, Finisboy

You will have to use the MCU on the nRF24LE1, as it has no way to be set up in a slave-type mode. The nRF24L01+ would be the proper chip to use if you wanted to operate in this manner.

Hi brennen,

Are you absolutely sure about this, but could it be used in master-type mode, and the STM32 as a slave?

If not, what type of programmer would I have to use in order to program the nRF24LE1?

with regards, Finisboy

In either case, you will have to run the nRF24LE1’s MCU. You could use the nRF24LE1 as a slave to the STM32 if you wanted to, but you would have to write code to run on the nRF24LE1 allow it to do this. If you wanted to use the nRF24LE1 as a master, this can also be done, but, once again, you will have to write code to get it to work.

For programming an nRF24LE1, I developed my own programmer based on an LPC2148 board from Olimex (purchased from Sparkfun). I program in my bootloader first, which then allows you to program the device over a serial connection (MAX3232 or FT232R) using my PC bootloader application. The nRF24LE1’s that I sell come pre-programmed with the bootloader in flash memory.

Hi brennen,

Thanks for the reply. Is it at all possible to get the circuit drawings from you of the programmer?

with regards, Finisboy

nRF24LE1.FCSN → LPC2148.P0_20, configured as GPIO/output

nRF24LE1.FSCK → LPC2148.P0_17/SCK1, configured as SCK1(SPI1)/output

nRF24LE1.FMOSI → LPC2148.P0_19/MOSI1, configured as MOSI1(SPI1)/output

nRF24LE1.FMISO → LPC2148.P0_18/MISO1, configured as MISO1(SPI1)/input

Since I don’t know which package variant of the 24LE1 you’re using (24-, 32-, or 48-pin), I can’t tell you which pins the flash SPI functions (FCSN, FSCK, FMOSI, and FMISO) map to. See sections 17.3.1, 17.3.2, and 17.3.3 of the nRF24LE1 datasheet, as these functions are on different pins for each of the variants of the chip.

Hi brennen,

Thanks for the reply. Does this mean, i can just buy this board: http://www.sparkfun.com/products/676

And connect it accordingly. Then I can download your source code which you use for programming your breakout boards here: http://www.diyembedded.com/programmer/n … rammer.zip?

btw. I have the 24 pin variant, meaning I connect pins P0.2-P0.5 accordingly, and I need to have the PROG pin set high as well right?

with regards, Finisboy

finisboy:
Thanks for the reply. Does this mean, i can just buy this board: http://www.sparkfun.com/products/676.

That's the exact board I'm using. Do keep in mind that you'll have to wire up a UART circuit to that board. I would recommend the FT232R breakout that breaks out all of the pins ([http://www.sparkfun.com/products/718](http://www.sparkfun.com/products/718)), as it breaks out both the RTS and DTR pins on the FT232R to allow you to automatically program the LPC2148 code with Flash Magic. Here is how to connect the FT232R to the LPC2148:

FT232R.RXD → LPC2148.P0_0 (configured as output, UART/TXD)

FT232R.TXD → LPC2148.P0_1 (configured as input, UART/RXD)

FT232R.RTS → LPC2148.P0_14 (configured as input, GPIO)

FT232R.DTR → LPC2148.RST

Alternatively, I have code that allows an nRF24LE1 to program another nRF24LE1. You could order one of my nRF24LE1-24 boards ([chip antenna version or [RP-SMA connector version) and [FT232R breakout to do the same thing and save about $15. If you wanted to go this way, I could provide you with the connections, as well.

finisboy:
Then I can download your source code which you use for programming your breakout boards here: http://www.diyembedded.com/programmer/n … rammer.zip?

In either scenario, send me a private message with your email and I will send you the programming code. That link is for the PC application that communicates to nRF24LE1/nRF24LU1 chips with the bootloader already installed in the microcontroller's flash memory.

finisboy:
btw. I have the 24 pin variant, meaning I connect pins P0.2-P0.5 accordingly, and I need to have the PROG pin set high as well right?

Yes, I forgot the PROG pin. That goes from nRF24LE1.PROG to LPC2148.P0_21, configured as GPIO/output.](http://store.diyembedded.com/index.php?main_page=product_info&cPath=5&products_id=21)](http://store.diyembedded.com/index.php?main_page=product_info&cPath=1&products_id=13)](http://store.diyembedded.com/index.php?main_page=product_info&cPath=1&products_id=12)