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(Other): Add final design changes for MAX32572 related files #831

Merged
merged 17 commits into from
Jan 8, 2024

Conversation

sihyung-maxim
Copy link
Contributor

@sihyung-maxim sihyung-maxim commented Dec 13, 2023

Description

This PR adds the latest MAX32572 library files. These files match what's in the dev/me13b_me55 branch.

I've also made changes to the TMR enum values - meaning the MXC_ prefix was added while keeping the old names. Many names that did not follow the SDK convention but were left in the dust were finally updated for all parts during the development of the ME55 and ME13B SDK files. For example:
image

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.

@github-actions github-actions bot added MAX32655 Related to the MAX32655 (ME17) MAX32665 Related to the MAX32665 (ME14) 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) MAX32662 Related to the MAX32662 (ME12) Register Change This issue or pull request involves a change to the MSDK registers. labels Dec 13, 2023
@sihyung-maxim
Copy link
Contributor Author

Expect failed SVD checks. Will be temporarily disabling ME13 for SVD checks as the ME55 and ME13B both share a lot of design changes, and the ME13B updates are vastly different to the ME13A.

Comment on lines -91 to 93
__IO uint32_t fctrl2; /**< <tt>\b 0x08:</tt> FCR FCTRL2 Register */
__R uint32_t rsv_0x8;
__IO uint32_t fctrl3; /**< <tt>\b 0x0C:</tt> FCR FCTRL3 Register */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was intentional as the ME55 is a subset of the ME13B, so there are a lot of blocks that the ME55 directly takes from the ME13B but with a few pieces removed for the ME55 (like this fctrl2 register). However, instead of renaming fctrl3 to fctrl2 for the ME55, it was decided to keep the index numbering consistent between the ME13B and ME55.

Same reasoning for SPI2. See the comment below for more info about SPI numbering.

Comment on lines +686 to +692
#define MXC_BASE_SPI0 ((uint32_t)0x40046000UL)
#define MXC_SPI0 ((mxc_spi_regs_t *)MXC_BASE_SPI0)
#define MXC_BASE_SPI1 ((uint32_t)0x40047000UL)
#define MXC_SPI1 ((mxc_spi_regs_t *)MXC_BASE_SPI1)
// SPI2 does not exist in the MAX32572 (to match instance addressing with MAX32570B)
#define MXC_BASE_SPI3 ((uint32_t)0x400BE000UL)
#define MXC_SPI3 ((mxc_spi_regs_t *)MXC_BASE_SPI3)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As mentioned earlier, the ME55 is a subset of the ME13B - with a few features removed on the ME55. SPI2 peripheral location is not supported on the ME55, but the numbering is intentional to keep the SPI peripheral addresses and numbering consistent between the ME13B and ME55.

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is not used for any of the parts.

@github-actions github-actions bot added MAX32520 Related to the MAX32520 (ES17) MAX32570 Related to the MAX32570 (ME13) MAX32650 Related to the MAX32650 (ME10) MAX32660 Related to the MAX32660 (ME11) labels Dec 13, 2023
@sihyung-maxim sihyung-maxim added the WIP work in progress label Dec 13, 2023
@sihyung-maxim
Copy link
Contributor Author

/clang-format-run

@sihyung-maxim sihyung-maxim removed the WIP work in progress label Dec 20, 2023
@@ -0,0 +1,85 @@
/******************************************************************************
* Copyright (C) 2022 Maxim Integrated Products, Inc., All rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyrights?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch.

# PROJ_CFLAGS+=-DRO_FREQ=46000000
# PROJ_CFLAGS+=-DCRYPTO_FREQ=46000000

#PROJ_CFLAGS+=-DPeripheralClock=60000000
Copy link
Contributor

Choose a reason for hiding this comment

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

Leave these commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@@ -1,19 +1,39 @@
// Copyright 2017 ETH Zurich and University of Bologna.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure about removing this entirely

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, should be a portions copyright.

*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
Copy link
Contributor

Choose a reason for hiding this comment

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

ctors and dtors are needed for C++ support, any idea why they were removed?

Copy link
Contributor Author

@sihyung-maxim sihyung-maxim Dec 24, 2023

Choose a reason for hiding this comment

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

This was created roughly 1-2 years ago, and has been kept separate/out of sync with the main as development was on and off. I tried my best to keep it synced, but this passed through the cracks. I've added it back in.

@sihyung-maxim
Copy link
Contributor Author

/clang-format-run

@sihyung-maxim sihyung-maxim added Ready for review Raise "Ready" flag if PR is ready for review after WIP is down. Needs Review labels Dec 24, 2023
@sihyung-maxim sihyung-maxim requested a review from ozersa December 24, 2023 21:03
@sihyung-maxim sihyung-maxim changed the title feat(Other): Add updated MAX32572 files feat(Other): Add final design changes for MAX32572 related files Jan 8, 2024
@sihyung-maxim sihyung-maxim merged commit 7e156f5 into main Jan 8, 2024
13 checks passed
@sihyung-maxim sihyung-maxim deleted the feat/add_me55 branch January 8, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32520 Related to the MAX32520 (ES17) MAX32570 Related to the MAX32570 (ME13) MAX32650 Related to the MAX32650 (ME10) MAX32655 Related to the MAX32655 (ME17) MAX32660 Related to the MAX32660 (ME11) MAX32662 Related to the MAX32662 (ME12) MAX32665 Related to the MAX32665 (ME14) 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) Needs Review Ready for review Raise "Ready" flag if PR is ready for review after WIP is down. Register Change This issue or pull request involves a change to the MSDK registers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants