STM32F746G Disco – Registers cannot be written to

Sysprogs forums Forums VisualGDB STM32F746G Disco – Registers cannot be written to

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7893
    Ken541
    Participant

    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

    #7895
    Ken541
    Participant

    Nevermind, I just realized I never enabled the clocks for the other GPIO ports. Sorry

    #7897
    support
    Keymaster

    No problem. If you encounter further problems, feel free to create another topic.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.