This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems with event handling and having ble_evt_dispatch called

Folks,

Sorry if I'm just being boneheaded here, but have been fighting with a couple problems while migrating my app on nRF51822/"C0"/SDK 4.2.2/S110 5 to nRF51822/"G0"/SDK 6.1.0/S110 7.1.0.

App worked fine before, e.g., Advertising started, responded to a Connection attempt (from an iOS app), Connected and sent Notifications to the phone just fine.

Now, after migrating to the new environment (and adding some app timers, etc. -- sorry for the possible sources of error :-) I'm having trouble in two main places:

  • If I try to run "power_manage" after starting Advertising (with a call to sd_app_evt_wait();), the MCU goes into such a deep sleep that Advertising is cut off.
  • If instead I go into a polling loop, waiting for a connection, Advertising happens as expected. But when Central (the iOS app) attempts to connect, I never get a call to ble_evt_dispatch, even though it was passed during stack enable to softdevice_ble_evt_handler_set(ble_evt_dispatch); without error.

Note: I've checked to see if I've initialized any peripherals which might have generated "pending" interrupts (i.e., without properly calling sd_nvic_EnableIRQ, but I don't think so.

Any hints on what I'm missing here?

Thanks,

Mike

Parents Reply Children
No Data
Related