RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.94k stars 1.99k forks source link

SAMR30 with LWMAC #13633

Closed samken600 closed 3 years ago

samken600 commented 4 years ago

I have been working on trying to get LWMAC working with the SAMR30-XPRO boards for a little bit now and have noticed there seem to be problems with the boards receiving things. Debug outputs suggest that both LWMAC and the at86rf2xx radio drivers are fine sending things, with TX_SUCCESS states being entered correctly, but after an RX_START (NETDEV_EVENT_RX_START) is sent an RX_COMPLETE (NETDEV_EVENT_RX_COMPLETE) is never received!

In fact, it seems to not be entering the _recv function at all...

I was wondering if anyone had any experience either with the at86rf2xx drivers or LWMAC and the SAMR30s and could offer me some advice on this. I have confirmed that it works fine with the SAMR21s, which use the AT86RF233 instead of the AT86RF212B used in the SAMR30 chips.

Any help is appreciated! Thanks

jue89 commented 4 years ago

There were a few pull requests related to the samr30-xpro board around, which have been merged recently. Does your problem still persist with the current master?

samken600 commented 4 years ago

There were a few pull requests related to the samr30-xpro board around, which have been merged recently. Does your problem still persist with the current master?

I should clarify that, without using the LWMAC protocol, wireless communications works fine. I am already using the SPI clock rate redefine you committed a bit ago and know that the antenna is transmitting properly from a separate receiver I have been using for testing. Seems to be something a bit wrong with the internals when receiving, although can't figure out what.

I will try updating to master anyways and seeing if that fixes anything! Will reply again if it does. UPDATE: Have confirmed updating to master does not fix the issue.

samken600 commented 4 years ago

Sorry for forgetting about this! I realised the main source of the issue is that I had forgotten to recalibrate the timings of the MAC layer to something more reasonable, since the timings were for the faster 2.4GHz on the SAMR21s. I have done this now and it works, but is quite unreliable. I was wondering if anyone else had some timings for the layer that they found to be more reliable? Thanks

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.