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

PTX

Hello Nordic,

I try to establish communication between an ATmega328 based board an an Arduino Nano, so far without success. The goal is to improve a RF433 "Wire". 3 weeks ago, I started the project, but for 1 week, I do not make any progress. Please have a look to the attached pdf. Obviously I tried different settings, but probably not the right one! I spent time on internet, but didn't find how to fix.

Hope you can help, thank you anyway for your time.

JacquesNrf24L01+.pdf

  • Hello Kenneth,

    I am sure my payload is 4 bytes long.
    EN_RXADDR is set by Arduino sketch:
    radio.openReadingPipe(1, address[!radioNumber]); // using pipe 1
    I do not understand your remark about TX_ADDR. My code sets reg 0x10 to 0xE7E7E7E7E7 (default value) when on the PRX side (Arduino) this address is allocated to Pipe 1 when Pipe0 is 0xC2C2C2C2C2:
    RX_ADDR_P0-1 = 0xc2c2c2c2c2 0xe7e7e7e7e7 
    so EN_RXADDR = 2 should fit. Am I right ? Anyway I forced Arduino to allow pipes 0 to 3 to receive, but still no luck.

    I monitor all registers value on the PTX side :
    Reg 0 = 0b00001000 Reg 1 = 0b00111111 Reg 2 = 0b00000011 Reg 3 = 0b00000011 Reg4 = 0b00000011 Reg 5 = 0b00000010 Reg 6 = 0b00001111 Reg 7 = 0b00001110 / 0b00001111 Reg 8 = 0 Reg 9 = 0 Reg 0x0A = 0xE7..... Reg 0x0B = 0xC2.... Reg 0x0C = 0xC3 Reg 0x0D = 0xC4 Reg 0x0E = 0xC5 Reg 0x0F = 0xC6 Reg 0x10 = 0xE7... Reg 0x11 to Reg 0x16 = 0 Reg 0x17 = 0b00000001 / 0b00010001 Reg 0x1C = 0 Reg 0x1D = 0

    More difficult on Arduino side, unless the config ones, I try to modify the sketch...

    Best regards

    Jacques

  • Hi Kenneth,

    today I bring you some good news, finally it works! Since the early days, my code is OK, BUT I discovered by chance that my AVR board needs a cold restart (switch off wait 5sec switch on again) instead of the reset at the end of programming with AVRDUDESS. So far I don't understand why, but I will investigate deeper. May be the 1000µF capa keeps some registers in a wrong status ?
    I would like to thank you very much for your time and advises.

    With best regards

    Jacques

    RF24/examples/GettingStarted
    Which radio is this? Enter '0' or '1'. Defaults to '0'
    radioNumber = 0
    *** PRESS 'T' to begin transmitting to the other node
    SPI Speed = 10 Mhz
    STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
    RX_ADDR_P0-1 = 0xc2c2c2c2c2 0xe7e7e7e7e7
    RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
    TX_ADDR = 0xc2c2c2c2c2
    RX_PW_P0-6 = 0x04 0x04 0x04 0x04 0x04 0x04
    EN_AA = 0x3f
    EN_RXADDR = 0x03
    RF_CH = 0x02
    RF_SETUP = 0x0b
    CONFIG = 0x0b
    DYNPD/FEATURE = 0x00 0x00
    Data Rate = 2 MBPS
    Model = nRF24L01+
    CRC Length = 8 bits
    PA Power = PA_LOW
    ARC = 0
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321!
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321"
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321#
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321$
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321%
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321&
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321'
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321(
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321)
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321*
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321+
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321,
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321-
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321.
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 321/
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 3210
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 3211
    [Reading 4 bytes 0 blanks]
    write_register(07,40)
    Received 4 bytes on pipe 1: 3212
    [Reading 4 bytes 0 blanks]

  • Good that you have found the issue, &Thanks for updating the case! 

    Kenneth

  • Hello Kenneth, me again,

    now I am the king of PTX ;-) I can tell you why some regs didn't work as expected. It comes from the ATMega programmer tool which uses SPI to upload flash memory and sometimes, at the end of the reading check, does not release all SPI lines, same lines used for accessing NRF24L01 regs. I use AVRDUDESS and USBASP. May be this can have some interest for you and others...

    By the way, now I am playing with PRX mode... and obviously, I am again pulling my hairs : FIFO_STATUS returns 0b00000011 which means RX FIFO full and RX FIFO empty  (impossible if I understand well) after CE set high and 200µs wait. I suspect a damaged device but I have no spare to check it. Do you have another good explanation ?

    Where to buy official modules ?

    Thank you for supporting me

    Best regards

    Jacques

Related