Low level 802.15.4 transmit code

I am trying to make a simple MAC-layer transceiver using Arduino environment.  I have some code derived from this example: https://github.com/IoTS-P/nRF52-802154-Raw-Transmitter
and have discovered that it hangs after one to a few hundred transmissions.  I have gone over the datasheet for the 802.15.4 radio section and I do not see where the problem is.I am using a Zena receiver to monitor the transmissions.  I noticed that the CCA appears to take some tens-of-mS fairly often while the Zena does not show any other messages arrived during that time.  What am I doing wrong with the radio hardware?

<project files attached>

Parents
  • Hi DU_radio,

    The repo looks lt uses PlatformIO and the API is a unknow to me. It is hard for us to review something that is using external SDKs, too many unknows to properly give you a proper debugging direction. 

    Regarding the radio handling, I can say one thing that you did not seem to have handled failed CCA scenario properly, it is wise to do a cleanup, deinit and reinit in that case. Also there are a lot of hardcoded values in your code, not very pleasant to read or review. I suggest you take this question to a proper forum API you are using here to implement this.

  • Susheel,

        Thank you for your advice on CCA cleanup.  Does it need a full powerup init (and if so why?) or just the CCA threshold and clear events and re-enable the tasks? I ask because a full powerup init when CCA_IDLE was false did not help.

         The code has most of the constants from the original GIT repo (not my project), these are the register addresses in the nRFD52840 datasheet so I thought they would be more meaningfull to the Nordic hardware folks.  Also I was trying to avlod introducing more problems by incorrectly editing the register references.  Yes it is certainly ugly. Once it is working I will do a major code cleanup.

    Since this is a Nordic radio issue and not related to the platform it was built on, is there another forum that would be better suited to troubleshooting the radio?

    Darryl

  • Susheel,

         If you have any low level transmit example code in C, for any platform, that would likely provide the quickest solution.   There was some on the Nordic site at one time but it seems to have been taken down some years ago.

  • So DU_Radio, 

    We unfortunately do not have that as we are working with nRF Connect SDK now. 

Reply Children
  • Do you have perhaps, a detailed flowchart of how to configure and operate the radio? Or perhaps someone who could correct the rather simple low-level radio software that I attached?  Only radio.c access the hardware. The project can be build with Arduino 1.8 IDE, most college engineering students could handle that.  Or are you suggesting that Nordic has lost the tribal knowledge to run their own hardware?

Related