2018-03-08 06:26 AM
I am working on IR Remote decoding using STM32F103C8t6 board. The board is not executing a if condition in while loop whose parameters are true. I am using attolic truestudio for debuging and it is showing that my board is not executing the if command present in the while loop.
The Code zip file is attached below.
https://community.st.com/tags♯/?tags=st-linkv2
https://community.st.com/tags♯/?tags=stm32f1%20debug%20problem
#st-linkv2 #stm32f103c8 #stm32f1-debug-problem2018-03-08 07:21 AM
Usual suspects are that the 'if' is not correctly formed, or that something is being optimised-out.
Are you sure that you have everything qualified as 'volatile' that needs to be ... ?
https://www.avrfreaks.net/comment/2415831#comment-2415831
https://www.avrfreaks.net/forum/tutcoptimization-and-importance-volatile-gcc
https://www.avrfreaks.net/forum/shortcuts-taken-optimized-code-may-occasionally-sic-be-surprising
2018-03-08 09:01 AM
Your variable
'Status'
is changed within an interrupt (HAL_TIM_IC_CaptureCallback), so 'Status' should be declared as 'volatile'.
2018-03-08 09:16 AM
>>Are you sure that you have everything qualified as 'volatile' that needs to be ... ?
I'm sure nothing that needs to be volatile actually is.