2021-10-19 08:27 AM
I am using CubeIde for the first time.
First test - run minimal program with HAL from CubeIDe Configurator, under debugger
Simple program, only SYSTICK and uart , but SysTick_Handler() is not trigged at all .
And function HAL_Delay hangs because uwTick is always 0. Tried with setting brakepoint inside handler - no results
Used HSI, SYSCLK 16MHZ, Cortex System Timer 16MHz,
RCC GPIO and USART1 - HAL configured.
here is main() generated from cubeide (I removed comments):
-----------------------------------------------------------
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_USART1_UART_Init();
HAL_Delay(100);
// here program hangs, when reaches HAL_Delay function. uwTick = 0
while (1)
{
}
}
-----------------------------------------------------------
and here is the SysTick_handler from stm32g0xx_it.c
-----------------------------------------------------------
void SysTick_Handler(void)
{
HAL_IncTick();
}
-----------------------------------------------------------
2023-03-07 04:07 AM
Or even just using the linker symbol so the VTOR just tracks how the project is built.
2023-03-12 02:58 PM
For example, on F7 series an address 0 points to ITCM RAM. But on these devices the VTOR defaults to either FLASH on ITCM or System memory. However the user will typically run the firmware from FLASH on AXI and will want to set VTOR to it.