Hello there !
I have configured tmr peripheral to trigger bctu in order to initiate an adc conversion. I've added an interrupt callback function when bctu gets triggered in order to validate my peripheral configuration with an oscilloscope.
The strange for me thing is that when I set optimization level to "None (-O0)" my program entered my callback function only once.
When I have the optimization level to "Optimize for size (-Os)" my program enters the callback every time the trigger is happening.This is the wanted behavior but I can not figure out why this is happening.
Can anyone shred some light into this matter ?
All I want is to have an interrupt when triggering is happening in order to validate the functionality of triggers/notifications of any peripheral that I use.
Kind regards,
kyf