I make the DA14580 into extended sleep, the BLE stop advertising. When I use WAKEUP TIMER driver to wake up the system via the button(I have add the periph_init()), and it start to advertising. The smartphone can use the APP to connect to the chip, and communicate(The chip can return the data, which sent from the smartphone APP, to the smartphone.).But when I send the command to make the chip to read the senser via the I2C, it doesn't work. I missed some important details? Thanks a lot.
Keywords:
Device:
Hi whz16622,
Before the da falls into sleep are you able to read the sensor? can you monitor the I2C bus to check the traffic? maybe the da sends the command but the sensor doesn't respond. Are your peripherals properly initialized after waking up from sleep ?
Thanks MT_dialog
Thanks for your reply. Before the da falls into sleep(perform the function app_set_extended_sleep()), the da can read the sensor. Now it works, due to I add the function app_disable_sleep() before read the sensor.Why?
Hi wzh16622,
Please make sure that your peripherals and pins are properly initialized after each wake up and before you perform reading on the sensor. There is no problem in reading the sensor when your device is waking up from sleep mode.
Thanks MT_dialog
The peripherals and pins are properly initialized after each wake up. Now, I want to make sure that if the function app_disable_sleep() is indispensable.
Thanks WZH.
Hi,
Is calling 'periph_init' enough before read to I2C device while waking up from sleep?
Hi hardy.chen,
The periph_init will enable all the peripherals on the da and you will be able interact with the i2c but if you dont enable the BLE you will be operating with the RC16.
Thanks MT_dialog
Well noted and Thanks!