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(Other): Zephyr: MAX32650: Add missing LP wrappers #1344

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

Burakbabao
Copy link
Contributor

This commit adds the missing Low Power defines for MAX32650 for the zephyr build system.

There are generally two main groups in the wrap_max32_xx files. MAX32650 fits the first group for Low Power. However, there is no MXC_LP_EnterShutDownMode() function provided for MAX32650 so the MXC_LP_EnterBackupMode() function was chosen as best fit.

@github-actions github-actions bot added the Zephyr MSDK Zephyr related change. label Feb 10, 2025
@@ -50,7 +51,11 @@ static inline void Wrap_MXC_LP_EnterStandbyMode(void)

static inline void Wrap_MXC_LP_EnterPowerDownMode(void)
{
#if defined(CONFIG_SOC_MAX32650)
MXC_LP_EnterBackupMode();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is not correct mode for this function. According to user guide, there is "Shutdown Mode" for MAX32650 too.
image

Also, there are macros for this mode.
image

Maybe you should create a new "MXC_LP_EnterShutdownMode(...)" function in lp_me10.c file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mb, didn't realize we could touch those as well. Was trying the best fit with what was provided while only touching the wrapper files. Looking into it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Burakbabao Burakbabao force-pushed the fix-MAX32650-lp-wrapper branch from 518025e to 658a9c4 Compare February 12, 2025 11:06
@github-actions github-actions bot added the MAX32650 Related to the MAX32650 (ME10) label Feb 12, 2025
@Burakbabao Burakbabao force-pushed the fix-MAX32650-lp-wrapper branch from 658a9c4 to acd0650 Compare February 12, 2025 11:07
@ttmut
Copy link
Contributor

ttmut commented Feb 12, 2025

Have you tested this on a board?

@Burakbabao Burakbabao marked this pull request as draft February 13, 2025 11:44
@Burakbabao Burakbabao force-pushed the fix-MAX32650-lp-wrapper branch 2 times, most recently from ca9dc13 to ac204f8 Compare February 13, 2025 13:15
@github-actions github-actions bot removed the MAX32650 Related to the MAX32650 (ME10) label Feb 13, 2025
@Burakbabao Burakbabao force-pushed the fix-MAX32650-lp-wrapper branch from ac204f8 to 3a05c74 Compare February 13, 2025 13:27
@Burakbabao Burakbabao marked this pull request as ready for review February 13, 2025 13:28
@Burakbabao
Copy link
Contributor Author

Burakbabao commented Feb 13, 2025

Have you tested this on a board?

Soo, the shutdown function bricked two boards.

@hfakkiz although there is a shutdown mode and the relevant GCR info in the documentation, there seems to be an issue with it. So, for now, the backup function was used.

The issue may be found if the conflicting declarations of the shutdown mode bits are investigated more:

shutdown declared b011 on page67 of user guide 32650:
sdown_b011_page67_userguide32650

shutdown declared b111 on page53 of user guide 32650:
sdown_b111_page53_userguide32650

@ttmut ttmut requested a review from hfakkiz February 13, 2025 14:36
This commit adds the missing lp define for MAX32650 for
the zephyr build system. The shutdown function was seen
to be problematic so the similar backup function was
used for now.

Signed-off-by: Burak Babaoglu <[email protected]>
@Burakbabao Burakbabao force-pushed the fix-MAX32650-lp-wrapper branch from 3a05c74 to 9d4b53d Compare February 13, 2025 14:43
@ttmut ttmut merged commit a53f4f5 into analogdevicesinc:main Feb 13, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Zephyr MSDK Zephyr related change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants