soc: nordic: nrf54h: gpd: yield() to not block if main is coop
The main thread, if configured with coop priority (don't do that :D) breaks gpd since it has a non yielding while loop (also don't do that) Add an explicit yield() to allow other threads to run if main or other threads use gpd with coop prio. Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
This commit is contained in:
parent
dc7c396a0b
commit
7e0e583f9e
1 changed files with 2 additions and 0 deletions
|
@ -139,6 +139,8 @@ static int nrf_gpd_sync(struct gpd_onoff_manager *gpd_mgr)
|
||||||
if (atomic_test_bit(&gpd_service_status, GPD_SERVICE_REQ_OK)) {
|
if (atomic_test_bit(&gpd_service_status, GPD_SERVICE_REQ_OK)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
k_yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_ERR("nRFs GDPWR request timed out");
|
LOG_ERR("nRFs GDPWR request timed out");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue