diff --git a/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h b/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h index 23f12a0b6..12a37eeaa 100644 --- a/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h +++ b/os/rt/ports/ARMCMx/cmsis_os/cmsis_os.h @@ -502,7 +502,7 @@ static inline osStatus osThreadYield(void) { */ static inline osPriority osThreadGetPriority(osThreadId thread_id) { - return thread_id->p_prio; + return (osPriority)(NORMALPRIO - thread_id->p_prio); } /** diff --git a/readme.txt b/readme.txt index acc7d8059..8fdd38c78 100644 --- a/readme.txt +++ b/readme.txt @@ -73,6 +73,8 @@ ***************************************************************************** *** 16.1.5 *** +- HAL: Fixed CMSIS function osThreadGetPriority() does not return correct + priority (bug #752). - HAL: Fixed wrong conditional branches in _adc_isr_error_code (bug #751). - HAL: Fixed bug in STM32/ADCv3 (bug #750). - HAL: Fixed OPT settings and added board folder in STM32F4xx-USB_CDC demo