AnsweredAssumed Answered

STM32F4 Discovery no I/O toggle

Question asked by pt857 on Mar 29, 2014
Latest reply on Jan 24, 2015 by artyushenko.taras
I am trying to toggle an I/O line to measure timing for benchmarking dsp algorithms on an STM32F407VGT. I generated the HAL using STM32CubeMX and set PD12 and PC8 to outputs and configured them as output push-pull with no pull-up. The generated code includes the following which is called prior to entering the infinite while in main().

  /*Configure GPIO pin : PD12 */
  GPIO_InitStruct.Pin = GPIO_PIN_12;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_MEDIUM;
  HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);

Later I use the following to set and reset the I/O pin:

        // Set PD12 at the beginning of the calculation
        HAL_GPIO_WritePin(GPIOD, 12, GPIO_PIN_SET);

        // Clear PD12 at the end of the calculation
        HAL_GPIO_WritePin(GPIOD, 12, GPIO_PIN_RESET);


Yet, the I/O pin is not toggling. I believe I configured the clock tree correctly and I'll include a screen grab from STM32CubeMX. Am I missing anything obvious? Thanks!

Attachments

Outcomes