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

feat(Boards,CMSIS,Examples,PeriphDrivers): Initial commit for MAX32657 #1012

Merged
merged 102 commits into from
May 14, 2024

Conversation

sihyung-maxim
Copy link
Contributor

Description

This is the initial commit for the MAX32657.

The MAX32657 (ME30) SDK files are still in development and not for official, public use.

Please do not delete the branch after merging this PR.

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.

Jake-Carter and others added 30 commits April 18, 2024 16:03
This commit enable MAX32657 zephyr support.

Signed-off-by: Sadik Ozer <[email protected]>
These files are exact copy of MAX32655
Files will be updated in next sections, added here
to demonstrate delta clearly on next steps

Signed-off-by: Sadik Ozer <[email protected]>
These files are exact copy of MAX32655
Files will be updated in next sections, added here
to demonstrate delta clearly on next steps

Signed-off-by: Sadik Ozer <[email protected]>
feat(PeriphDrivers): Add max32657 basic files
@github-actions github-actions bot added the Workflow Related to Workflow development label May 11, 2024

#include <core_cm33.h>
#include <arm_cmse.h>
#define IS_SECURE_ENVIRONMENT (defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U))
Copy link
Contributor

Choose a reason for hiding this comment

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

This definition causes issues on zephyr side.
image

Copy link
Contributor

Choose a reason for hiding this comment

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

@ozersa fixed in f040b6d

@ozersa
Copy link
Contributor

ozersa commented May 13, 2024

This PR shall be merged after below one, to this changes being pushed on hal_adi too.
#994

@sihyung-maxim
Copy link
Contributor Author

Don't mind the failed BLE workflow. It's still in development/testing - last I heard.

@Jake-Carter
Copy link
Contributor

@sihyung-maxim there are some DMA-related build errors if you attempt to build with MSECURITY_MODE = NONSECURE, can you take a look?

int MXC_UART_RevB_WriteTXFIFODMA(mxc_uart_revb_regs_t *uart, const unsigned char *bytes,
unsigned int len, mxc_uart_dma_complete_cb_t callback,
mxc_dma_config_t config);
int MXC_UART_RevB_WriteTXFIFODMA(mxc_uart_revb_regs_t *uart, mxc_dma_regs_t *dma,
Copy link
Contributor

@rcornall-adi rcornall-adi May 13, 2024

Choose a reason for hiding this comment

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

I think you might need to add *dma parameter also to Libraries/PeriphDrivers/Include/MAX32655/uart.h and other ones that that use revb uart?

Edit* NVM, I updated our hal again to pull in the latest changes to uart_me17.c and it is fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to hear!

@sihyung-maxim
Copy link
Contributor Author

@sihyung-maxim there are some DMA-related build errors if you attempt to build with MSECURITY_MODE = NONSECURE, can you take a look?

Dang, I really wanted to avoid using TARGET_NUM == 32657 and use MXC_DMA_INSTANCES > 1 for the UART DMA functions. The DMA function prototypes are different when one DMA instance is available int MXC_DMA_Init(void) vs more than one DMA instance available MXC_DMA_Init(mxc_dma_regs_t *dma). But for the ME30 non-secure build, although only one DMA instance is available, it still uses the multiple-DMA type functions: MXC_DMA_Init(mxc_dma_regs_t *dma)...

I reverted back the conditional directives. :(

Comment on lines +236 to +237
#define MXC_F_UART_INTEN_TX_THD_POS 6 /**< INTEN_TX_THD Position */
#define MXC_F_UART_INTEN_TX_THD ((uint32_t)(0x1UL << MXC_F_UART_INTEN_TX_THD_POS)) /**< INTEN_TX_THD Mask */
Copy link
Contributor

@rcornall-adi rcornall-adi May 13, 2024

Choose a reason for hiding this comment

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

I think this should still be INTEN_TX_HE as on the max32655, it is what I see in the spec?

Edit* I guess spec is wrong atm, if this is actually based on me13 UART IP which I guess had TX_THD instead of HE. anyways just noticed because of compile error in zephyr.

@lorne-maxim lorne-maxim merged commit 5e014b2 into main May 14, 2024
6 of 8 checks passed
EricB-ADI pushed a commit that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32572 Related to the MAX32572 (ME55) MAX32655 Related to the MAX32655 (ME17) MAX32662 Related to the MAX32662 (ME12) MAX32670 Related to the MAX32670 (ME15) MAX32672 Related to the MAX32672 (ME21) MAX32675 Related to the MAX32675 (ME16) MAX32680 Related to the MAX32680 (ME20) MAX32690 Related to the MAX32690 (ME18) MAX78000 Related to the MAX78000 (AI85) MAX78002 Related to the MAX78002 (AI87) Register Change This issue or pull request involves a change to the MSDK registers. Workflow Related to Workflow development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants