I cant assign a value to variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 7:32 AM
Hi,
I am trying to assign Adc.Raw[0] and Adc.Raw[1] to Vref and Vtemp as in below code snippet. But, Vref and Vtemp gets 0. These variables never updated with Adc.Raw values.
Could you please point me in the right direction ?
Solved! Go to Solution.
- Labels:
-
STM32Cube MCU Packages
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 7:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 7:36 AM
The assignment is inside an 'if' - was that code actually executed?
What did your printf output show?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 7:48 AM
Thanks Andrew.
I suspect it is a bug, as it is working now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 7:57 AM
>>I suspect it is a bug, as it is working now.
Real hard to know with very limited screen shots of code. Troubleshooting problems like this through the key-hole isn't going to garner much assistance. It's usually not with the code you choose to show.
Provide code in a reviewable / editable manner. Attach code using the code formatting tool </>, or as attached file(s), or preferably a github repo.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 7:57 AM
You can mark that as the solution, then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 9:06 AM
Thanks for the feedback. I will take this into consideration from now on.
