Thursday , 23 September 2021
iten

cp11 ex5 MasterSlave timer


Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31308
    kekkoian
    Participant

    hi, i am running example 5 of cp 11.
    I have an STM32F401RE.
    the example works, the led PA5 is blinking after the trigger from AVDD.
    But the problem is that after i download the firmware, the led is lit ON fixed and than after the trigger it starts blinking.
    I would like the led to be OFF at the beginning but i don t know how to to do it, already tried many things.
    I already set filter high and pull down of GPIO PA8 for channel one of TIM1 as suggested in the book.

    Many thanks

    #31318
    kekkoian
    Participant

    ok i fixed with HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);

    in MX_GPIO_Init function

    but really is not clear why i need to SET the GPIO in the init function to have it OFF.

    • This reply was modified 6 months ago by kekkoian.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.