Generated random number is negative, but I expect it to be positive
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-02-04 6:17 AM
Hi,
I am using HAL_RNG_GenerateRandomNumber API to generate random number between 0 to 4294967295, but when I debug the code, I see that the random number takes negative number.
Could anyone please help me with this?
Thanks.
Labels:
- Labels:
-
STM32CubeIDE
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-02-04 6:30 AM
Just an IDE bug. You can ignore it, or right click and view it as hex or something else.
If you feel a post has answered your question, please click "Accept as Solution".
