Dear Ti
Do you know shutdown API?
because I need batt low than 2.7v will shutdown sensortag.
Thanks a lot
Ben
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear Ti
Do you know shutdown API?
because I need batt low than 2.7v will shutdown sensortag.
Thanks a lot
Ben
Dear Matt,
Thanks your reply
I know this function ,but my design local device plug battery will enter advertising mode then enter xxx test will call this api but meet can't shutdown the device.
So, I want ask you If I want shutdown the device,isn't let device auto enter advertising mode boot up?
Thanks a lot
Ben
Hello Matt
Sorry for describe ,My device design plug battery will auto enter advertising mode not via side key when boot up device.
you can see as uint8 initial_advertising_enable = "TRUE";
But , If I change this state able to do HAL_SYSTEM_RESET(),when boot up device will keep advertising mode.I want close advertising. for those step.
1,bootup device advertising
2.test function will call HAL_SYSTEM_RESET()
3.when reset will close advertising or shutdown device
How can I do? Do you have "shutdown function"?
Thanks
Ben
If your firmware enables advertising upon start up then no matter how you reset advertising will always be enabled. If you want to selectively enable advertising on start up, which is what I think you are referring to, then you will need to include some type of input that you can use to determine whether or not you should enable advertising. This might be a GPIO input or some type of state variable stored in non-volatile memory for example.
That way on start up you can read that variable and determine whether or not you should advertise after any given reset.
-Matt
Dear Matt
Thanks your recommends.
I use this methods you can refer, it can also turn off any state after reset. need send each event and add as below status function.
gapProfileState != GAPROLE_CONNECTED
---------------------------------------------------------------------------------------------------------------------------------------------------
uint8 adv_enabled = FALSE;
// Disconnect
GAPRole_TerminateConnection();
// Start advertising
GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &adv_enabled );
Thanks a lot
Ben