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

nrf24l01+ crc problem

Hi,

I have been using nRF24 in many projects with Arduino. So far quite good experience.

Now I transfer to STM32 and have a strange problem, I cannot send with STM32 as MCU as soon as CRC is active (receive works fine). When I disable CRC (and of course Auto_ack off) everything works fine, stable and fast. As soon as I enable CRC only very view packages come through. I checked CRC length, payload length and all relevant registers on TX / RX device several times, have tried different modules from different sources, with power supply and tested different SPI configurations (although it looks fine, I can write and read registers reliably). Result always the same. I do not use any library on STM and the RF24  library by TMRh20 on Arduino. I have compared all possible register settings on both systems.

Currently I`m running on a STM32F407ZGT, use CubeMX (several versions tested) with HAL (several libraries tested).

I understand that the question for help is a bit abstract in that case, but what can go wrong when calculating CRC and how can I check / fix?

Thanks!

Parents Reply
  • OK - success.

    It worked with noack method. Than I went step by step backwards until normal ESB with ack and now also that worked. I got curious what has actually changed and found the problem: When I clock in the payload at exactly the same size as  payload size in RX_PW_P0 it works. If the size doesnt match (actual payload to transmit smaller than value in RX_PW_P0) it doesnt work. That is a bit surprising as I havent interpreted the datasheet like this and it worked on Arduino - maybe something in the library that added the missing payload with zeros ... I will check. But now I know ...

Children
No Data
Related