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

Channel/address not always set at start up #998

Closed
krichardsson opened this issue Mar 18, 2022 · 4 comments · Fixed by #1103
Closed

Channel/address not always set at start up #998

krichardsson opened this issue Mar 18, 2022 · 4 comments · Fixed by #1103
Labels
Milestone

Comments

@krichardsson
Copy link
Contributor

I have seen that the channel and/or address is not always set at start up. This problem does not happen often and is not easily repeatable.

Address and channel is sent from the STM to the NRF here https://github.com/bitcraze/crazyflie-firmware/blob/master/src/hal/src/radiolink.c#L99-L101 as syslink packets

Maybe it is possible that one or more of the packets is lost?

I have seen cases where no data is set (the NRF is still on the default 80/0xE7E7E7E7E7), but also where the channel is set but not the address.

Maybe #703 will solve this problem as well?

@krichardsson
Copy link
Contributor Author

This happens in the stab lab from time to time.

It seems as sometimes only one of the channel or address is set

@krichardsson
Copy link
Contributor Author

We are note sure what is causing this problem but one suspect is the syslink. The STM is sending 3 syslink messages to the NRF early in the start up phase, with the radio channel, address and rate. If one or more of theses messages are lost we could get the symptoms we see.

The first step to solve this is to add a debug probe in the NRF to collect information that will show if the messages arrived or not in the NRF. Functionality is also added to the STM to request the information and dump it to the console. Since the issue is observed in the stab lab from time to time, we will hopefully be able to inspect a Crazyflie where the problem has occurred.

The probe is implemented in #1061 and bitcraze/crazyflie2-nrf-firmware#71

@krichardsson
Copy link
Contributor Author

krichardsson commented Jun 15, 2022

Finally we got a CF ending up with this problem in the stab lab after the probe was installed.

The result from the NRF is:

SL: Syslink debug probe:
SL: Address received: 0
SL: Chan received: 1
SL: Rate received: 0
SL: Dropped: 0

CF2.1 with Flow 2.0 and Lighthouse deck

Looking at the code in radiolink.c we see

  radiolinkSetChannel(configblockGetRadioChannel());
  radiolinkSetDatarate(configblockGetRadioSpeed());
  radiolinkSetAddress(configblockGetRadioAddress());

This means that the two last messages were lost for some reason.

@krichardsson
Copy link
Contributor Author

krichardsson commented Jun 20, 2022

Another example from the stab lab shows the same pattern:

SL: Syslink debug probe:
SL: Address received: 0
SL: Chan received: 1
SL: Rate received: 0
SL: Dropped: 0

CF2.1 with AI-deck

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

Successfully merging a pull request may close this issue.

2 participants