2 Replies Latest reply on Aug 7, 2017 7:40 AM by rola_264706

    Adviice  on how to make  variable in SysTick_interrupt_timer visible globally & advise on future WDT

      I am starting to add several internal software timers to a psoc4 design starting on the  cykit-049  (most will probably be 1 sec decrement values but some could be minutes) .  Can someone give me some advise on best path.  I have declared a static volatile uint8 in main as global and also inside of the SysTick_interrupt_timer with a clean compile.  However when I decrement the var in  the systick it obviously doesn't decrement in main.  Should I be using extern since SysTick is a separate file? 


      At some point I will be adding a WDT so maybe I need advice to move away from SysTick and into a WDT type interrupt but I still am confused on how to make a global in main visitable and modifiable in an interrupt routine such as SysTick.  Is there an example that would help me understand this shared variable concept ?