Skip to content

Commit 0d6ed2f

Browse files
ozersamathias-arm
authored andcommitted
Add MAX32690EVKIT
Signed-off-by: Sadik Ozer <[email protected]>
1 parent a668f79 commit 0d6ed2f

File tree

6 files changed

+186
-0
lines changed

6 files changed

+186
-0
lines changed

projects.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ projects:
550550
- *module_if
551551
- *module_hic_max32625
552552
- records/board/max32650fthr.yaml
553+
max32625_max32690evkit_if:
554+
- *module_if
555+
- *module_hic_max32625
556+
- records/board/max32690evkit.yaml
553557
nrf52820_microbit_bl:
554558
- *module_bl
555559
- records/hic_hal/nrf52820.yaml

records/board/max32690evkit.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
common:
2+
sources:
3+
board:
4+
- source/board/max32690evkit.c
5+
family:
6+
- source/family/maxim/max32690/target.c
7+
- source/family/maxim/target_reset_max32xxx.c

source/board/max32690evkit.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/**
2+
* @file max32690evkit.c
3+
* @brief board ID for the Analog Devices Inc.'s MAX32690EVKIT
4+
*
5+
* DAPLink Interface Firmware
6+
* Copyright (c) 2023, Analog Devices, Inc.
7+
* SPDX-License-Identifier: Apache-2.0
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
10+
* not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
22+
#include "target_family.h"
23+
#include "target_board.h"
24+
25+
const board_info_t g_board_info = {
26+
.info_version = kBoardInfoVersion,
27+
.board_id = "0426",
28+
.family_id = kMaxim_MAX3266X_FamilyID,
29+
.flags = kEnablePageErase,
30+
.target_cfg = &target_device,
31+
.daplink_url_name = "MAX32690HTM",
32+
.daplink_target_url = "http://www.analog.com/max32690evkit",
33+
.board_vendor = "Maxim",
34+
.board_name = "MAX32690 EvKit",
35+
};
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/**
2+
* @file flash_blob.c
3+
* @brief Flash algorithm for the MAX32690
4+
*
5+
* DAPLink Interface Firmware
6+
* Copyright (c) 2023 Analog Devices, Inc.
7+
* SPDX-License-Identifier: Apache-2.0
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
10+
* not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
22+
#include "flash_blob.h"
23+
24+
#define CLOCK_DIV 0x00000078
25+
#define BURST_SIZE 0x00000080
26+
27+
#define FLC0_BASE 0x40029000
28+
#define FLASH0_BASE 0x10000000 //
29+
#define FLASH0_SIZE 0x00300000 // 3MB
30+
#define FLASH0_SECTOR KB(16)
31+
32+
#define FLC1_BASE 0x40029400 // second flash controller
33+
#define FLASH1_BASE 0x10300000 // second block of flash
34+
#define FLASH1_SIZE 0x00040000 // 256KB
35+
#define FLASH1_SECTOR KB(8)
36+
37+
38+
static const uint32_t maxim_flash_prog_blob[] = {
39+
0xE00ABE00,
40+
0x444949a6, 0x68826808, 0x0f07f012, 0x68cad10b, 0x69486042, 0x6948b148, 0xf0126882, 0xbf040f07,
41+
0x604168c9, 0x2001d001, 0x20004770, 0x499b4770, 0x68084449, 0xf0226882, 0x60824270, 0xb1206948,
42+
0x68816948, 0x4170f021, 0x20006081, 0xb5104770, 0x444c4c92, 0xf0006820, 0xb928f8f4, 0xb1286960,
43+
0xf0006960, 0xb108f8ee, 0xbd102001, 0xbd102000, 0x4449498a, 0xb132698a, 0x4282698a, 0x688ad803,
44+
0x1a806949, 0x6809e000, 0xf012688a, 0xd1270f07, 0xb13a6a4a, 0x624a2200, 0xb11a6a4a, 0x624a2202,
45+
0xb9ea6a4a, 0xf022688a, 0xf0424270, 0x608a5200, 0xf422688a, 0xf442427f, 0x608a42aa, 0x68886008,
46+
0x0004f040, 0x68886088, 0x0f04f010, 0x6888d1fb, 0x4070f020, 0x6a486088, 0x0002f010, 0x4770bf08,
47+
0x47702001, 0x4c6db430, 0x69a3444c, 0x69a3b133, 0xd8034283, 0x1ac068a3, 0xe0006963, 0xf0126823,
48+
0xbf040f03, 0xc008f8d3, 0x0f07f01c, 0xf8d3d17d, 0xf1bcc024, 0xd0110f00, 0x0c00f04f, 0xc024f8c3,
49+
0xc024f8d3, 0x0f00f1bc, 0xf04fd008, 0xf8c30c02, 0xf8d3c024, 0xf1bcc024, 0xd17f0f00, 0xc008f8d3,
50+
0x4c70f02c, 0x5c00f04c, 0xc008f8c3, 0x6018e011, 0xcb04f852, 0xc030f8c3, 0xc008f8d3, 0x0c01f04c,
51+
0xc008f8c3, 0xc008f8d3, 0x0f01f01c, 0x1d00d1fa, 0x29041f09, 0xf010d302, 0xd1e80f1f, 0xc010f8d4,
52+
0x0f80f1bc, 0x2910d121, 0x6018d31f, 0xcb04f852, 0xc030f8c3, 0xcb04f852, 0xc034f8c3, 0xcb04f852,
53+
0xc038f8c3, 0xcb04f852, 0xc03cf8c3, 0xc008f8d3, 0x0c01f04c, 0xc008f8c3, 0xc008f8d3, 0x0f01f01c,
54+
0x3010d1fa, 0x29103910, 0x2904d2df, 0x6018d313, 0xcb04f852, 0xc030f8c3, 0xc008f8d3, 0x0c01f04c,
55+
0xc008f8c3, 0xc008f8d3, 0x0f01f01c, 0x1d00d1fa, 0x29041f09, 0xb1b9d2eb, 0xf04f6812, 0xf04f34ff,
56+
0xea620cff, 0x402c050c, 0xe017e000, 0x2c0cea4f, 0xd1f61e49, 0x631c6018, 0xf0406898, 0x60980001,
57+
0xf0106898, 0xd1fb0f01, 0xf0206898, 0x60984070, 0xf0106a58, 0xbf040002, 0x4770bc30, 0xbc302001,
58+
0x68814770, 0x0f07f011, 0x6a41d126, 0x2100b139, 0x6a416241, 0x2102b119, 0x6a416241, 0x6881b9e1,
59+
0x4170f021, 0x5100f041, 0x68816081, 0x417ff421, 0x412af441, 0x68816081, 0x0102f041, 0x68816081,
60+
0x0f02f011, 0x6881d1fb, 0x4170f021, 0x6a406081, 0x0002f010, 0x4770bf08, 0x47702001, 0x00000004,
61+
0x00000000,
62+
FLC0_BASE, FLASH0_BASE,FLASH0_SIZE,CLOCK_DIV, BURST_SIZE, FLC1_BASE, FLASH1_BASE,FLASH1_SIZE
63+
};
64+
65+
/**
66+
* List of start and size for each size of flash sector - even indexes are start, odd are size
67+
* The size will apply to all sectors between the listed address and the next address
68+
* in the list.
69+
* The last pair in the list will have sectors starting at that address and ending
70+
* at address flash_start + flash_size.
71+
*/
72+
static const sector_info_t sectors_info[] = {
73+
{FLASH0_BASE, FLASH0_SECTOR},
74+
{FLASH1_BASE, FLASH1_SECTOR},
75+
};
76+
77+
static const program_target_t flash = {
78+
0x20000005, // Init
79+
0x20000033, // UnInit
80+
0x20000053, // EraseChip
81+
0x20000075, // EraseSector
82+
0x200000e9, // ProgramPage
83+
0x0, // Verify
84+
85+
// BKPT : start of blob + 1
86+
// RSB : blob start + header + rw data offset
87+
// RSP : stack pointer
88+
{
89+
0x20000001,
90+
0x200002a4,
91+
0x20000500
92+
},
93+
94+
0x20000000 + 0x00000A00, // mem buffer location
95+
0x20000000, // location to write prog_blob in target RAM
96+
sizeof(maxim_flash_prog_blob), // prog_blob size
97+
maxim_flash_prog_blob, // address of prog_blob
98+
0x00004000 // ram_to_flash_bytes_to_be_written
99+
};
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* @file target.c
3+
* @brief Target information for the MAX32690
4+
*
5+
* DAPLink Interface Firmware
6+
* Copyright (c) 2023 Analog Devices, Inc.
7+
* SPDX-License-Identifier: Apache-2.0
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
10+
* not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
22+
#include "target_config.h"
23+
24+
#include "flash_blob.c"
25+
26+
/* MAX32690 3MiB+256KB Flash, 1MiB RAM */
27+
target_cfg_t target_device = {
28+
.sectors_info = sectors_info,
29+
.sector_info_length = (sizeof(sectors_info))/(sizeof(sector_info_t)),
30+
.flash_regions[0].start = 0x10000000,
31+
.flash_regions[0].end = 0x10000000 + MB(3) + KB(256),
32+
.flash_regions[0].flags = kRegionIsDefault,
33+
.flash_regions[0].flash_algo = (program_target_t *) &flash,
34+
.ram_regions[0].start = 0x20000000,
35+
.ram_regions[0].end = 0x20000000 + MB(1),
36+
.target_vendor = "Maxim",
37+
.target_part_number = "MAX32690",
38+
};

test/info.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
('max32625_max78000fthr_if', False, 0x0000, "bin" ),
102102
('max32625_max32670evkit_if', False, 0x0000, "bin" ),
103103
('max32625_max32650fthr_if', False, 0x0000, "bin" ),
104+
('max32625_max32690evkit_if', False, 0x0000, "bin" ),
104105
('kl26z_if', False, 0x0000, "bin" ),
105106
('k20dx_if', False, 0x0000, "bin" ),
106107
('k26f_if', False, 0x0000, "bin" ),
@@ -182,6 +183,7 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y
182183
( 0x0423, VENDOR_TO_FAMILY('Stub', 1), 'max32625_max78000fthr_if', 'max32625_bl', 'MAX78000' ),
183184
( 0x0424, VENDOR_TO_FAMILY('Stub', 1), 'max32625_max32670evkit_if', 'max32625_bl', 'MAX32670' ),
184185
( 0x0425, VENDOR_TO_FAMILY('Stub', 1), 'max32625_max32650fthr_if', 'max32625_bl', 'MAX32650' ),
186+
( 0x0426, VENDOR_TO_FAMILY('Stub', 1), 'max32625_max32690evkit_if', 'max32625_bl', 'MAX32690' ),
185187
( 0x0700, VENDOR_TO_FAMILY('Stub', 1), 'stm32f103xb_stm32f103rb_if', 'stm32f103xb_bl', 'ST-Nucleo-F103RB' ),
186188
( 0x0720, VENDOR_TO_FAMILY('Stub', 1), 'stm32f103xb_stm32f401re_if', 'stm32f103xb_bl', 'ST-Nucleo-F401RE' ),
187189
( 0x0720, VENDOR_TO_FAMILY('Stub', 1), 'stm32f103xb_stm32f072rb_if', 'stm32f103xb_bl', 'ST-Nucleo-F072RB' ),
@@ -315,6 +317,7 @@ def VENDOR_TO_FAMILY(x, y) : return (VENDOR_ID[x] <<8) | y
315317
0x0423, # MAX78000FTHR
316318
0x0424, # MAX32670EVKIT
317319
0x0425, # MAX32650FTHR
320+
0x0426, # MAX32690EVKIT
318321
0x0460, # WISE-1570
319322
0x1101, # Nordic-nRF52-DK
320323
0x1102, # Nordic-nRF52840-DK

0 commit comments

Comments
 (0)