SparkFun Forums 

Where electronics enthusiasts find answers.

Everything with the AmbiqSuite SDK tools and software are welcome here.
User avatar
By laser
I'm building a battery-powered device which needs to sleep to conserve power until awakened remotely via bluetooth. Wake events will be rare (e.g. once a day) and the device will be running off a very small battery. I'm building on Apollo3 via Arduino/Ambiq (using the SparkFun RedBoard Artemis Nano board).

Is there a way to enter sleep mode while keeping the BLE radio turned on, and setting an interrupt to wake the MCU when a BLE packet is received (e.g. via BLE notify)?

For example, can M4 enter a low-power sleep mode until certain BLE interrupts or events are received by the NVIC?

So far I've found some documentation on enabling PDM interrupts, but nothing yet on the BLE module.
User avatar
By wrich5773
If you're trying to maintain a BLE link between two devices you're limited to the slave latency, connection interval, and supervisory timeout fields in the link layer data when a connection is first negotiated. Assuming your Artemis device is acting as a peripheral, it has a certain amount of time to respond to the central's connection events and can only ignore a certain number of connection events before the the link is terminated by the central.

You could try using advertising packets to your advantage in this situation, as you can wake up and scan for a directed advertisement packet relatively quickly. The trade-off is you need to make sure your advertisement event is actually heard by your Artemis device whenever it's programmed to wake up from sleep.
User avatar
By laser
These are both great ideas.

Assuming we're maintaining a BLE link, and that the battery-powered device is the peripheral, which sleep mode(s) will allow the BLE module to continue responding to the central's connection events while the rest of the device is in power-saving mode?
User avatar
By wrich5773
I don't believe the device has a specific sleep mode that can do that. You'll have to dig through their example code, but from my understanding their freertos radio task handles when the cpu can go to sleep (and will put it to sleep) based on the negotiated connection parameters.

[edit] I think you might have meant to post this question in the Arduino section, not their SDK support section. I have not used the Arduino bootloader with an Artemis module so I can't speak to how that would work in code from a sketch perspective.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum