This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sleep_mode_enter causes fatal error

Hello, I use sleep_mode_enter() to put the device into sleep mode, however, the RTT print a fatal error after sd_power_system_off(), I don't know whether the device is in sleep mode. Besides, the WAKEUP BUTTON I set is pin6, but when I touch the touchpad which connects pin5, the device will also recover from the sleep mode.
I use twi to control the mpu6050, and Pin6 generates interrupt with BSP_EVENT_KEY_1, Pin5 generates interrupt with BSP_EVENT_KEY_3
the wakeup button id I set is like this
#define BTN_ID_WAKEUP 0 /**< ID of button used to wake up the application. */
#define BTN_ID_SLEEP 0 /**< ID of button used to put the application into sleep mode. */
#define BTN_ID_DISCONNECT 0 /**< ID of button used to gracefully terminate a connection on long press. */
#define BTN_ID_WAKEUP_BOND_DELETE 1 /**< ID of button used to wake up the application and delete all bonding information. */
#define BTN_ID_WHITELIST_OFF 1 /**< ID of button used to turn off usage of the whitelist. */
the button pin I set is like this
#define BUTTON_START 6
#define BUTTON_1 6
#define BUTTON_2 14
#define BUTTON_3 5
#define BUTTON_4 25
#define BUTTON_STOP 25
and sleep recover button actice state is like this
#define BUTTONS_ACTIVE_STATE 1
The device I use is nRF52810, the example I use is nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_hids_mouse\pca10040e\s112\arm5_no_packs

Parents Reply Children
Related