cancel
Showing results for 
Search instead for 
Did you mean: 

STM32: how to use an nrf24l01 transceiver

vito
Associate II
Posted on March 26, 2015 at 07:20

Hi to all,

I have two stm32f3 discovery with 1 nrf24L01 transceiver on each one.  I want to send a packet from one and receive this packet on the other one. Can someone help me? I have no idea. Thanks...
12 REPLIES 12
gvigelet
Associate II
Posted on March 26, 2015 at 15:54

Hi, 

Here is a resource that should help you out, basically you just need to make a SPI connection to the module and issue commands for configuring the module and transmitting and receiving.  I believe the resource provides an implementation for SPI and GPIO implementations.

http://stm32f4-discovery.com/2014/06/library-17-nrf24l01-stm32f4xx/

Thanks,

George 

vito
Associate II
Posted on March 27, 2015 at 21:59

it seems good thanks...

i think i have to change that code to make it campatible with F3, since it is originally for F4. Can you help me on that?

I think i have to change the pins, stuff about alternate function...what else?

thanks again

gvigelet
Associate II
Posted on March 30, 2015 at 16:28

The quickest way to get up in running is to use the Cube middleware, I would suggest using the gpio implementation library that is on that page to get you up and running then migrate the to the SPI version if needed.  To migrate the code, you should be able to get away with the .c file as is and change the includes on the .h file to refelect the stm32 f3

#include ''stm32f3xx.h''

#include ''stm32f3xx_gpio.h''

Then in your defines.h set up the pins you configured in stm32cube for GPIO and you should be up in running.

Thanks

vito
Associate II
Posted on April 04, 2015 at 21:54

I'm using IAR at the moment. isn't it good enough?

Anyway, i tried the code above, getting the missing library from

https://github.com/MaJerle/stm32f429

Some libraries include only .h file, and then call functions defined in the .c file (not included) rather than the included .h with same name. Another library include himself. It seems bad code...

Posted on April 04, 2015 at 23:15

I'm using IAR at the moment. isn't it good enough?

I'd imagine it's just fine. You might however just want to use the F3 standard peripheral library, and review the SPI support there.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
vitto4ever
Associate II
Posted on October 02, 2015 at 11:23

hi, have you resolved your problem? if yes, can you help me? I have the same problem and I don't know what I have to do.

Amel NASRI
ST Employee
Posted on October 07, 2015 at 15:54

Hi squa.paul,

It should be better to initiate a new discussion in which you describe precisely your problem and in which environment (HW/FW...).

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

vitto4ever
Associate II
Posted on October 09, 2015 at 17:40

I didn't initiate a new discussion becouse I saw this post from arci.vito that has the same problem I have, with the same HW. 

Posted on October 09, 2015 at 18:13

So you have two STM32F3-DISCO, with NRF24L01, IAR tools, and no idea what you're doing?

The problem with these types of question is that they're chronically open ended. I think you're going to have to read the related documentation, and look at implementation examples on this, and other, platforms to get a sense of what's required. When you have a specific question about a particular facet of the problem, or why a particular piece of code isn't working, frame it as such.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..