STM32F401RETx HardFault in HAL_Init() for TIM4/TIM5 Timebase source
Hello! I'm working with FreeRTOS for the first time and am getting a HardFault during the call HAL_NVIC_EnableIRQ(TIM4_IRQn); call inside of HAL_InitTick(); from HAL_Init();
I am currently testing with a Nucleo board with MCU STM32F401RET6U and have configured the project as such - the startup file is startup_stm32f401retx.s.
I've tried both TIM4 and TIM5 for the Timebase Source and have had the same results. Nowhere else in the code is TIM4 used or initialized I'm confused why it is hanging on the HAL_NVIC_EnableIRQ call.
Does anyone know what the issue could be or how I can further debug the issue?

int main(void)
{
//Segger SystemView initialization
//Enable the CYCCNT counter
DWT_CTRL |= ( 1 << 0);
SEGGER_SYSVIEW_Conf();
SEGGER_SYSVIEW_Start();
// Also tried above SEGGER Init and result hangs and disconnects instead of Hard Fault
HAL_Init();
CppMain();
}
