cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 maximum toogle GPIO speed question

Francois Alexandre
Associate II
Posted on August 30, 2017 at 15:28

Hi to all,

Am working with a a custom board with a STM32F767BIT6 working at the highest speed possible. I am trying the simplest test on a GPIOH pin 8 :

    for(;;){

          {

              GPIOH->BSRR = 0x00000100U;

              GPIOH->BSRR = 0x01000000U;

          }

I can only get a frequency of 54MghZ exactly on the pin. I would like to have more ...

here the initialization:

  __HAL_RCC_GPIOH_CLK_ENABLE();

     

   GPIO_InitStruct.Pin = GPIO_PIN_8;

  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

  GPIO_InitStruct.Pull = GPIO_NOPULL;

  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;

  HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
3 REPLIES 3
Francois Alexandre
Associate II
Posted on August 30, 2017 at 15:33

oups i complete my message below.

I 've read that the GPIO can be as High as 108MghZ maximum. So this is my question: is the maximum speed of gpio on datasheet is only for input or also output? Am not sure to understand it quite well...

I really would like to get a speed of at least 60Mghz on output on a whole GPIO port, any suggestions, hints for this would be great.

regards

Posted on August 30, 2017 at 16:55

People don't use a 216 MHz processor to bang GPIO pins up/down manually in software to the point of saturation.

General Purpose IO in this context means you bit-banging, OR a peripheral driving the pin cell.

If you want an 108 MHz output program a TIM, or route the PLL clock out via MCO (PA8) or MCO2, to drive the pins of interest.

Even DMAing a pattern buffer to a GPIO bank you have bandwidth considerations related to reading the memory, and then transferring across the AHB/APB buses.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on August 30, 2017 at 17:18

thanks for your interest,

Actually, the purpose of the example above is to help me understand the real problem.

I would like to transfer data to GPIOH using DMA2 with an input capture to trigger the transfer. The input trigger for the input capture is 60Mhz. its directly connected to TIM8_CH2 which trigger the dma transfer from memory to gpio.

The part that transferring data to GPIO seemed fine but the output of GPIO is not 60Mgz but it's slower.

Do you mean that I cannot use the GPIO using DMAs to transfer datas because of bandwith limitations?