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.

  • Good morning Nigel,

     

    VE3ID said:

    God ettermiddag kjære Håkon,

    (that's the limit of my Norwegian! :-) )

    God ettermiddag!

    I must say, you impress me with this greeting! :)

     

    VE3ID said:

    I set bits 4:6 in control at start of program, but clear them when I go to receive mode by writing 0x03 to the register.

    This is good, this means that IRQ's shall be present on the nRF24L respective GPIO pins (if/when occurring)

     

    VE3ID said:
    I did get one packet received on the weekend (noticed by hitting a breakpoint in my handler code) after I added CRC to my TX, but it seems that it may have been caused by RX of a local thermostat!  Since then I cannot receive packets I am sending, but my sniffer tells me they are going out.

    This can happen with wireless applications, especially if the CRC is weak (1 byte).

    Since it was only one payload received over the timeframe of a weekend, I think we can safely assume that the communication is not quite up and running yet.

     

    VE3ID said:
    I should mention that my target app is an audio store-and-forward radio relay system that does not need most of the protocol you have built in to your chip - as it is basically a UDP network if I can steal a term from 802.03.

    It sounds like you want to use the W_TX_PAYLOAD_NOACK feature?

    This is set in the feature register, field EN_DYN_ACK:

    If you are already using W_TX_PAYLOAD_NOACK and this bit isn't set, not much will happen.

    If you still have issues, could you try to dump the registers of the nRF24L01+ (both on PRX and PTX) and share the content here?

     

    PS: There is a "VDD_PA" signal on pin 11 which you can probe on your transmitter(s) - this will be high just before the transmission occurs on-air. If there's no pulses on this pin, the TX is not transmitting.

     

    VE3ID said:
    I have another question: I see you have a chip for 900 MHz ISM band, are you aware of any manufacturer that makes boards to evaluate it?  It is a commonly-used band here in Canada for ISM as well as amateurs, and my spectrum analyser only goes to 999 MHz so it would help me debug!

    We do have this chip, but unfortunately we do not have modules. Our main focus the last 10-20 years has been on 2.4 GHz domain and the nRF905 / nRF9E5 has not been updated since they were released back in mid/late-00, so unfortunately there are not many modules officially available from us. However, I have seen cost-effective nRF905-modules available on sites like ebay/amazon/etc.

     

    Kind regards,

    Håkon

  • Hi Nigel

    from your comment:

    I set bits 4:6 in control at start of program, but clear them when I go to receive mode by writing 0x03 to the register.

    Please note that a t PRX you only need to activate (clear) bit 6 of config register

    at start.   After any IRQ at PRX it must be cleared ( setting 1 ) bit 6 of status register

    At PTX side , if PRX side fails receiving and there is not ack, at PTX, it TXfifo will be full in a short time (3 packets) and stop trasmiting.

    Please try to flush TXFIFO at PTX before sending a new packet (command E1)

    You also try to flush  RXFIFO at PTX to be sure that packet will be captured.

    I have used at first tests a simple mode compatible with older model of 24L01 , no EN_AA in Reg 01 . Please see:

    data sheet 77 , Appendix B - Configuration for compatibility with nRF24XX

    Later I get all working with the suggestions of obrevekk, but using commands E1 and E2.

    Regards, Osvaldo

  • Thank you, lots to think about.  But did you miss the comment I made that I am trying to UDP-like TX and RX, so I will not be looking for ack at any time.  It is for an audio RF linking system where the odd error is inconsequential.  All units have exactly the same image and their job is to receive a packet and pass it on to the next node without checking.

  • Hi Nigel,

     

    Did you look into the question that I posted?

    Håkon Alseth said:

    If you still have issues, could you try to dump the registers of the nRF24L01+ (both on PRX and PTX) and share the content here?

     

    PS: There is a "VDD_PA" signal on pin 11 which you can probe on your transmitter(s) - this will be high just before the transmission occurs on-air. If there's no pulses on this pin, the TX is not transmitting.

    Having the register dump from both your transmitter and receiver will greatly help in debugging what might be problematic.

     

    Kind regards,

    Håkon

  • Sorry for the tardiness, I have been tied up in maintenance in some other projects :-(

    [MCUXpresso Semihosting Telnet console for 'Frere LinkServer Debug' started on port 57352 @ 127.0.0.1]
    
    
    Sending init_String  
    
    FF FF 20 7A 21 00 22 01 23 05 24 00 25 1E 26 06 2A E7 E7 E7 E7 
    E7 2B E7 E7 E7 E7 E7 2C E7 2D E7 2E E7 2F E7 30 E7 E7 E7 E7 
    E7 31 20 32 00 33 00 34 00 35 00 36 00 3D 01 
    
    Dumping nRF24l01 registers
    
    0x00 A8 C8 E8 08 28 48 68 88 A8 C8 E8 08 28 48 68 88 
    0x10 A8 C8 E8 08 28 48 68 88 A8 C8 E8 08 28 
    
    Transmitting Startup Announcement 
    (On air, receipt confirmed by packet sniffer)
    
    B0 46 72 65 72 65 20 52 61 64 69 6F 20 53 79 73 74 65 
    6D 20 69 6E 69 74 20 56 45 33 49 44 0D 0A 07 FF 
    
    In main loop  
    
    Dumping nRF24l01 registers
    
    0x00 A8 C8 E8 08 28 48 68 88 A8 C8 E8 08 28 48 68 88 
    0x10 A8 C8 E8 08 28 48 68 88 A8 C8 E8 08 28 27
    
    Entering Receive mode  
    
    20 0F 27 40 27 20 27 10 
    
    Dumping nRF24l01 registers
    
    0x00 A8 C8 E8 08 28 48 68 88 A8 C8 E8 08 28 48 68 88 
    0x10 A8 C8 E8 08 28 48 68 88 A8 C8 E8 08 28 17 
    
    then so and so in a loop:
    
    FF 17 FF 17 FF 17 FF 17 FF 17 FF 17 FF 17 FF 17 FF 17 FF 17 
    FF 17 FF 17 FF 17 FF 17 FF 17 FF 
    
    loops here looking for RX buffer full flag.
    

Related