ryankurte / efm32-base

Base project for Silicon Labs EFM32 microcontrollers
89 stars 33 forks source link

efr32mg1p RAIL library doesn't transmit IEEE 802.15.4 frames? #21

Open osresearch opened 4 years ago

osresearch commented 4 years ago

image

The EFM32 MicroPython port recently switched to using efm32-base for its headers and libraries; before it had its own import of the gecko_sdk and rail. However, after this change the device doesn't seem to be able to transmit -- everything else with the 802.15.4 radio mode works fine, but packets just don't seem to reach the other side.

I bisected the patches and found that this change in the library from rail/TARGET_EFR32_1/librail_efr32xg1_release.a to efm32-base/protocol/bluetooth/lib/EFR32MG1P/GCC/librail.a is the one that broke it: https://github.com/osresearch/micropython/commit/8b375bd861d2027b2422132e7db606a91eaa63de#diff-d4c7b5c5d3162a974a48093ebb03c72fR45

Linking the new image against the old library also works and restores TX functionality. One thing I noted is that the library in efm32-base has bluetooth in the name, so I'm curious if there was a different RAIL library that has the 802.15.4 support or if we're picking up the wrong library? The part is an EFR32MG1P132G1 (shown in the above photo), so I'm hoping that means the EFR32MG1P librail.a is the correct one.

osresearch commented 4 years ago

Adding calls to RAIL_GetVersion():

And when I say "working", some of bits in the events are different between rail libraries, so TX completion events are not correctly delivered with 2.3, although the remote packet sniffer sees the bytes on the air. 2.7 claims that the packet have been transmitted, but nothing is seen on the remote end.