Skip to content

STM32L4: fix trng clock setting #8867

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

Merged
merged 1 commit into from
Dec 7, 2018
Merged

Conversation

bcostm
Copy link
Contributor

@bcostm bcostm commented Nov 26, 2018

Description

Remove the TRNG clock setting for STM32L4 devices in the trng_api.c file to solve the conflict with USB clock setting.

Fix #8864

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team November 26, 2018 12:44
@ghost
Copy link

ghost commented Nov 26, 2018

I can test on Nucleo-476 kit and a 475 custom board (runs the disco475iot01A target but is a custom board with a usb micro connector on usb signals PA10, PA11).
Will attach test report here when complete

This will be done in the system_clock.c file instead.
@bcostm bcostm force-pushed the fix_trng_clock_setting branch from 5c93419 to 08f9e80 Compare November 26, 2018 16:36
@bcostm
Copy link
Contributor Author

bcostm commented Nov 26, 2018

I have updated this PR and only removed the TRNG clock setting. Tests are on-going on my side on all STM32L4 devices. If there are ok then it will be not needed to change the system_clock.c files...

@bcostm bcostm changed the title STM32L4: update usb and trng clocks setting STM32L4: fix trng clock setting Nov 26, 2018
@ghost
Copy link

ghost commented Nov 26, 2018

Tested on NUCLEO_L476RG board:

NUCLEO_L476RG_test.zip

@ghost
Copy link

ghost commented Nov 26, 2018

Tested on custom DISCO_L475VG_IOT01A board:

DISCO_L475VG_IOT01A_test.zip

@bcostm
Copy link
Contributor Author

bcostm commented Nov 27, 2018

Thanks for the reports. On my side the TRNG tests are also PASS:

+---------------------+-----------------+---------------------+-----------------+--------+--------+--------+--------------------+
| target              | platform_name   | test suite          | test case       | passed | failed | result | elapsed_time (sec) |
+---------------------+-----------------+---------------------+-----------------+--------+--------+--------+--------------------+
| NUCLEO_L432KC-ARM   | NUCLEO_L432KC   | tests-mbed_hal-trng | TRNG: trng_test | 1      | 0      | OK     | 0.22               |
| NUCLEO_L433RC_P-ARM | NUCLEO_L433RC_P | tests-mbed_hal-trng | TRNG: trng_test | 1      | 0      | OK     | 0.21               |
| NUCLEO_L476RG-ARM   | NUCLEO_L476RG   | tests-mbed_hal-trng | TRNG: trng_test | 1      | 0      | OK     | 0.22               |
| NUCLEO_L486RG-ARM   | NUCLEO_L486RG   | tests-mbed_hal-trng | TRNG: trng_test | 1      | 0      | OK     | 0.23               |
| NUCLEO_L496ZG-ARM   | NUCLEO_L496ZG   | tests-mbed_hal-trng | TRNG: trng_test | 1      | 0      | OK     | 0.21               |
+---------------------+-----------------+---------------------+-----------------+--------+--------+--------+--------------------+
+-------------------------+---------------------+---------------------+-----------------+--------+--------+--------+--------------------+
| target                  | platform_name       | test suite          | test case       | passed | failed | result | elapsed_time (sec) |
+-------------------------+---------------------+---------------------+-----------------+--------+--------+--------+--------------------+
| DISCO_L475VG_IOT01A-ARM | DISCO_L475VG_IOT01A | tests-mbed_hal-trng | TRNG: trng_test | 1      | 0      | OK     | 0.23               |
| DISCO_L476VG-ARM        | DISCO_L476VG        | tests-mbed_hal-trng | TRNG: trng_test | 1      | 0      | OK     | 0.24               |
+-------------------------+---------------------+---------------------+-----------------+--------+--------+--------+--------------------+

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

ST CI OK

@cmonr
Copy link
Contributor

cmonr commented Dec 6, 2018

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 6, 2018

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr merged commit ea4a8e4 into ARMmbed:master Dec 7, 2018
@bcostm bcostm deleted the fix_trng_clock_setting branch December 7, 2018 12:22
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 10, 2018

@bcostm We are currently investigating a test failure with L4 device and tls. From the logs, it seems like entropy is broken. Reviewing the changes between good and bad state, this PR was flagged. We will provide more details once we test reverting this one.

This is the commit range good and bad state (78d6018..fce4dc6)

@juhoeskeli
Copy link
Contributor

juhoeskeli commented Dec 10, 2018

@0xc0170 @bcostm tested with and without this PR using WISE_1570 (STM32L486). With the functions requiring trng will fail, and by reverting the merge it will work again.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 10, 2018

OK, I'll open a revert for review (this is currently only on master as 5.11.1 label here, not yet released).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants