Skip to content

Conversation

@mrfuchs
Copy link
Contributor

@mrfuchs mrfuchs commented Jun 16, 2022

Add Kconfig options COUNTER_RTC_STM32_CLOCK_HSE and COUNTER_RTC_STM32_HSE_DIV
to allow configuring HSE as the RTC clock source.

Signed-off-by: Markus Fuchs [email protected]

Add Kconfig options COUNTER_RTC_STM32_CLOCK_HSE and
COUNTER_RTC_STM32_HSE_DIV to allow configuring HSE as the RTC clock
source.

Signed-off-by: Markus Fuchs <[email protected]>
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.

Thanks for this change but this way of configuring clocks on STM32 drivers is obsolete today.
Please use device tree based configuration, see #45053 and an example on how to add driver support: #45508

@mrfuchs
Copy link
Contributor Author

mrfuchs commented Jun 16, 2022

Thanks for this change but this way of configuring clocks on STM32 drivers is obsolete today. Please use device tree based configuration, see #45053 and an example on how to add driver support: #45508

I see. As we're still running on Zephyr 2.7, I cannot provide a proper patch for that at the moment then.

@erwango
Copy link
Member

erwango commented Jun 16, 2022

Thanks for this change but this way of configuring clocks on STM32 drivers is obsolete today. Please use device tree based configuration, see #45053 and an example on how to add driver support: #45508

I see. As we're still running on Zephyr 2.7, I cannot provide a proper patch for that at the moment then.

Ok, no problem, this is something that we'll address when possible.

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Aug 16, 2022
@FRASTM
Copy link
Contributor

FRASTM commented Aug 17, 2022

Thanks for this change but this way of configuring clocks on STM32 drivers is obsolete today. Please use device tree based configuration, see #45053 and an example on how to add driver support: #45508

I see. As we're still running on Zephyr 2.7, I cannot provide a proper patch for that at the moment then.

Ok, no problem, this is something that we'll address when possible.

There is a slight difference, the RTC clock selection is a 2-bit value of the BDCR RCC register (not CCIPR).

config COUNTER_RTC_STM32_HSE_DIV
int "HSE prescaler"
depends on COUNTER_RTC_STM32_CLOCK_HSE
default 0
Copy link
Contributor

@FRASTM FRASTM Aug 17, 2022

Choose a reason for hiding this comment

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

0 is not always the default, some stm32 devices like stm32F4 have a prescaler from 2 to 31 on the HSE clock, some others like the stm32wb or stm32L4/L5 have a fixed divider by 32 on the HSE clock

@github-actions github-actions bot removed the Stale label Aug 18, 2022
@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Oct 18, 2022
@erwango
Copy link
Member

erwango commented Oct 18, 2022

Superseded by #50104. Closing

@erwango erwango closed this Oct 18, 2022
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