Loading...
 
Skip to main content

System Workbench for STM32


Two externals interrupts EXTI0 and EXTI9_5 doesn't work well

France

Hi,

I think your code has several flaws and could not work properly;

  • In kon_Off, you must save in some variable the state of the LED (on or off)
  • In the Color_Select code you must
    1. If the LED state is ON, shut down the currently on LED (with the current color)
    2. Change the color (as you did)
    3. If the LED was ON, light the new LED

Your current code may work only if yu change the color while the LED is OFF; otherwise LEDs behavior will be quite strange...

Bernard (Ac6)