cc2538_rf: implement Radio HAL#14791
Conversation
0b74149 to
7bd8ba3
Compare
|
I wanted to test but I would only get is this expected? |
benpicco
left a comment
There was a problem hiding this comment.
Ah this is only the lowest layer.
Well I can confirm that the old netdev part still works with examples/gnrc_networking.
With the test I was wondering 'why is this implemented in the test?'
Is the plan to move this to the submac layer eventually?
Looking good btw!
| RFCORE_SFR_MTM0 |= TIMER_PERIOD_LSB; | ||
| RFCORE_SFR_MTM1 |= TIMER_PERIOD_MSB; | ||
|
|
||
| RFCORE_SFR_MTMSEL &= ~CC2538_SFR_MTMSEL_MASK; |
There was a problem hiding this comment.
Didn't you already clear that in line 146?
There was a problem hiding this comment.
Yes, but because I had to set the 3 LSBs of RFCORE_SFR_MTMSEL to 001 (hence 146 and 148). For the next operation, I have to set those bits to 000 (so I have to clear it again).
If I do it the other way around the timer will start with the wrong configuration.
There was a problem hiding this comment.
should I mark is as resolved?
There was a problem hiding this comment.
Better add a comment.
If something turned out to need clarification during review, better add the explanation to the code so we don't lose that information. And future readers of the code who might have the same question shouldn't have to dig through old PRs in search of answers ;)
Yes, exactly! Most of the stuff here are handled by the SubMAC :) |
|
I think I addressed all comments |
|
I also added the Kconfig symbols for the CSMA-CA params. |
|
@benpicco done! :) |
|
Please squash! (& rebase) |
benpicco
left a comment
There was a problem hiding this comment.
I did some regression tests and the old netdev code path is still working.
So let's move on with this!
1f1fec0 to
107c607
Compare
107c607 to
0fa291d
Compare
|
rebased and squashed! |
|
Murdock is not happy |
6b64fd0 to
bb64ceb
Compare
|
Fixed. I also adapted to the changes from #14938 and removed references to other radios in the Makefile (only the cc2538_rf is supported so far, when the other radios are there we can update the Makefile) |
bb64ceb to
387deec
Compare
|
thanks for the review! |
Contribution description
This PR adds an
ieee802154_halimplementation for the CC2538 radios. It's based on the work of #14655. It also includes the definition of anieee802154_radio_halmodule to be able to switch betweennetdevandieee802154_halimplementations (they are mutually exclusive).The test application was adapted from #14655 for testing this radio. When more radios are there, the test application will be expanded.
Testing procedure
Run
tests/ieee802154_haltest. Ideally this should be tested between 2 CC2538 radios. If that's not possible, it should be enough to use an AT86RF2XX or NRF52840 with #14655.config_phycommand:An out of range value for TX power should give an error
txtsndcommand.It's possible to get the long address with the
print_addrcommand.ccacommand:config_ccacommand:Note the ED is in dBm. The ED threshold doesn't affect the Carrier Sense mode (CCA mode 2).
tx_modecommand:rx_modecommand:Use a sniffer to check if the receiver sends ACK. As expected, a radio with Promiscuous Mode will receive all kind of packets with correct FCS.
capscommand to get the available caps for a given device:test_statescommand to test state transitions and measure transition time. The important thing here is the TX-RX turnaround time (it should be equal or less than 12 symbols, 192 us, in order to comply with LIFS frames like the ACK):Note this radio takes ~193 us to switch between RX-TX if the radio is not programmed to automatically go from TX to RX. However, since the symbol time is 16 us, this is not a problem for detecting the IEEE 802.15.4 preamble.
#14787 proves this :)
Issues/PRs references
#13943 and friends