-
Notifications
You must be signed in to change notification settings - Fork 3k
[STM]Add RNG (random number generator) for STM32F4 STM32F7 families #2253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@screamerbg @pjbakker |
/* Get Random byte */ | ||
for( i = 0; i < len; i++ ){ | ||
rng_get_byte( output + i ); | ||
printf("output %i: %i\n",i,(int)*(output+i)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left over debug info?
formatting is a bit funky (see: https://developer.mbed.org/teams/SDK-Development/wiki/mbed-sdk-coding-style) and updated docs coming :) |
Hello Sam, |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 591 Build failed! |
Looks like build failures for ARM toolchain for the following targets: NUCLEO_F429ZI , DISCO_F469NI, DISCO_F429ZI, NUCLEO_F410RB:
|
@adustm Please can you check those failures? |
825bb11
to
059c5a3
Compare
Hello everyone, I am using the command : mbed test --compile -t ARM -m NUCLEO_F410RB and it compiles perfectly. Let me know. |
Thanks @adustm! /morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 669 Test failed! |
Hello, Could you give me the command + result of the morph test, please ? I can't read them |
Hi @adustm, sorry for the delay! There was a failure in the CI that occurred during this test, I will restart it. /morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 685 Test failed! |
Hello Brian, |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 710 Test failed! |
The build 710 is without any failure |
@0xc0170 any idea why it reports failure? |
Hi everyone, sorry for the delay on reporting back on this. For build 710 (that last one), a test box died again which cause the whole thing to fail. I've since reorganized the boards so they are more balanced across the boxes, so that should help with stability. I can confirm that build 685 looks ok, so the merge to master should be fine 👍 |
Hello, thanks for the analysis and merge. I will push the entropy for the rest of STM32 products soon. |
These functions are to be tested in mbed-os environment.
The test was passed for DISCO_F429ZI and NUCLEO_F746ZG with IAR toolchain.
The compilation passes for DISCO_F429ZI / DISCO_F469NI / DISCO_F746NG / NUCLEO_F410RB / NUCLEO_F429ZI / NUCLEO_F746ZG / NUCLEO_F767ZI
Please note that not every STM32F4 platforms are supporting the RNG feature. Some defines have been added in hal/targets/hal/TARGET_STM/TARGET_STM32F4/entropy_hardware_poll.c to enable the relevant targets.
I did not find any code to test the function, thus I used the one below :
This result was the following :
Another printf inside the code showed that the values seemed to be random (I trust the hardware :) )