Skip to content

Commit ebc9b96

Browse files
committed
Merge branch 'master' into PDM
2 parents f42a8cc + c2b855b commit ebc9b96

File tree

141 files changed

+37910
-3037
lines changed

Some content is hidden

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

141 files changed

+37910
-3037
lines changed

bootloaders/artemis/!artemis_svl/src/main.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,33 @@ void setup( void ){
296296
}
297297

298298

299+
// //*****************************************************************************
300+
// //
301+
// // Un-set-up
302+
// //
303+
// //*****************************************************************************
304+
// void unsetup( void ){
305+
// // Set the clock frequency.
306+
// am_hal_clkgen_control(AM_HAL_CLKGEN_CONTROL_SYSCLK_MAX, 0);
307+
308+
// // Set the default cache configuration
309+
// am_hal_cachectrl_config(&am_hal_cachectrl_defaults);
310+
// am_hal_cachectrl_enable();
311+
312+
// // Configure the stimer
313+
// am_hal_stimer_int_enable(AM_HAL_STIMER_INT_OVERFLOW);
314+
// NVIC_EnableIRQ(STIMER_IRQn);
315+
// am_hal_stimer_config(AM_HAL_STIMER_CFG_CLEAR | AM_HAL_STIMER_CFG_FREEZE);
316+
// am_hal_stimer_config(AM_HAL_STIMER_HFRC_3MHZ);
317+
318+
// #ifdef DEBUG
319+
// start_uart_debug();
320+
// #endif
321+
322+
// // Enable interrupts.
323+
// am_hal_interrupt_master_enable();
324+
// }
325+
299326

300327
// ****************************************
301328
//
@@ -595,6 +622,8 @@ void app_start( void ){
595622
// #endif // DEBUG_PRINT_APP
596623
// #endif // DEBUG
597624

625+
// unsetup(); // todo:
626+
598627
void* entryPoint = (void *)(*((uint32_t*)(USERCODE_OFFSET + 4)));
599628
debug_printf("\nJump to App at 0x%08X\n\n", (uint32_t)entryPoint);
600629
am_util_delay_ms(10); // Wait for prints to complete

cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include/apollo3.h

Lines changed: 280 additions & 16 deletions
Large diffs are not rendered by default.

cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Include/apollo3c.h

Lines changed: 26576 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
//*****************************************************************************
2+
//
3+
//! @file system_apollo3c.h
4+
//!
5+
//! @brief Ambiq Micro Apollo3C MCU specific functions.
6+
//
7+
//*****************************************************************************
8+
9+
//*****************************************************************************
10+
//
11+
// Copyright (c) 2019, Ambiq Micro
12+
// All rights reserved.
13+
//
14+
// Redistribution and use in source and binary forms, with or without
15+
// modification, are permitted provided that the following conditions are met:
16+
//
17+
// 1. Redistributions of source code must retain the above copyright notice,
18+
// this list of conditions and the following disclaimer.
19+
//
20+
// 2. Redistributions in binary form must reproduce the above copyright
21+
// notice, this list of conditions and the following disclaimer in the
22+
// documentation and/or other materials provided with the distribution.
23+
//
24+
// 3. Neither the name of the copyright holder nor the names of its
25+
// contributors may be used to endorse or promote products derived from this
26+
// software without specific prior written permission.
27+
//
28+
// Third party software included in this distribution is subject to the
29+
// additional license terms as defined in the /docs/licenses directory.
30+
//
31+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
35+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41+
// POSSIBILITY OF SUCH DAMAGE.
42+
//
43+
//*****************************************************************************
44+
45+
#ifndef SYSTEM_APOLLO3C_H
46+
#define SYSTEM_APOLLO3C_H
47+
48+
#ifdef __cplusplus
49+
extern "C" {
50+
#endif
51+
52+
#include <stdint.h>
53+
54+
extern uint32_t SystemCoreClock; // System Clock Frequency (Core Clock)
55+
56+
//*****************************************************************************
57+
//
58+
// External function definitions
59+
//
60+
//*****************************************************************************
61+
extern void SystemInit (void);
62+
extern void SystemCoreClockUpdate (void);
63+
64+
#ifdef __cplusplus
65+
}
66+
#endif
67+
68+
#endif // SYSTEM_APOLLO3C_H
69+

cores/arduino/am_sdk_ap3/CMSIS/AmbiqMicro/Source/startup_apollo3.s

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@
4040
; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4141
; POSSIBILITY OF SUCH DAMAGE.
4242
;
43-
; This is part of revision 2.1.0 of the AmbiqSuite Development Package.
43+
; This is part of revision v2.2.0-7-g63f7c2ba1 of the AmbiqSuite Development Package.
4444
;
4545
;******************************************************************************
4646

4747
;******************************************************************************
4848
;
4949
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
5050
;************************************************************************
51-
Stack EQU 0x00000400
51+
Stack EQU 0x00001000
5252

5353
;******************************************************************************
5454
;
@@ -146,7 +146,7 @@ __Vectors
146146
DCD am_scard_isr ; 17: SCARD
147147
DCD am_adc_isr ; 18: ADC
148148
DCD am_pdm0_isr ; 19: PDM
149-
DCD am_mspi0_isr ; 20: MSPI
149+
DCD am_mspi0_isr ; 20: MSPI0
150150
DCD am_software0_isr ; 21: SOFTWARE0
151151
DCD am_stimer_isr ; 22: SYSTEM TIMER
152152
DCD am_stimer_cmpr0_isr ; 23: SYSTEM TIMER COMPARE0
@@ -172,25 +172,28 @@ __Vectors_Size EQU __Vectors_End - __Vectors
172172
;
173173
; The Patch table.
174174
;
175+
; The patch table should pad the vector table size to a total of 64 entries
176+
; (16 core + 48 periph) such that code begins at offset 0x100.
177+
;
175178
;******************************************************************************
176179
EXPORT __Patchable
177180
__Patchable
178-
DCD 0
179-
DCD 0
180-
DCD 0
181-
DCD 0
182-
DCD 0
183-
DCD 0
184-
DCD 0
185-
DCD 0
186-
DCD 0
187-
DCD 0
188-
DCD 0
189-
DCD 0
190-
DCD 0
191-
DCD 0
192-
DCD 0
193-
DCD 0
181+
DCD 0 ; 32
182+
DCD 0 ; 33
183+
DCD 0 ; 34
184+
DCD 0 ; 35
185+
DCD 0 ; 36
186+
DCD 0 ; 37
187+
DCD 0 ; 38
188+
DCD 0 ; 39
189+
DCD 0 ; 40
190+
DCD 0 ; 41
191+
DCD 0 ; 42
192+
DCD 0 ; 43
193+
DCD 0 ; 44
194+
DCD 0 ; 45
195+
DCD 0 ; 46
196+
DCD 0 ; 47
194197

195198
;******************************************************************************
196199
;
@@ -402,3 +405,4 @@ __user_initial_stackheap PROC
402405
;******************************************************************************
403406
END
404407

408+

cores/arduino/am_sdk_ap3/mcu/apollo3/am_mcu_apollo.h

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4949
// POSSIBILITY OF SUCH DAMAGE.
5050
//
51-
// This is part of revision 2.1.0 of the AmbiqSuite Development Package.
51+
// This is part of revision v2.2.0-7-g63f7c2ba1 of the AmbiqSuite Development Package.
5252
//
5353
//*****************************************************************************
5454
#ifndef AM_MCU_APOLLO_H
@@ -106,31 +106,9 @@
106106

107107
#include "regs/am_reg_macros.h"
108108

109-
#include "regs/am_reg_adc.h"
110-
#include "regs/am_reg_apbdma.h"
111-
#include "regs/am_reg_bleif.h"
112-
#include "regs/am_reg_cachectrl.h"
113-
#include "regs/am_reg_clkgen.h"
114-
#include "regs/am_reg_ctimer.h"
115-
#include "regs/am_reg_gpio.h"
116-
#include "regs/am_reg_iom.h"
117-
#include "regs/am_reg_ioslave.h"
118-
#include "regs/am_reg_itm.h"
109+
#include "regs/am_reg.h"
110+
#include "regs/am_reg_m4.h"
119111
#include "regs/am_reg_jedec.h"
120-
#include "regs/am_reg_mcuctrl.h"
121-
#include "regs/am_reg_mspi.h"
122-
#include "regs/am_reg_nvic.h"
123-
#include "regs/am_reg_pdm.h"
124-
#include "regs/am_reg_pwrctrl.h"
125-
#include "regs/am_reg_rstgen.h"
126-
#include "regs/am_reg_rtc.h"
127-
#include "regs/am_reg_security.h"
128-
#include "regs/am_reg_sysctrl.h"
129-
#include "regs/am_reg_systick.h"
130-
#include "regs/am_reg_tpiu.h"
131-
#include "regs/am_reg_uart.h"
132-
#include "regs/am_reg_vcomp.h"
133-
#include "regs/am_reg_wdt.h"
134112

135113
//*****************************************************************************
136114
//
@@ -164,6 +142,7 @@
164142
#include "hal/am_hal_queue.h"
165143
#include "hal/am_hal_reset.h"
166144
#include "hal/am_hal_rtc.h"
145+
#include "hal/am_hal_scard.h"
167146
#include "hal/am_hal_secure_ota.h"
168147
#include "hal/am_hal_stimer.h"
169148
#include "hal/am_hal_security.h"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#******************************************************************************
2+
#
3+
# Makefile - Rules for compiling
4+
#
5+
# Copyright (c) 2019, Ambiq Micro
6+
# All rights reserved.
7+
#
8+
# Redistribution and use in source and binary forms, with or without
9+
# modification, are permitted provided that the following conditions are met:
10+
#
11+
# 1. Redistributions of source code must retain the above copyright notice,
12+
# this list of conditions and the following disclaimer.
13+
#
14+
# 2. Redistributions in binary form must reproduce the above copyright
15+
# notice, this list of conditions and the following disclaimer in the
16+
# documentation and/or other materials provided with the distribution.
17+
#
18+
# 3. Neither the name of the copyright holder nor the names of its
19+
# contributors may be used to endorse or promote products derived from this
20+
# software without specific prior written permission.
21+
#
22+
# Third party software included in this distribution is subject to the
23+
# additional license terms as defined in the /docs/licenses directory.
24+
#
25+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35+
# POSSIBILITY OF SUCH DAMAGE.
36+
#
37+
# This is part of revision v2.2.0-7-g63f7c2ba1 of the AmbiqSuite Development Package.
38+
#
39+
#******************************************************************************
40+
41+
# All makefiles use this to find the top level directory.
42+
SWROOT?=../../..
43+
44+
# Include rules for building the HAL.
45+
include $(SWROOT)/makedefs/am_hal.mk
46+
47+
# Generate pin definitions for apollo3.
48+
CHIP_GENERATION = 3

cores/arduino/am_sdk_ap3/mcu/apollo3/hal/am_hal_adc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4646
// POSSIBILITY OF SUCH DAMAGE.
4747
//
48-
// This is part of revision 2.1.0 of the AmbiqSuite Development Package.
48+
// This is part of revision v2.2.0-7-g63f7c2ba1 of the AmbiqSuite Development Package.
4949
//
5050
//*****************************************************************************
5151

cores/arduino/am_sdk_ap3/mcu/apollo3/hal/am_hal_adc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4646
// POSSIBILITY OF SUCH DAMAGE.
4747
//
48-
// This is part of revision 2.1.0 of the AmbiqSuite Development Package.
48+
// This is part of revision v2.2.0-7-g63f7c2ba1 of the AmbiqSuite Development Package.
4949
//
5050
//*****************************************************************************
5151
#ifndef AM_HAL_ADC_H

0 commit comments

Comments
 (0)