a code checker found the following minimal bug in ..\hal\ports\common\ARMCMx\nvic.c:
Code: Select all
/**
* @brief Changes the priority of a system handler.
*
* @param[in] handler the system handler number
* @param[in] prio the system handler priority
*/
void nvicSetSystemHandlerPriority(uint32_t handler, uint32_t prio) {
osalDbgCheck(handler <= 12U);
#if defined(__CORE_CM0_H_GENERIC)
SCB->SHP[_SHP_IDX(handler)] = (SCB->SHP[_SHP_IDX(handler)] & ~(0xFFU << _BIT_SHIFT(handler))) |
(NVIC_PRIORITY_MASK(prio) << _BIT_SHIFT(handler));
#elif defined(__CORE_CM7_H_GENERIC)
SCB->SHPR[handler] = NVIC_PRIORITY_MASK(prio);
#else
SCB->SHP[handler] = NVIC_PRIORITY_MASK(prio);
#endif
}The line
Code: Select all
osalDbgCheck(handler <= 12U);Code: Select all
osalDbgCheck(handler < 12U);Code: Select all
SHP[12]Kind Regards
Michael