Author Topic: stm32 gpio speed  (Read 2582 times)

0 Members and 1 Guest are viewing this topic.

Offline alireza7Topic starter

  • Regular Contributor
  • *
  • Posts: 102
  • Country: us
stm32 gpio speed
« on: July 28, 2018, 05:06:00 pm »
hi

 what does the GPIO_Speed setting do?

GPIO_Speed_2MHz  /*!< Low speed */
GPIO_Speed_25MHz /*!< Medium speed */
GPIO_Speed_50MHz /*!< Fast speed */
GPIO_Speed_100MHz

does it change the gpio pin slew rate? or it changes propagation time of gpio pin?

 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32 gpio speed
« Reply #1 on: July 28, 2018, 05:13:14 pm »
My understanding is, it does improve the slew rate at the expense of power use and noise being generated by the circuit.

So unless you really need it for a specific reason it's best to use the slower speed.
 

Offline alireza7Topic starter

  • Regular Contributor
  • *
  • Posts: 102
  • Country: us
Re: stm32 gpio speed
« Reply #2 on: July 28, 2018, 05:20:43 pm »
My understanding is, it does improve the slew rate at the expense of power use and noise being generated by the circuit.

So unless you really need it for a specific reason it's best to use the slower speed.

but it's some how odd to me.
how can a digital gate  change its slew rate during operation time??
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: stm32 gpio speed
« Reply #3 on: July 28, 2018, 05:26:22 pm »
My understanding is, it does improve the slew rate at the expense of power use and noise being generated by the circuit.

So unless you really need it for a specific reason it's best to use the slower speed.

but it's some how odd to me.
how can a digital gate  change its slew rate during operation time??
Not only can it change the slew rate it can completely change the mode of operation from using push-pull to open-drain, as well as the configuration of built in pull-ups and pull-downs.

The integrated circuit (STM32) can have this capability. I don't know the exact implementation details on how they accomplish it but I don't think it's that hard to believe that its capable of doing it.

Perhaps ask in the Microcontroller's section. Maybe someone knows the answer.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11699
  • Country: us
    • Personal site
Re: stm32 gpio speed
« Reply #4 on: July 28, 2018, 05:37:37 pm »
I'm just guessing here, but when you select slow or fast mode on Microchip SAM MCUs there is an observable change in the pin series resistance. My best guess is that the idea here is to have an RC filter formed by that variable resistor and the line capacitance.

Again, just guessing and would be interested to know the details myself.

My observation method may not be perfect either. All I did is set the pin as an output driven to 0 and measure the resistance from the pin to ground using a multimeter. Since there is only two settings in SAM MCUs, the results are hard to interpret. May be you can do the same measurement on the STM32?
« Last Edit: July 28, 2018, 05:41:10 pm by ataradov »
Alex
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: stm32 gpio speed
« Reply #5 on: July 28, 2018, 05:47:11 pm »
My understanding is, it does improve the slew rate at the expense of power use and noise being generated by the circuit.

So unless you really need it for a specific reason it's best to use the slower speed.

but it's some how odd to me.
how can a digital gate  change its slew rate during operation time??

FPGA's offer even more trickery with I/O's. If you wanna know how they possibly do it - read patents

Most likely this is how they do it
 

Online Simon

  • Global Moderator
  • *****
  • Posts: 17996
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: stm32 gpio speed
« Reply #6 on: July 28, 2018, 06:16:04 pm »
Please don't double post, it is highly disrespectful to people helping you that are not aware of the other thread: https://www.eevblog.com/forum/microcontrollers/stm32-gpio-speed-128753/msg1707167/#msg1707167
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf