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

fix(PeriphDrivers, Other): Fix UART clock source selection #1304

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hfakkiz
Copy link
Contributor

@hfakkiz hfakkiz commented Dec 18, 2024

Description

This PR solves UART clock source selection problems for ME18 and ME30. Problems:

  • For ME18, "MXC_UART_SetFrequency" function changes clock source but it is not a good approach. There is "MXC_UART_SetClockSource" function and user should use this function to change clock source of UART.

  • Removed "MXC_UART_ERTCO_CLK" enum from ME30 files because it does not used by UART.
    image

  • Fixed build error of ME30 caused by "MSDK_NO_GPIO_CLK_INIT" flag's line.

  • Moved clock source enablement into "MXC_UART_SetClockSource" function for ME30.

Also, this PR adds wrapper function of "MXC_UART_SetClockSource" to Zephyr "hal_adi" to enable clock source selection feature in Zephyr. It handles clock source index differences between MSDK and Zephyr.

Checklist Before Requesting Review

  • PR Title follows correct guidelines.
  • Description of changes and all other relevant information.
  • (Optional) Link any related GitHub issues using a keyword
  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

- Updated defined clock sources for ME30 UART
- Moved clock source enablement from init function to clock source
selection function.

Signed-off-by: Furkan Akkiz <[email protected]>
This commit removes clock source selection feature from
MXC_UART_SetFrequency function because there is MXC_UART_SetClockSource
function for this operation.

Signed-off-by: Furkan Akkiz <[email protected]>
This commit adds wrapper function of MXC_UART_SetClockSource function.
Wrapper function converts Zephyr clock source values to
mxc_uart_clock_t type.

Signed-off-by: Furkan Akkiz <[email protected]>
@github-actions github-actions bot added MAX32690 Related to the MAX32690 (ME18) MAX32657 Related to the MAX32655 (ME30) Zephyr MSDK Zephyr related change. labels Dec 18, 2024
@hfakkiz hfakkiz changed the title fix(PeriphDrivers, Other): Fix UART clock source selection problems fix(PeriphDrivers, Other): Fix UART clock source selection Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32657 Related to the MAX32655 (ME30) MAX32690 Related to the MAX32690 (ME18) Zephyr MSDK Zephyr related change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant