2018-07-14 03:55 PM
I can only run a few dozen lines of code until I get stuck in a loop. When trying to debug it appears I am stuck in the startup_stmf051x8.s file on these lines:
0x0800016E E7FE B PendSV_Handler (0x0800016E) 164: B . 0x08000170 E7FE B SysTick_Handler (0x08000170) 230: B . 231: 232: ENDPIf I try to step through it in the disassembly window it just jumps between line 164 and 232. I can't figure out what is going on.
#loop-startup-file #startup-file #loop2018-07-14 04:10 PM
Suggests you're enabling an interrupt you don't have a real handler for. Perhaps something like the SysTick_Handler in stm32f0xx_it.c
Missing file? Using C++ or .cpp?
You're going to have to provide more context here.
2018-07-14 04:38 PM
I am not familiar with stm32f0xx_it.c.
I am programming an STM32f051k8 through the onboard STlink on a STM32f072Discovery board using Keil UV5 using no C++, only C.
I do not have a SysTick_Handler, but adding one doesn't seem to solve the problem. I am not sure how SysTick gets enabled, it seems to be enabled by default.
I am enabling 4 interrupts, TIM1, TIM2, TIM3, and ADC1_COMP. Looks like my ADC1_COMP handler is missing. I added an empty handler, since that peripheral doesn't seem to have any interrupt flags, that also didn't solve the issue.
2018-07-14 04:58 PM
'
I can't figure out what is going on.'it is not with those handlers but somewhere else. Unfortunately you haven't provide any info on that.