cancel
Showing results for 
Search instead for 
Did you mean: 

nrf24l01 on nucleo F411re

baptor
Associate III
Posted on February 26, 2018 at 15:00

Hello everybody, I am new in using nucleo's boards and especially F411re. I 'am trying to interface a nrf24L01 module on this board ( not using mbed ), and for now, I'am still lost into the use of the TM_STM32F4_nrf24l01 lib . I am using sw4stm and I wonder if somebody have a complete eclipse projet that could be opened by sw4stm and be loaded on my nucleo f411re? 

thank a lot

Baptiste.

#nrf24l01 #nucleo-f411 #stm32f4 #sw4stm32
1 ACCEPTED SOLUTION

Accepted Solutions
Zek_De
Senior
Posted on February 26, 2018 at 18:36

Yes ,Tilen Majerle,I used his library and converted as Hal Library.I dont remember If I shared the example.I am gonna look it later

View solution in original post

11 REPLIES 11
Zek_De
Senior
Posted on February 26, 2018 at 16:49

Hi,

I have a nrf24l01 library related with stm32 hal library ,I organized it using another library.Maybe it is usefull for you.

https://github.com/ZekDe/Libraries

 
baptor
Associate III
Posted on February 26, 2018 at 16:58

Thank you for your fast answer, I will try to implement it tonight and see if it work for me.

thanks again, I will keep you updated.

Baptiste

Andrew Neil
Evangelist III
Posted on February 26, 2018 at 17:42

You mean this:

https://stm32f4-discovery.net/api/group___t_m___n_r_f24_l01_p.html

?

The author, I believe is

Majerle.Tilen

‌ - maybe he will be along soon ...

I am new in using nucleo's boards and especially F411re

Do you have experience with using other boards and/or microcontrollers?

Do you have experience with programming in general?

I'am stilllost into the use of the TM_STM32F4_nrf24l01 lib

So what have you actually tried so far?

Where are you stuck?

Zek_De
Senior
Posted on February 26, 2018 at 18:36

Yes ,Tilen Majerle,I used his library and converted as Hal Library.I dont remember If I shared the example.I am gonna look it later

Zek_De
Senior
Posted on February 26, 2018 at 18:39

Also Ä°F you use stm32f0 or stm32f1 series ,you can come acroos with an alignment problem .about pointer ,and I fixed it by helps in Hal SPI Library with small changing

baptor
Associate III
Posted on February 26, 2018 at 20:25

Hi, yes I did use some pic16f84 long time ago, and since some years, I 'am using arduino boards ( high level programming, easy )... Today I have to use Nucleo board with the nrf module. I started by creating a cubemxproject in witch I set spi2 to communicate with nrf. I opened the project with sw4stm32, compiled it, added a LED_2 toggle to see something moving.

My first problem was to understand was was done in thetm_stm32f4_nrf24lc library and how to link it to my main().

Thanks to Emrah, now I have a more simple library that I understand better.

Mynewproblem is, how togive hspi2 to the nrf24Lc library .

I did :

TM_NRF24L01_Init(hspi2, 1, 32);

but I have no signal going out from spi port (I have a scope on MOSI pin ans clk). At less, I should see something moving on the MOSI pin during the Init of the nrf.

I attached my code at the state it is now.

I hope I am clear enough

Thank you

Baptiste

________________

Attachments :

NRF_SPI_simple_noOS_other.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxw5&d=%2Fa%2F0X0000000b2X%2FFltdmDUm_gl2e6G0Or67DFfbEHqbCVViQQOAOIHRXRE&asPdf=false
Tilen MAJERLE
ST Employee
Posted on February 26, 2018 at 21:08

Hello

Duatepe.Emrah

‌,

let us know what is the key problem in your development and we will try to help you.

Did you manage to get 'hello world' inside SW4STM32?

I would suggest you to move to TrueSTUDIO.

Best regards,

Tilen

baptor
Associate III
Posted on February 27, 2018 at 18:03

Hello everybody, I finally came across my problem, first i had the vcc pin of the nrf module that was on the +5V instead of the +3V3. I used mbed website to use a hello world that made me see this problem. I made two nucleo f411re board exchange data via nrf.

Then when I came back on SW4STM32 I did not success to make it work as on mbed.

So I checked all the function in the nrf24L01.c library that Emrah shared. I had two missing function that I recoded to fit my setup :

void

TM_NRF24L01_setCrcWidth(

SPI_HandleTypeDef

*hspi,

uint8_t

width);

void

TM_NRF24L01_disableAutoAcknowledge(

SPI_HandleTypeDef

*hspi);

after that, I successfully exchanged data between boards. here is the SW4STM32 project archive for those that would need a complete project.

Thanks for you help.

Baptiste

Posted on February 27, 2018 at 18:14

Here is the final project.

baptiste

________________

Attachments :

NRF_SPI_simple_noOS_other 2.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxvk&d=%2Fa%2F0X0000000b2O%2Few_RY_i1cNDy4KxsW1bMp11d8U0m1CvYIWKI.qZ1l4E&asPdf=false