nRF Connect SDK 1.9.1
nRF52805
Hello,
In my application I have two areas where much current is consumed (two current spikes).
1. Getting values from external sensors
2. Sending signals in BLE advertisement packages
Due to optimization, I would like to synchronize this manually.
I started with a main loop with 2sec sleep and periodic advertising with a 2 sec interval. ( two current spikes)
My first (in my opinion bad) solution was to start and directly stop advertising in the main loop
/* Start advertising */
err = bt_le_adv_start(ADVERTISING_INTERVAL_2, freshAdvertisingPacket, ARRAY_SIZE(freshAdvertisingPacket),
sd, ARRAY_SIZE(sd));
if (err) {
printk("Advertising failed to start (err %d)\n", err);
return;
}
k_sleep(K_MSEC(40));
err = bt_le_adv_stop();
if (err) {
printk("Advertising failed to stop (err %d)\n", err);
return;
}
Is there a way I can trigger this Advertising process? or just send a single packet without starting an Interval?
Best regards, Jonas