Skip to content

Conversation

@FRASTM
Copy link
Contributor

@FRASTM FRASTM commented Apr 3, 2023

When testing the tests/drivers/counter/counter_basic_api on stm32 boards when RTC is enabled,
it is also possible to run the test on timer counter.
This is done when also enabling all the timer counter on stm32 boards in each board overlay file:

  • nucleo_f091rc.overlay
  • nucleo_f103rb.overlay
  • nucleo_f207zg.overlay
  • nucleo_f429zi.overlay
  • nucleo_f746zg.overlay
  • nucleo_g071rb.overlay
  • nucleo_g474re.overlay
  • nucleo_h743zi.overlay
  • nucleo_l152re.overlay
  • nucleo_wb55rg.overlay
  • stm32f3_disco.overlay
  • stm32h735g_disco.overlay
  • stm32h747i_disco_m7.overlay
  • nucleo_wl55jc

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

See comment on commit "tests: drivers: counter running on stm32 timer-counter instances"

Copy link
Member

Choose a reason for hiding this comment

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

This is enabling support of counter API on the SoC, this should be moved to dts/st/.... to be fully portable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The compatible = "st,stm32-counter"; is moved to .dtsi file of each soc by commit df324cc583cc7c5dd470b19daead4d09b716fcd1

@FRASTM FRASTM force-pushed the counter branch 5 times, most recently from 0d8a23e to 55e0985 Compare April 3, 2023 15:08
@FRASTM FRASTM marked this pull request as draft April 3, 2023 15:10
@FRASTM FRASTM force-pushed the counter branch 6 times, most recently from f675079 to 5d80baa Compare April 4, 2023 09:04
@FRASTM
Copy link
Contributor Author

FRASTM commented Apr 17, 2023

Rebase on 81872eb

@FRASTM
Copy link
Contributor Author

FRASTM commented Apr 17, 2023

CI failure : build failed on west build -p auto -b mimxrt1060_evk tests/drivers/counter/counter_basic_api does not depend on the PR
Probably due to commit a5fd0d1 of the PR #51217
@gmarull could you please have a look

@FRASTM FRASTM force-pushed the counter branch 2 times, most recently from bef4108 to 65e1d26 Compare April 19, 2023 06:45
FRASTM added 3 commits April 19, 2023 10:03
Adapt the stm32 counter-timer driver to the stm32_ll function
prototype. Some stm32 families have
LL_TIM_OC_GetCompareCHx(TIM_TypeDef some others have
LL_TIM_OC_GetCompareCHx(const TIM_TypeDef.
This will fix compilation warning.
Adds the macro for stm32L0 16bit timers.

Signed-off-by: Francois Ramu <[email protected]>
The stm32f4 and stm32f7 serie has to compile the stm32_ll_rcc
layer to get the LL_RCC_GetSystemClocksFreq function.

Signed-off-by: Francois Ramu <[email protected]>
Add the counter compatibility for each timer of the stm32 mcus.

Signed-off-by: Francois Ramu <[email protected]>
FRASTM added 2 commits April 19, 2023 10:04
Add the counter to the yaml of more stm32 target boards
That will let the counter testing run on those platforms.

Signed-off-by: Francois Ramu <[email protected]>
Defines the overlay to Use the stm32 counter-timer in addition
to the rtc (if enabled)
to pass the tests/drivers/counter/counter_basic_api/
Enable all the possible timer nodes on each board.

Signed-off-by: Francois Ramu <[email protected]>
@FRASTM
Copy link
Contributor Author

FRASTM commented Apr 19, 2023

rebase on 63ed1d9 after updating the modules/hal/stm32

@gmarull
Copy link
Member

gmarull commented Apr 19, 2023

CI failure : build failed on west build -p auto -b mimxrt1060_evk tests/drivers/counter/counter_basic_api does not depend on the PR Probably due to commit a5fd0d1 of the PR #51217 @gmarull could you please have a look

FYI #57026

@FRASTM FRASTM marked this pull request as ready for review April 20, 2023 11:19
@FRASTM FRASTM requested a review from erwango April 21, 2023 06:59
@carlescufi carlescufi merged commit 739ffd8 into zephyrproject-rtos:main Apr 24, 2023
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.

7 participants