This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIOHigh Drive Mode is not working properly

Hello Everyone

I am trying to configure the two GPIO in High Drive mode 5mA but after compiling the program it does not seems like congifured to High drive Mode because the loudness of the buzzer is not increased so can anyone suggest me what went wrong in my GPIO configuration any ideas or suggestions will be helpful for me

main.c

  • Are you sure that when you set gpio in standard drive your voltage is lower because of high current draw? If not, maybe both drive modes supply the same ammount of current which would result in the same loudness.

  • Thank for your reply i am not getting you exactly what you meant by standard drive voltage ? voltage reamins constant 2.9V from the both GPIO pins but i am not sure about the gpio configuration in high drive current mode

  • standard drive = no high drive (pin can supply lower current).

    I am not an expert, but as far as i know to increase loudness of buzzer you should increase voltage to supply suitable ammount of current. If your buzzer needs more current than standard drive can supply, gpio in standard drive will probably lower it's voltage to the ammount of current that it can supply (or it will just burn, i am not sure). When you set gpio to high drive, gpio will BE ABLE to supply more current to the buzzer.

    To sum up - if your buzzer doesn't take more current than standard drive can supply, you wouldn't notice difference in loudness between standard and high drive because both of them will set to the same voltage level when current draw is small.

  • GPIO_PIN_CNF_DRIVE_H0D1

    How is the buzzer connected? That says the GPIO pin at logic '0' is high drive, ie it will sink 5mA and at logic '1' it's disconnected entirely. But you say the voltage on the pins is 2.9V which makes it sound like you have the buzzer connected between the pin and ground, in which case I'm surprised it makes any noise at all.

    Is there a reason you're not using H0H1 which is just high drive 0s and 1s?

  • yes i tried both HOH1 and HOD1 but am surprised even though i commented out //GPIO_PIN_CNF_DRIVE_H0D1 this line am getting the same loudness from the buzzer it seems like mu gpio configuration have some problem i dont know where is the problem

Related