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

advertising start and diconnect on event raised is creating problem in pin 16 and 15(SCL and SDA)

Hi,

I am working on custom Board with nrf52382, I am using the mma8652 accelerometer for different functionality(prior is single and double tap detection).

Initially On an interrupt raised for double tap detected I am setting different advertising packet for 20 sec if not connected at that moment it again advertise with the older information. the board is continuously advertising by keeping APP_ADV_TIMEOUT_IN_SECONDS to zero. On disconnect also I am setting older information(returning success).

This setting also gives success, but after disconnect/or app kill say about 10 min later to disconnect, i am unable to get data from the accelerometer as no interrupt is raised. I am setting pin 16 as SCL and pin 14 as SDA.

There is no loose connection.

There is a possibility that after disconnect these pins are not working. In which part of GAP_EVENT app kill disconnect reaches. OR after disconnect accelerometer is not getting supply.

Any Suggestions.

Parents
  • Please hook a logic analyzer and check if there is data on I2C pins.

    How do you trigger the communication between the accelerometer and the nRF5 chip ? When you say no interrupt raised , have you check if actually a pulse on the interrupt pin from the MMA8652 ?

    I don't think there is any relation between Bluetooth disconnection and I2C, unless you have some code control that. When the app is killed on the phone, the OS will disconnect the connection, it's the BLE_GAP_EVT_DISCONNECTED event that you will receive.

Reply
  • Please hook a logic analyzer and check if there is data on I2C pins.

    How do you trigger the communication between the accelerometer and the nRF5 chip ? When you say no interrupt raised , have you check if actually a pulse on the interrupt pin from the MMA8652 ?

    I don't think there is any relation between Bluetooth disconnection and I2C, unless you have some code control that. When the app is killed on the phone, the OS will disconnect the connection, it's the BLE_GAP_EVT_DISCONNECTED event that you will receive.

Children
No Data
Related