Skip to main content
Anton Veldhuizen
Associate
February 22, 2017
Question

I cannot find GPIO_PinAFConfig function

  • February 22, 2017
  • 3 replies
  • 1338 views
Posted on February 22, 2017 at 06:02

I am using visualgdb.com tutorial 'Using STM32 timers in PWM mode. It has a function calls 'GPIO_PinAFConfig' as well as 'TIM_OC1Init' but I cannot find it in any of the headers.

    This topic has been closed for replies.

    3 replies

    T J
    Senior III
    February 22, 2017
    Posted on February 22, 2017 at 06:14

    I use uV5, everything seems a little easier...  do you have cubeMX ?

    I start PWM like this...

       

     if (HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1) != HAL_OK)

      {

        /* PWM Generation Error */

            sprintf(string,'HAL_TIM11_PWM_Start Fail\n\r');

            puts(string);

      }
    Anton Veldhuizen
    Associate
    February 22, 2017
    Posted on February 22, 2017 at 06:29

    Thanks Nick

    I do not have cubeMX. I will try to use your suggestion and see if it sorts out the problem.

    Regards Anton

    T J
    Senior III
    February 22, 2017
    Posted on February 22, 2017 at 06:45

    I initialise the pins and functions in cubeMX, which processor is it ?