We have a common codebase with both softdevice (nRF51/52 code) and now zephyr (nRF54 code). To make our code compatible I have the following replacement to sd_temp_get. This is always called from threadmode but sometimes it freezes (WDT resets the MCU). Ive seen the comment:
@note This function must be executed in the same execution priority as @ref mpsl_low_priority_process.
but don't understand if it is the same zephyr execution priority or IRQ priority.
I don't see any special code for raising the IRQ priority when using CONFIG_TEMP_NRF5_MPSL, please advise how to get the current MCU temperature in threadmode.
static uint32_t sd_temp_get(int32_t * p_temp)
{
*p_temp = mpsl_temperature_get();
return 0; // NRF_SUCCESS
}