-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Bluetooth: controller: split: Fix radio in use during flash op #22946
Bluetooth: controller: split: Fix radio in use during flash op #22946
Conversation
Fix a race condition in radio abort requested by flash driver. It is possible that during abort function execution, PPI setup to start radio fires. Hence, check explicitly in cleanup function for radio being in use and disable it. Fixes zephyrproject-rtos#22945. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ticker resolve collision implementation for incorrect ticks accumulation and the calculation of next period. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Is #22926 related to this? (it also deals with Bluetooth + flash coexistence) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need time to review the impact of the ticker changes.
Ticker fixes are related, when the radio assert is handled, the flashing times out as ticker is not scheduling both the connection and flash instances. There is periodic Worker and Job executions but both the instances are skipped always. And this leads to:
|
/* Accumulate ticks_to_expire for each node */ | ||
acc_ticks_to_expire += ticker_next->ticks_to_expire; | ||
if (acc_ticks_to_expire > ticker->ticks_slot) { | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I right in saying that this is an optimization - breaking here? (instead of possibly traversing more tickers)
@@ -1400,8 +1402,9 @@ static inline void ticker_job_worker_bh(struct ticker_instance *instance, | |||
/* Reload ticks_to_expire with one period */ | |||
ticker->ticks_to_expire = | |||
ticker->ticks_periodic; | |||
ticker->ticks_to_expire += | |||
ticker_remainder_inc(ticker); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, this is needed for Nordic!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for fixing. All automated tests pass on our side (ticker unittests, EDTT tests and target integration tests)
MTPR has reviewed the ciker changes and is ok with them
Fix a race condition in radio abort requested by flash
driver. It is possible that during abort function execution,
PPI setup to start radio fires. Hence, check explicitly in
cleanup function for radio being in use and disable it.
Fixes #22945.
Signed-off-by: Vinayak Kariappa Chettimada vich@nordicsemi.no