STM32 not executing if command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-08 6: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-problem- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-08 7: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-08 9:01 AM
Your variable
'Status'
is changed within an interrupt (HAL_TIM_IC_CaptureCallback), so 'Status' should be declared as 'volatile'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-08 9: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.
Up vote any posts that you find helpful, it shows what's working..
