Skip to main content
Marek Nowak_2
Visitor II
July 4, 2018
Question

Deinit one pin - is it possible?

  • July 4, 2018
  • 2 replies
  • 1802 views
Posted on July 04, 2018 at 20:38

Hello, I have one question: Is it possible to deinit one pin instead of whole port? I have STM8S00F3 and ST Visual Develop.

    This topic has been closed for replies.

    2 replies

    henry.dick
    Associate II
    July 4, 2018
    Posted on July 05, 2018 at 01:44

    '

    Is it possible to deinit one pin instead of whole port?'

    the answer depends on your or your toolchain's definition of 'deinit'.

    Associate III
    July 5, 2018
    Posted on July 05, 2018 at 10:34

    Yes. It is very simple by using HAL driver. See example how to do it. .../STM8S_StdPeriph_Lib/Project/STM8S_StdPeriph_Examples/GPIO/GPIO_Toggle/main.c   I'll add. To deinitialize a single port pin, use the function with  GPIO_Init(...) with mode GPIO_MODE_IN_FL_NO_IT. It is equivalent to deinit. I wish you success.