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

nRF240L01 with STM8L051F3

Hi, I am looking for procedure to make it work nRF240L01? I am getting documents for Arduino but as you know that is not understandable, with Arduino it worked but i don't understood. Now i want to make it work with STM8L051F3. STM8L051F3 is 8 bit ultra low power controller. I am looking for procedure like what steps i have to follow so i can send data to another nRF240L01. Which commands i have to send. I want to transmit data after every 1 sec and then it will go in power down. Receiver will be always in receiver mode.

Parents
  • Hi

    There are many guides online showing how to use the nRF24L01/nRF24L01+ with different microcontrollers. Usually the only thing different between different MCU's is how to handle GPIO's, and how to use the SPI interface, but I am sure there are examples showing you how to use the GPIO and SPI of the STM controller.

    One such guide which seems pretty thorough is this one.

    Earlier I also wrote some brief instructions, showing the easiest way to use the nRF24L01+ module with the dynamic payload length feature (allowing you to send packets between 1 and 32 bytes in length, without having to hard code the payload length in the receiver):

    -- PTX --
    
    1) Set the PWR_UP bit in the CONFIG register
    
    2) Set DYNPD to 0x3F
    
    3) Set the EN_DPL bit in the FEATURE register
    
    4) Upload a payload
    
    5) Pulse CE for 10 us
    
    6) Add a delay (1ms+) and repeat from 4)
    
    --PRX--
    
    1) Set the PWR_UP and PRIM_RX bits in the CONFIG register
    
    2) Set DYNPD = 0x3F
    
    3) Set the EN_DPL bit in the FEATURE register
    
    4) Set CE high
    
    5) Wait for the IRQ line to go low
    
    6) Read out the RX payload
    
    7) Repeat from 5) 
    

    For these instructions to make sense you should refer to the nRF24L01+ datasheet as well, in particular chapters 8 and 9.

    Best regards
    Torbjørn

Reply
  • Hi

    There are many guides online showing how to use the nRF24L01/nRF24L01+ with different microcontrollers. Usually the only thing different between different MCU's is how to handle GPIO's, and how to use the SPI interface, but I am sure there are examples showing you how to use the GPIO and SPI of the STM controller.

    One such guide which seems pretty thorough is this one.

    Earlier I also wrote some brief instructions, showing the easiest way to use the nRF24L01+ module with the dynamic payload length feature (allowing you to send packets between 1 and 32 bytes in length, without having to hard code the payload length in the receiver):

    -- PTX --
    
    1) Set the PWR_UP bit in the CONFIG register
    
    2) Set DYNPD to 0x3F
    
    3) Set the EN_DPL bit in the FEATURE register
    
    4) Upload a payload
    
    5) Pulse CE for 10 us
    
    6) Add a delay (1ms+) and repeat from 4)
    
    --PRX--
    
    1) Set the PWR_UP and PRIM_RX bits in the CONFIG register
    
    2) Set DYNPD = 0x3F
    
    3) Set the EN_DPL bit in the FEATURE register
    
    4) Set CE high
    
    5) Wait for the IRQ line to go low
    
    6) Read out the RX payload
    
    7) Repeat from 5) 
    

    For these instructions to make sense you should refer to the nRF24L01+ datasheet as well, in particular chapters 8 and 9.

    Best regards
    Torbjørn

Children
Related