I’m not sure if this is the right place to ask this, but when programming on the STM32F746G Discovery board with visualGDB, I’ve noticed that sometimes certain register values won’t be written to in code. Some of these registers I can’t seem to set are GPIOA, GPIOB, GPIOD, GPIOG, DWT, CoreDebug. However when debugging, I can manually set these registers just fine, but that is not useful as I need to use these in my project.
This is my initialization code for the GPIO Registers:
__GPIOC_CLK_ENABLE();
GPIO_InitTypeDef GPIO_Init;
GPIO_Init.Pin = GPIO_PIN_6 | GPIO_PIN_7;
GPIO_Init.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_Init.Speed = GPIO_SPEED_HIGH;
GPIO_Init.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOC, &GPIO_Init);
HAL_GPIO_Init(GPIOG, &GPIO_Init);
In the above, GPIOC is set accordingly to the GPIO_Init values, however the GPIOG is never set.
This is my similar question on stack overflow for reference:
http://stackoverflow.com/questions/36378280/stm32-how-to-enable-dwt-cycle-counter
Thanks in advance