Skip to content

Commit 47a32a0

Browse files
authored
Merge pull request #15263 from MaximIntegrated/add-MAX32670
Add MAX32670
2 parents a6610e6 + 4dd0144 commit 47a32a0

File tree

157 files changed

+38185
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+38185
-1
lines changed

targets/TARGET_Maxim/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
1+
# Copyright (c) 2022 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

44

55
add_subdirectory(TARGET_MAX32620C EXCLUDE_FROM_ALL)
66
add_subdirectory(TARGET_MAX32625 EXCLUDE_FROM_ALL)
77
add_subdirectory(TARGET_MAX32630 EXCLUDE_FROM_ALL)
88
add_subdirectory(TARGET_MAX32660 EXCLUDE_FROM_ALL)
9+
add_subdirectory(TARGET_MAX32670 EXCLUDE_FROM_ALL)
910

1011
add_library(mbed-maxim INTERFACE)
1112

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Copyright (c) 2022 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(TARGET_MAX32670EVKIT EXCLUDE_FROM_ALL)
5+
6+
if(${MBED_TOOLCHAIN} STREQUAL "ARM")
7+
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/MAX32670.sct)
8+
set(STARTUP_FILE device/TOOLCHAIN_ARM_STD/startup_max32670.S)
9+
elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
10+
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/max32670.ld)
11+
set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_max32670.S)
12+
endif()
13+
14+
add_library(mbed-max32670 INTERFACE)
15+
mbed_set_linker_script(mbed-max32670 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
16+
17+
set(MXM_PARTNUMBER MAX32670)
18+
set(MXM_SOURCE_DIR ./Libraries/PeriphDrivers/Source)
19+
set(MXM_PERIPH_DRIVER_DIR ./Libraries/PeriphDrivers)
20+
set(MXM_CMSIS_DIR ./Libraries/CMSIS/Device/Maxim)
21+
22+
target_include_directories(mbed-max32670
23+
INTERFACE
24+
.
25+
device
26+
27+
${MXM_PERIPH_DRIVER_DIR}/Include/${MXM_PARTNUMBER}
28+
${MXM_CMSIS_DIR}/${MXM_PARTNUMBER}/Include
29+
30+
${MXM_SOURCE_DIR}/AES
31+
${MXM_SOURCE_DIR}/CRC
32+
${MXM_SOURCE_DIR}/DMA
33+
${MXM_SOURCE_DIR}/LP
34+
${MXM_SOURCE_DIR}/FLC
35+
${MXM_SOURCE_DIR}/GPIO
36+
${MXM_SOURCE_DIR}/I2C
37+
${MXM_SOURCE_DIR}/I2S
38+
${MXM_SOURCE_DIR}/ICC
39+
${MXM_SOURCE_DIR}/RTC
40+
${MXM_SOURCE_DIR}/SPI
41+
${MXM_SOURCE_DIR}/SYS
42+
${MXM_SOURCE_DIR}/TMR
43+
${MXM_SOURCE_DIR}/TRNG
44+
${MXM_SOURCE_DIR}/UART
45+
${MXM_SOURCE_DIR}/WDT
46+
)
47+
48+
target_sources(mbed-max32670
49+
INTERFACE
50+
PeripheralPins.c
51+
gpio_api.c
52+
gpio_irq_api.c
53+
i2c_api.c
54+
pinmap.c
55+
port_api.c
56+
rtc_api.c
57+
serial_api.c
58+
sleep.c
59+
spi_api.c
60+
us_ticker.c
61+
lp_ticker.c
62+
flash_api.c
63+
watchdog_api.c
64+
65+
${MXM_CMSIS_DIR}/${MXM_PARTNUMBER}/Source/system_max32670.c
66+
67+
${MXM_SOURCE_DIR}/AES/aes_me15.c
68+
${MXM_SOURCE_DIR}/AES/aes_revb.c
69+
70+
${MXM_SOURCE_DIR}/CRC/crc_me15.c
71+
${MXM_SOURCE_DIR}/CRC/crc_reva.c
72+
73+
${MXM_SOURCE_DIR}/SYS/mxc_assert.c
74+
${MXM_SOURCE_DIR}/SYS/mxc_delay.c
75+
${MXM_SOURCE_DIR}/SYS/mxc_lock.c
76+
${MXM_SOURCE_DIR}/SYS/pins_me15.c
77+
${MXM_SOURCE_DIR}/SYS/sys_me15.c
78+
79+
${MXM_SOURCE_DIR}/DMA/dma_me15.c
80+
${MXM_SOURCE_DIR}/DMA/dma_reva.c
81+
82+
${MXM_SOURCE_DIR}/LP/lp_me15.c
83+
84+
${MXM_SOURCE_DIR}/FLC/flc_common.c
85+
${MXM_SOURCE_DIR}/FLC/flc_me15.c
86+
${MXM_SOURCE_DIR}/FLC/flc_reva.c
87+
${MXM_SOURCE_DIR}/FLC/flc_revb.c
88+
89+
${MXM_SOURCE_DIR}/GPIO/gpio_common.c
90+
${MXM_SOURCE_DIR}/GPIO/gpio_me15.c
91+
${MXM_SOURCE_DIR}/GPIO/gpio_reva.c
92+
93+
${MXM_SOURCE_DIR}/I2C/i2c_me15.c
94+
${MXM_SOURCE_DIR}/I2C/i2c_reva.c
95+
96+
${MXM_SOURCE_DIR}/I2S/i2s_me15.c
97+
${MXM_SOURCE_DIR}/I2S/i2s_reva.c
98+
99+
${MXM_SOURCE_DIR}/ICC/icc_common.c
100+
${MXM_SOURCE_DIR}/ICC/icc_me15.c
101+
${MXM_SOURCE_DIR}/ICC/icc_reva.c
102+
103+
${MXM_SOURCE_DIR}/RTC/rtc_me15.c
104+
${MXM_SOURCE_DIR}/RTC/rtc_reva.c
105+
106+
${MXM_SOURCE_DIR}/SPI/spi_me15.c
107+
${MXM_SOURCE_DIR}/SPI/spi_reva.c
108+
109+
${MXM_SOURCE_DIR}/TMR/tmr_common.c
110+
${MXM_SOURCE_DIR}/TMR/tmr_me15.c
111+
${MXM_SOURCE_DIR}/TMR/tmr_revb.c
112+
113+
${MXM_SOURCE_DIR}/TRNG/trng_me15.c
114+
${MXM_SOURCE_DIR}/TRNG/trng_revb.c
115+
116+
${MXM_SOURCE_DIR}/UART/uart_common.c
117+
${MXM_SOURCE_DIR}/UART/uart_me15.c
118+
${MXM_SOURCE_DIR}/UART/uart_revb.c
119+
120+
${MXM_SOURCE_DIR}/WDT/wdt_common.c
121+
${MXM_SOURCE_DIR}/WDT/wdt_me15.c
122+
${MXM_SOURCE_DIR}/WDT/wdt_revb.c
123+
124+
${STARTUP_FILE}
125+
)
126+
127+
target_link_libraries(mbed-max32670
128+
INTERFACE
129+
mbed-maxim
130+
)
131+
132+
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/**
2+
* @file aes_key_regs.h
3+
* @brief Registers, Bit Masks and Bit Positions for the AES_KEY Peripheral Module.
4+
*/
5+
6+
/* ****************************************************************************
7+
* Copyright (C) 2022 Maxim Integrated Products, Inc., All Rights Reserved.
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining a
10+
* copy of this software and associated documentation files (the "Software"),
11+
* to deal in the Software without restriction, including without limitation
12+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
13+
* and/or sell copies of the Software, and to permit persons to whom the
14+
* Software is furnished to do so, subject to the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included
17+
* in all copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22+
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23+
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25+
* OTHER DEALINGS IN THE SOFTWARE.
26+
*
27+
* Except as contained in this notice, the name of Maxim Integrated
28+
* Products, Inc. shall not be used except as stated in the Maxim Integrated
29+
* Products, Inc. Branding Policy.
30+
*
31+
* The mere transfer of this software does not imply any licenses
32+
* of trade secrets, proprietary technology, copyrights, patents,
33+
* trademarks, maskwork rights, or any other form of intellectual
34+
* property whatsoever. Maxim Integrated Products, Inc. retains all
35+
* ownership rights.
36+
*
37+
*
38+
*************************************************************************** */
39+
40+
#ifndef _AES_KEY_REGS_H_
41+
#define _AES_KEY_REGS_H_
42+
43+
/* **** Includes **** */
44+
#include <stdint.h>
45+
46+
#ifdef __cplusplus
47+
extern "C" {
48+
#endif
49+
50+
#if defined (__ICCARM__)
51+
#pragma system_include
52+
#endif
53+
54+
#if defined (__CC_ARM)
55+
#pragma anon_unions
56+
#endif
57+
/// @cond
58+
/*
59+
If types are not defined elsewhere (CMSIS) define them here
60+
*/
61+
#ifndef __IO
62+
#define __IO volatile
63+
#endif
64+
#ifndef __I
65+
#define __I volatile const
66+
#endif
67+
#ifndef __O
68+
#define __O volatile
69+
#endif
70+
/// @endcond
71+
72+
/* **** Definitions **** */
73+
74+
/**
75+
* @ingroup aes_key
76+
* @defgroup aes_key_registers AES_KEY_Registers
77+
* @brief Registers, Bit Masks and Bit Positions for the AES_KEY Peripheral Module.
78+
* @details AES Key Registers.
79+
*/
80+
81+
/**
82+
* @ingroup aes_key_registers
83+
* Structure type to access the AES_KEY Registers.
84+
*/
85+
typedef struct {
86+
__IO uint32_t aes_key0; /**< <tt>\b 0x00:</tt> AES_KEY AES_KEY0 Register */
87+
__IO uint32_t aes_key1; /**< <tt>\b 0x04:</tt> AES_KEY AES_KEY1 Register */
88+
__IO uint32_t aes_key2; /**< <tt>\b 0x08:</tt> AES_KEY AES_KEY2 Register */
89+
__IO uint32_t aes_key3; /**< <tt>\b 0x0C:</tt> AES_KEY AES_KEY3 Register */
90+
__IO uint32_t aes_key4; /**< <tt>\b 0x10:</tt> AES_KEY AES_KEY4 Register */
91+
__IO uint32_t aes_key5; /**< <tt>\b 0x14:</tt> AES_KEY AES_KEY5 Register */
92+
__IO uint32_t aes_key6; /**< <tt>\b 0x18:</tt> AES_KEY AES_KEY6 Register */
93+
__IO uint32_t aes_key7; /**< <tt>\b 0x1C:</tt> AES_KEY AES_KEY7 Register */
94+
} mxc_aes_key_regs_t;
95+
96+
/* Register offsets for module AES_KEY */
97+
/**
98+
* @ingroup aes_key_registers
99+
* @defgroup AES_KEY_Register_Offsets Register Offsets
100+
* @brief AES_KEY Peripheral Register Offsets from the AES_KEY Base Peripheral Address.
101+
* @{
102+
*/
103+
#define MXC_R_AES_KEY_AES_KEY0 ((uint32_t)0x00000000UL) /**< Offset from AES_KEY Base Address: <tt> 0x0000</tt> */
104+
#define MXC_R_AES_KEY_AES_KEY1 ((uint32_t)0x00000004UL) /**< Offset from AES_KEY Base Address: <tt> 0x0004</tt> */
105+
#define MXC_R_AES_KEY_AES_KEY2 ((uint32_t)0x00000008UL) /**< Offset from AES_KEY Base Address: <tt> 0x0008</tt> */
106+
#define MXC_R_AES_KEY_AES_KEY3 ((uint32_t)0x0000000CUL) /**< Offset from AES_KEY Base Address: <tt> 0x000C</tt> */
107+
#define MXC_R_AES_KEY_AES_KEY4 ((uint32_t)0x00000010UL) /**< Offset from AES_KEY Base Address: <tt> 0x0010</tt> */
108+
#define MXC_R_AES_KEY_AES_KEY5 ((uint32_t)0x00000014UL) /**< Offset from AES_KEY Base Address: <tt> 0x0014</tt> */
109+
#define MXC_R_AES_KEY_AES_KEY6 ((uint32_t)0x00000018UL) /**< Offset from AES_KEY Base Address: <tt> 0x0018</tt> */
110+
#define MXC_R_AES_KEY_AES_KEY7 ((uint32_t)0x0000001CUL) /**< Offset from AES_KEY Base Address: <tt> 0x001C</tt> */
111+
/**@} end of group aes_key_registers */
112+
113+
#ifdef __cplusplus
114+
}
115+
#endif
116+
117+
#endif /* _AES_KEY_REGS_H_ */

0 commit comments

Comments
 (0)