[mbed] [STM32F7 family] fix issue with RTC init (#1559)

88 views
Skip to first unread message

adustm

unread,
Feb 22, 2016, 11:21:52 AM2/22/16
to mbedmicro/mbed

the logical test for RTC_ISR_INITS was wronlgy reported from other STMfamilies.
MBED_16 test works with this modification.


You can view, comment on, or merge this pull request online at:

  https://github.com/mbedmicro/mbed/pull/1559

Commit Summary

  • [STM32F7 family] fix issue with RTC init

File Changes

Patch Links:


Reply to this email directly or view it on GitHub.

Martin Kojtal

unread,
Feb 22, 2016, 12:43:02 PM2/22/16
to mbedmicro/mbed

Please print the test before this change-set and after, to show it fixes it

Martin Kojtal

unread,
Feb 22, 2016, 12:56:40 PM2/22/16
to mbedmicro/mbed

How does this fixes the issue? there is lot of noise in the diff

adustm

unread,
Feb 25, 2016, 3:44:35 AM2/25/16
to mbedmicro/mbed

How does this fixes the issue? there is lot of noise in the diff

The noise is tabulation alignment.
The fix is simply a negation of the test :
if((RTC->ISR & RTC_ISR_INITS) == RTC_ISR_INITS) { ...}
was turned into :
if((RTC->ISR & RTC_ISR_INITS) return;
(same code as in other families)

Please print the test before this change-set and after, to show it fixes it

Here was the status of MBED_16 before the fix:

Looking for DISCO_F746NG with MBEDLS
...port ready!
HOST: Reset target...
HOST: Property 'timeout' = '20'
HOST: Property 'host_test_name' = 'rtc_auto'
HOST: Property 'description' = 'RTC'
HOST: Property 'test_id' = 'MBED_16'
HOST: Start test...
MBED: [946684800] [2000-01-01 00:00:00 AM]
HOST: [946684800] [2000-01-01 00:00:00 AM] received time +946684800 sec after 2.17 sec... OK
MBED: [946684800] [2000-01-01 00:00:00 AM]
HOST: [946684800] [2000-01-01 00:00:00 AM] received time +0 sec after 1.04 sec... FAIL
MBED: [946684800] [2000-01-01 00:00:00 AM]
HOST: [946684800] [2000-01-01 00:00:00 AM] received time +0 sec after 1.05 sec... FAIL
MBED: [946684800] [2000-01-01 00:00:00 AM]
HOST: [946684800] [2000-01-01 00:00:00 AM] received time +0 sec after 1.04 sec... FAIL
MBED: [946684800] [2000-01-01 00:00:00 AM]
HOST: [946684800] [2000-01-01 00:00:00 AM] received time +0 sec after 1.04 sec... FAIL
{{failure}}
{{end}}
Test::Output::Finish

We can see that the RTC does not start.

Here is MBED_16 result after the fix:

Looking for DISCO_F746NG with MBEDLS
...port ready!
HOST: Reset target...
HOST: Property 'timeout' = '20'
HOST: Property 'host_test_name' = 'rtc_auto'
HOST: Property 'description' = 'RTC'
HOST: Property 'test_id' = 'MBED_16'
HOST: Start test...
MBED: [1256729737] [2009-10-28 11:35:37 AM]
HOST: [1256729737] [2009-10-28 11:35:37 AM] received time +1256729737 sec after 0.17 sec... OK
MBED: [1256729738] [2009-10-28 11:35:38 AM]
HOST: [1256729738] [2009-10-28 11:35:38 AM] received time +1 sec after 1.05 sec... OK
MBED: [1256729739] [2009-10-28 11:35:39 AM]
HOST: [1256729739] [2009-10-28 11:35:39 AM] received time +1 sec after 1.04 sec... OK
MBED: [1256729740] [2009-10-28 11:35:40 AM]
HOST: [1256729740] [2009-10-28 11:35:40 AM] received time +1 sec after 1.05 sec... OK
MBED: [1256729741] [2009-10-28 11:35:41 AM]
HOST: [1256729741] [2009-10-28 11:35:41 AM] received time +1 sec after 1.04 sec... OK

{{success}}
{{end}}
Test::Output::Finish

Martin Kojtal

unread,
Feb 25, 2016, 4:07:19 AM2/25/16
to mbedmicro/mbed

Thanks, appreciate sharing the test results (running them). This always help.

If you do code style changes, please do them in a separate commit. It's easier to review/integrate. I would just look at it quickly if there is no real change in logic, and moved to the main one - rtc fix in this case.

Martin Kojtal

unread,
Feb 25, 2016, 4:09:46 AM2/25/16
to mbedmicro/mbed

Merged #1559.

Reply all
Reply to author
Forward
0 new messages