Hi,
I need some help figuring out some bizarre behavior with the uVision debug environment. If I set a breakpoint in the following code, the debugger stops at the line labeled --BP-- for any and all values of the variable PWMticks. If I let the code run with no breakpoints, it appears to work correctly. Hardware and software details are listed below. Thanks for any suggestions or help
volatile int PWMdutyCycle = 3; volatile int PWMticks = 0; void SysTick_Handler (void) { PWMticks++; if(PWMticks == 3) { --BP-- GPIO_ResetBits(GPIOC, GPIO_Pin_12); //Hit a break point here for all values of PWMticks == 1-9 } else if(PWMticks == 9) { PWMticks = 0; GPIO_SetBits(GPIOC, GPIO_Pin_12); } else { PWMdutyCycle = 0; } }
Hardware STM3241G-Eval board, ( STM32F417IG ). ST-Link debugger
Tool chain info IDE-Version: µVision V4.70.0.0
Tool Version Numbers: Toolchain: MDK-ARM Standard Version: 4.70.0.0 Toolchain Path: C:\Keil_ARM\ARM\ARMCC\bin\ C Compiler: Armcc.Exe V5.03.0.24 Assembler: Armasm.Exe V5.03.0.24 Linker/Locator: ArmLink.Exe V5.03.0.24 Librarian: ArmAr.Exe V5.03.0.24 Hex Converter: FromElf.Exe V5.03.0.24 CPU DLL: SARMCM3.DLL V4.70.0.0 Dialog DLL: DCM.DLL V1.9.0.0 Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll Dialog DLL: TCM.DLL V1.12.0.0