STM32F303 HAL ISR being called twice
- October 20, 2022
- 5 replies
- 1383 views
Hello!
I am writing a program in which I am controlling a ST32F303 MCUs DAC1 and DAC2, thru a USB port, via LabView. The LabView part sends a data string containing the following "1,4095". The one implicates which DAC I am trying to control(in this case the first one), while the second part indicates the value of the DAC it has to be set to. The DAC value goes from 0-4095(which is 0V - 3.3V on the output when it has no load).
The problem I have encountered is that when the interrupt fires on receiving new data the ISR gets executed twice for no apparent reason. This causes my program to be slower than expected and causing the DAC to setting the wrong values.
I am new to ST32 and ARMs in general so I'm posting the entire code below for better understanding. Thanks in advance for helping out.
Regards
