drivers/cc110x: add power off (sleep) functions#16232
Conversation
|
Why not hook this up with |
Done |
|
Picked wrong commit for the --fixup param. Should be correct now. |
|
Is there something to pay attention to when using this transceiver? I wired up two cc1101 modules to a node Anode B |
|
Try with Assuming you're using the 433 MHz breakout boards with a spring antenna. |
|
Maybe I should make 433 the default setting and let the boards in RIOT overwrite with the 868 MHz setting. Even though all boards supported by RIOT are using 868 MHz, it wouldn't hurt to have extra effort once to configure them all. This would ease use of the cheap break out boards, as there no special configuration would then be needed. And like 99% of the break out boards use 433 MHz. And the 868 MHz and 900 MHz CC1101 breakout boards cost more than a proper IEEE 802.15.4 transceiver, so I really cannot see anyone buying 868 MHz CC1101 boards. |
|
Thank you, with that config it's working. |
|
Was the TX power set to -30 dBm by you, or was the register content lost by the power down? (The data sheet does say that the patable containing the power levels is lost in power off mode. It would make sense if the register containing the currently active power level is also lost.) |
|
I did not set it, the behavior is not consistent though |
|
The issue with the incorrect TX power should be fixed now. I also consistently had a mismatching state of the driver and the transceiver after wake up: driver in RX mode, transceiver in IDLE. This is pretty bad, as the driver expects the transceiver to listen for new frames, while the transceiver doesn't. I have no idea why I didn't encounter this previously. A wild guess would be that the CC110x took longer to power on than the worst case time given in the datasheet. Anyway, I changed the |
benpicco
left a comment
There was a problem hiding this comment.
Sleep & Wakeup now work well, please squash!
Would be neat to have those settings being set automatically by a submodule, e.g. |
|
@maribu ping ;) |
Thanks for the reminder! |
|
All green now :-) |
Contribution description
Add
cc110x_sleep()andcc110x_wakeup()to allow low power operation for the CC110x transceivers.Testing procedure
The test in
tests/driver_cc110xhas been extended to also contain thesleepandwakeupshell commands.I used a MIoT-Lab Testbed Node (a Nucleo-F767ZI which contains among others a CC1101 transceiver and a 6 channel power monitoring solution, of which one channel is monitoring the CC1101) for testing.
The datasheet say power consumption on RX at 433 MHz receiving at 250 kBaud with settings optimized for current consumption is 17.1 mA (that would be 56.4 mW at 3.3V). In sleep mode current consumption is 200 nA (or ~ 0mW).
Since the driver is not trading in reception quality for lower current consumption, the measurements seem to roughly match the datasheet.
Issues/PRs references
Based on #12294