Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable writing one-wire memories when Bluetooth is enabled #3

Open
ataffanel opened this issue Apr 17, 2015 · 2 comments
Open

Enable writing one-wire memories when Bluetooth is enabled #3

ataffanel opened this issue Apr 17, 2015 · 2 comments
Assignees

Comments

@ataffanel
Copy link
Member

Accessing one wire memories is a hard real-time operation implemented with interrupts so it cannot be run at the same time as the bluetooth stack which is 'stealing' CPU time.

Currently this is solved by reading and caching all the memory at startup before enabling the bluetooth stack and writing to one-wire memories is disabled if the bluetooth stack is enabled.

I see two ways to solve that:

  • Using the bluetooth stack timeslot api to communicate only in timeslots when the bluetooth stack is not working.
  • Disabling the bluetooth stack during one-wire operation.
@ataffanel
Copy link
Member Author

90ac428 fixes the problem by disabling the bluetooth stack when accessing the OW memories. This has at least two concequences:

  1. OW memories cannot be programmed when using the bluetooth link. This is not expected to be a problem in practice as programming OW memory is an advanced functionality.
  2. The Crazyflie should read all memory at startup and not when the system has started. This is also the case in practice and I cannot see a use case where accessing the OW memory over bluetooth in runtime would be required.

ataffanel added a commit that referenced this issue Aug 14, 2019
@ataffanel ataffanel reopened this Aug 14, 2019
@ataffanel
Copy link
Member Author

ataffanel commented Aug 14, 2019

Reopened and reverted the fix since it did cause problems.

The problem seems to be that disabling and re-activating the soft-device does not work the way it was done in the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants