Skip to content
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

STM32: Refactor us_ticker files #7290

Merged
merged 7 commits into from
Jul 12, 2018
Merged

Conversation

bcostm
Copy link
Contributor

@bcostm bcostm commented Jun 21, 2018

Description

This PR re-arrange the files used to manage the us_ticker. Previously the code was mixed in different files (us_ticker.c, hal_tick_16b.c, hal_tick_32b.c, hal_tick_common.c, hal_tick.h).

Now:

  • All the code to manage the us_ticker is in us_ticker.c and us_ticker_data.h files
  • The hal_tick_overrides.c file contains only the ST HAL Tick functions redefinitions (weak)

Pull request type

[ ] Fix
[X] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team June 21, 2018 11:25
@bcostm bcostm changed the title STM32: Refactor file to manage us_ticker STM32: Refactor us_ticker files Jun 21, 2018
Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

Lot's of cloned file changes. Hoping this was done by script, and not by hand!

Was much easier to tell what happened via each commit instead of the overall diff.

@cmonr
Copy link
Contributor

cmonr commented Jun 21, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jun 21, 2018

Build : SUCCESS

Build number : 2425
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7290/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jun 21, 2018

@mbed-ci
Copy link

mbed-ci commented Jun 22, 2018

@cmonr
Copy link
Contributor

cmonr commented Jun 22, 2018

@bcostm Please take a look at the test failures. On quick glance, they all appear to be related to ST boards and tickers.

@bcostm
Copy link
Contributor Author

bcostm commented Jun 22, 2018

Lot's of cloned file changes. Hoping this was done by script, and not by hand!

Yes I used sed/find commands to do it (too lazy to do it manually on 55 files :))

I will check the errors

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 27, 2018

@bcostm Any update for the failures above?

@bcostm
Copy link
Contributor Author

bcostm commented Jun 27, 2018

I've managed to make one test pass but it causes other tests to be fail... I put this PR on hold for now until Issue #7316 is fixed because same files/functions are used.

@cmonr
Copy link
Contributor

cmonr commented Jul 3, 2018

For tracking, looks like the PR that will fix #7316 is #7352

@cmonr
Copy link
Contributor

cmonr commented Jul 9, 2018

@bcostm #7352 just came in, so weel free to continue when possible!

@bcostm bcostm force-pushed the refactor_us_ticker branch from 61c52f6 to 1bf4bca Compare July 10, 2018 11:55
@bcostm
Copy link
Contributor Author

bcostm commented Jul 10, 2018

I have rebased and added what has been done in PR #7352. Tests on several boards on-going. I'll give the status when they'll be terminated.

@jeromecoutant
Copy link
Collaborator

Hi
Results from ST CI bench are all good
Thx

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 11, 2018

Can be the commit messages improved? typo, additional changes, other fixes could be: stm32 ticker: fix macro name , stm32 ticker: changing something , stm32 ticker: fixing what and why

bcostm added 3 commits July 11, 2018 14:36
- rename hal_tick_common.c in hal_tick_overrides.c
- move 16 and 32bits timer functions in us_ticker.c
- rename TIM_MST_16BIT in TIM_MST_BIT_WIDTH in order to use it directly in ticker info structure
- change HAL_InitTick() and HAL_GetTick()
bcostm added 4 commits July 11, 2018 14:43
… issue with 16-bit timer

- Move back the 16/32bit timer initialization in HAL_InitTick() and not in us_ticker_init()
- Use ticker_read_us() and us_ticker_read() in HAL_GetTick() to fix potential overflow issue with the 16bit timer

==> These corrections allow timer, rtc, sleep, tick tests to PASS
@bcostm bcostm force-pushed the refactor_us_ticker branch from 1bf4bca to 0b133be Compare July 11, 2018 12:52
@bcostm
Copy link
Contributor Author

bcostm commented Jul 11, 2018

OK. Commit messages updated.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 11, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 11, 2018

Build : SUCCESS

Build number : 2569
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7290/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jul 11, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 11, 2018

@cmonr cmonr merged commit 19c6f3b into ARMmbed:master Jul 12, 2018
@bcostm
Copy link
Contributor Author

bcostm commented Jul 12, 2018

I don't see the release-version:5.9.3 tag ?

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
@bcostm bcostm deleted the refactor_us_ticker branch October 29, 2018 09:36
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.

5 participants