Skip to main content
Piotr Partyka
Visitor II
August 7, 2017
Question

Interrupt triggered only once

  • August 7, 2017
  • 1 reply
  • 840 views
Posted on August 07, 2017 at 22:06

 

 

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    1 reply

    Vangelis Fortounas
    Associate II
    August 8, 2017
    Posted on August 08, 2017 at 18:48

    Hello Piotr!

    1. your timer will never start counting because you put as period, (ARR) zero.

    htim3.Init.Period = 0;

    2. Inside your Timer callback function(if this finaly called), you zeroize the variable by

    defining static int delay_us = 0; finaly after exit it has the value 0x
    3 Other issue is that you put inside this callback
    the 
    HAL_TIM_IRQHandler(..); 
    This is not correct because the callback function called from inside HAL_TIM_IRQHandler(..); !! 
    4. Inside your While(1) loop, you call sequentialy 
    HAL_UART_Transmit_IT(..) without checking for completion from the previous transmit This is a non blocking function. May be calling the blocking version is more suitable for your project 
    HAL_UART_Transmit(..) 
    In conclusion, you first take action to improove these imperfections in order to get a better focused picture to the posible problem.
    
    It would help the community and you to post your .IOC file.