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

Error when turn on sensor with TWI

I need to save energy for my ble application. So I turned off the sensor when there was no ble connection. A ble connection is a condition for me to turn on the sensor, but I cannot connect to the peripheral, when placing a connection command on nRF Connect, the debugger reports "Memory read failure".
Whether declared or not declared i2c, the phenomenon still occurs.

I am using a port to turn on and off the si7021 sensor as shown below:

When the central connection comes in, during the BLE_GAP_EVT_CONNECTED event I will turn on the sensor by setting the output of port 15 to 1. I have a problem connecting, the debugger does not report an error. Chip rebooted.

I am using twi with library twi_sw_master.c. So how do I turn this sensor on and off? Please help me, thanks a lot

P/s: nRF52832 s132 ver 6.1.1 SDK 15.3

Parents Reply Children
No Data
Related