Skip to content

Conversation

@unicab369
Copy link
Contributor

pretty straight forward as well.


RNG->CR &= ~RNG_CR_RNGEN; // Disable RNG
RNG->SR = 0; // Clear error flags
Delay_Us(1); // Wait
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot wait. Find out what takes time, and what you have to do to make this as fast and clean as possible. Other people will be downstream. this needs to be high quality.

Also since we are doing another round, can these functions be static?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what causes the wait, if I read the register without waiting it doesn't return anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the application code has to keep refresh the reading until they get a number

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, nvm. I added the delay bc of the while loop, the while loop should block until it finds a new number.

@cnlohr
Copy link
Owner

cnlohr commented Nov 21, 2025

See above comment.

@cnlohr
Copy link
Owner

cnlohr commented Nov 22, 2025

Looks good

@cnlohr cnlohr merged commit ac1359a into cnlohr:master Nov 22, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants