Skip to content

Speed up wake time with emulation #350

@brewt

Description

@brewt

I've noticed that emulation is relatively slow compared to tag in that you need to hold it up to the reader for that split second longer. I've tracked this down to nrf_sdh_enable_request() (called from ble_slave_init()), which enables the SoftDevice (Bluetooth stack) and takes about 500ms to do so.

I'd like to propose that we skip Bluetooth initialization (and thus speed up the boot up time by ~500ms) when it's been woken up by RF.

I made an attempt at hacking things up, but ran into a few issues:

  • The current code initializes Bluetooth before it knows the wake up source, so that would need reorganizing.
  • With the SoftDevice enabled, the code uses nrf_pwr_mgmt_run() to handle power management, but without the SoftDevice, then you're apparently supposed to use __WFE() and I couldn't get that working.

Anyone know nrf52 better that could provide some direction? I'm not even sure if this is even possible, as the existing codebase might be too incorporated into using the SoftDevice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions