Hi.I downloaded and extracted the 'en.STM32Cube_FW_F4_V1.24.0.zip' and 'extracted the en.patch_cubefw_f4.zip' over it. Building the GPIO_IOToggle (NUCLEO-F401RE board) with MKD-ARM is 100% okay with no errors or warnings. After download with the IDE download settings set to reset-and-run the application starts as the led goes on but it stays on while the program hangs in HAL_Delay(100); If I replace it with a for-loop delay all works fine. Also if I reset the board with the HAL_Delay(100) in it it starts to blink. I wonder why the application hangs in HAL_Delay(100) after download?Thanks,Henk
Dependency on SysTick that is not met?
Hi Pier,It cost me 8 hours to find out why it did not work, but now it does. I connected a Saleae Logic Analyzer to some GPIO pins and made them toggle in different functions.The HAL_IncTick() function is called about each 0.992ms (okay say 1ms). This function increments the uwTick variable with the #define HAL_TICK_FREQ_DEFAULT. This #define equals 1. If I replace this uwTick increment with HAL_TICK_FREQ_DEFAULT by increment with 1 then all works fine. The Keil arm compiler by default grabs that variable type (bit size) which can hold the largest number in an enumaration. But even if an enum is filled with say only one item declared as 1U (value 1 as unsigned long) then it will grab an unsigned char or single byte for it filling it with the value 0x01. Adding uwTick with HAL_TICK_FREQ_DEFAULT results in adding a 16-bits or 32-bits value to it where only one byte is set to 0x01 resulting in unpredictable HAL_Delay() behaviour.The Keil MDK-ARM IDE ompiler has an option called 'Enum Container always int'. If this option is set all works fine...Using a cast like: uwTick += (unsigned long) HAL_TICK_FREQ_DEFAULT; also works fine but then the write-protected stm32f4xx_hal.c has to be modified.Thanks for listening,Henk