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

Removed waiting for system start in memory subsystem #1028

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

evoggy
Copy link
Member

@evoggy evoggy commented Apr 21, 2022

If one or more of the self-tests fails (red LED blinking rapidly) there's an issue when connecting to the Crazyflie where we will not get callbacks for connected or connection failed, it will just hangs.

The reason for this hanging is due to the following:

  • In the Crazyflie
    • The STM32 is powered
    • The memory subsystem is started and the task handling incoming requests will wait on systemWaitStart()
    • Crazyflie starts up and one or more self test fail. Because of the failing tests the call to systemStart() will not be made and the memory subsystem task will not be unlocked
  • In the crazyflie-python-libraray
    • A connection is requested
    • A number of requests are made in sequence, log TOC, memory information and param TOC etc.
    • In this chain the number of memories is queried, because of the hanging memory subsystem a reply is never received and the connection procedure hangs
    • No callbacks are triggered for the connection, so nighter connected or connection_failed is called
    • The connection hangs

The solution in this PR is not great since it possibly creates a race condition when registering memories. Registration cannot be done after the task has started, but it's not certain that all the modules and/or deck drivers have registered what they need by then. So if the registration is late and assert will be triggered.

@evoggy
Copy link
Member Author

evoggy commented Apr 21, 2022

The issues created here are discussed in issue bitcraze/discussions#8.

@krichardsson krichardsson merged commit fb742ee into master Apr 21, 2022
@krichardsson krichardsson deleted the evoggy/mem-no-wait-sys-start branch April 21, 2022 09:32
@knmcguire knmcguire added this to the next release milestone May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants