hi ... i am using nRF52832 ,i want to save the battery so i am planning to use system off mode . how to wake up the device from system off mode using threshold value or either system on mode
is it possible ? how to do
Thanks in advance
hi ... i am using nRF52832 ,i want to save the battery so i am planning to use system off mode . how to wake up the device from system off mode using threshold value or either system on mode
is it possible ? how to do
Thanks in advance
In system OFF the chip can wake up by the ANADETECT signal, created by the LPCOMP peripheral: http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_1_0_17_1#unique_1707892264
And from the LPCOMP peripheral:
The LPCOMP can wake up the system from System OFF by asserting the ANADETECT signal. The ANADETECT signal can be derived from any of the event sources that generate the UP, DOWN and CROSS events. In case of wakeup from System OFF, no events will be generated, only the ANADETECT signal. See the ANADETECT register (ANADETECT) for more information on how to configure the ANADETECT signal.
And here is an example in the SDK demonstrating the use of LPCOMP: http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lpcomp_example.html?cp=4_0_0_4_5_17
Can we wake up by using threshold value
Thank you sitan . option 2 is good , i can go with this , actually i tried using timer to interrupt the sleep but i couldn't reach . i don't how to write the flow to interrupt the sleep using timer .. i have succeed upto checking the threshold using timer .can you help me
If you are successful in checking the threshold using timer, there's not really much more to do. The CPU automatically goes to IDLE between the interrupts, as long as there is a __WFE() in the main loop somewhere. Can you post your main function, then I can have a look.
*/
int main(void)
{
bool erase_bonds;
// Initialize.
uart_init();
log_init();
timers_init();
ret_code_t err_code =app_timer_create(&m_led_a_timer_id, APP_TIMER_MODE_REPEATED ,timer_sensor_event_handler);
APP_ERROR_CHECK(err_code);
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
printf("\r\nUART started.\r\n");
NRF_LOG_INFO("Debug logging for UART over RTT started.");
advertising_start();
err_code = app_timer_start(m_led_a_timer_id,APP_TIMER_TICKS(60000),NULL);
APP_ERROR_CHECK(err_code);
twi_init();
MAX30_set_mode();
// Start execution.
for(;;)
{
idle_state_handle();
}
}
In time event handler i am comparing threshold
Is it possible for option 1 . if manually i am setting threshold in my program , and by using led pin
Is it possible for option 1 . if manually i am setting threshold in my program , and by using led pin
Using LED pin for what?
led pin to wake up the device from system off mode ..as per option 1
Not sure what "led pin" is, but yes you can wake the chip up from system OFF using a GPIO pin interrupt signal from the temperature sensor.
How to do that can you explain me
One more,, i tried to advertise when i need to send data using fimer . I have tried alot after advertising , data is not transfering i am getting fatal error why ? I need to advdrtise only when i need then send the data and disconnect . flow like check the threshold using timer ----advertise start -----if connected-----send the data ----and then disconnect .. i am achieving upto connected state after that i am getting fatal error . How to solve ? Is this possible?