2017-02-17 01:33 AM
I am using STM32F4 micro controller and few GPIO pins i am making as input pins for sensor input staus and few as output pins to activate the LEDs. As soon as i configure few pins as input pins for sensor, few out pins for LED drive stop working, I am confuse, what could be the reason, software or hardware?
Solved! Go to Solution.
2017-02-19 10:26 PM
Thanks for your suggestion.
Problem has been resolved, It was because of optimization settings of the tool. I disabled option for 'common sub expression delete' then firmware start working properly, So seems like my code optimized by the tool and getting this issue .
Could some body tell me coding rules or standard(MISRA C), so that I could avoid this problem?
2017-02-17 03:49 AM
Hello
I have moved your question to the
‌ where someone should be able to assist you.Thanks
Oli
2017-02-17 05:02 AM
Thanks!!
2017-02-18 07:29 AM
Use BSSR register from Gpio to modify digital outputs, not DR directly. Make sure MODER register is written properly too. If using a debugger, stop the code in your main loop, open the register window and view the gpio register. Manually play with them to check it out.
2017-02-19 10:26 PM
Thanks for your suggestion.
Problem has been resolved, It was because of optimization settings of the tool. I disabled option for 'common sub expression delete' then firmware start working properly, So seems like my code optimized by the tool and getting this issue .
Could some body tell me coding rules or standard(MISRA C), so that I could avoid this problem?