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

how to configure two gpio pin in High drivemode 5mA

Hello everyone,

I am trying to congifure two gpio pin (pin 6and 7) in standard high drive mode 5MA because am trying to connect those pin to the speaker inorder to increase the loudness by having 10mA at the input of the speaker so can anyone suggest some ideas or example how to configure tow gpio pin in high drive mode any suggestions or ideas would be really appreciated i found these information in the library files but i did not understand what does it meany by SOS1 which is softdevice version 1 or something else?

NRF_GPIO->PIN_CNF[pin_number] = (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos);

Do i ahve to configure like this ? or something else

NRF_GPIO->PIN_CNF[6] = (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos);

NRF_GPIO->PIN_CNF[7] = (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos);

main.c

Thanks

Parents
  • S0S1 means standard drive in sink ('0') and standard drive in source ('1'). To source and sink in high drive you can use H0H1:

    NRF_GPIO->PIN_CNF[6] |= (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos);
    NRF_GPIO->PIN_CNF[7] |= (GPIO_PIN_CNF_DRIVE_H0H1 << GPIO_PIN_CNF_DRIVE_Pos);
    

    See the Reference Manual for more information (chapter 14 - GPIO).

  • thank you for your kind response i ahve configured like this in my code but am not the geeting the beep sound louder enough i tried to check by connecting separately the buzzer to pin 6 and pin7 only the pin 6 is malking the buzer sound and pin 7 does not making anything when i check the voltages of the both pins it is showing 2.9v i dont understand what is this issue can you please verify my code and le t me know if there is anything wrong or suggest me some ideas it could be helpful for me to make the buzzer beep louder

Reply
  • thank you for your kind response i ahve configured like this in my code but am not the geeting the beep sound louder enough i tried to check by connecting separately the buzzer to pin 6 and pin7 only the pin 6 is malking the buzer sound and pin 7 does not making anything when i check the voltages of the both pins it is showing 2.9v i dont understand what is this issue can you please verify my code and le t me know if there is anything wrong or suggest me some ideas it could be helpful for me to make the buzzer beep louder

Children
No Data
Related