Skip to content

Commit 462aad2

Browse files
committed
Replace 'mcu/apollo3' by 2.2.0 version
1 parent eeeeb7c commit 462aad2

File tree

115 files changed

+10903
-1631
lines changed

Some content is hidden

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

115 files changed

+10903
-1631
lines changed

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

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

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4545
// POSSIBILITY OF SUCH DAMAGE.
4646
//
47-
// This is part of revision 2.1.0 of the AmbiqSuite Development Package.
47+
// This is part of revision v2.2.0-7-g63f7c2ba1 of the AmbiqSuite Development Package.
4848
//
4949
//*****************************************************************************
5050

@@ -70,7 +70,7 @@ am_hal_ble_state_t g_sBLEState[AM_REG_BLEIF_NUM_MODULES];
7070
#define BLEIF_INTSTAT_BLECSSTATN_Msk BLEIF_INTSTAT_B2MSHUTDN_Msk
7171
#define BLEIF_INTSTAT_BLECIRQN_Msk BLEIF_INTSTAT_B2MACTIVE_Msk
7272

73-
#define SKIP_FALLING_EDGES 1
73+
#define SKIP_FALLING_EDGES 0
7474

7575
//*****************************************************************************
7676
//
@@ -697,55 +697,34 @@ am_hal_ble_boot(void *pHandle)
697697
{
698698
// The B0 silicon patching method is slightly different from A1. B0 silicon
699699
// does not require the Copy Patch method introduced for A1 silicon.
700-
if (APOLLO3_B0)
701-
{
702-
//apply the BLE trim value
703-
ui32Status = am_hal_ble_default_trim_set_ramcode(pHandle);
704-
if (ui32Status != AM_HAL_STATUS_SUCCESS)
705-
{
706-
return ui32Status;
707-
}
708-
709-
// Apply the NVDS patch.
710-
ui32Status = am_hal_ble_default_patch_apply(pHandle);
711-
if (ui32Status != AM_HAL_STATUS_SUCCESS)
712-
{
713-
return ui32Status;
714-
}
715-
716-
// Complete the patching step
717-
ui32Status = am_hal_ble_patch_complete(pHandle);
718-
if (ui32Status != AM_HAL_STATUS_SUCCESS)
719-
{
720-
return ui32Status;
721-
}
722-
723-
}
724-
else if (APOLLO3_A0 || APOLLO3_A1)
700+
if (APOLLO3_A0 || APOLLO3_A1)
725701
{
726702
ui32Status = am_hal_ble_default_copy_patch_apply(pHandle);
727703
if (ui32Status != AM_HAL_STATUS_SUCCESS)
728704
{
729705
return ui32Status;
730706
}
707+
}
731708

732-
ui32Status = am_hal_ble_default_trim_set_ramcode(pHandle);
733-
if (ui32Status != AM_HAL_STATUS_SUCCESS)
734-
{
735-
return ui32Status;
736-
}
709+
//apply the BLE trim value
710+
ui32Status = am_hal_ble_default_trim_set_ramcode(pHandle);
711+
if (ui32Status != AM_HAL_STATUS_SUCCESS)
712+
{
713+
return ui32Status;
714+
}
737715

738-
ui32Status = am_hal_ble_default_patch_apply(pHandle);
739-
if (ui32Status != AM_HAL_STATUS_SUCCESS)
740-
{
741-
return ui32Status;
742-
}
716+
// Apply the NVDS patch.
717+
ui32Status = am_hal_ble_default_patch_apply(pHandle);
718+
if (ui32Status != AM_HAL_STATUS_SUCCESS)
719+
{
720+
return ui32Status;
721+
}
743722

744-
ui32Status = am_hal_ble_patch_complete(pHandle);
745-
if (ui32Status != AM_HAL_STATUS_SUCCESS)
746-
{
747-
return ui32Status;
748-
}
723+
// Complete the patching step
724+
ui32Status = am_hal_ble_patch_complete(pHandle);
725+
if (ui32Status != AM_HAL_STATUS_SUCCESS)
726+
{
727+
return ui32Status;
749728
}
750729
}
751730

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

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

@@ -723,15 +723,6 @@ extern uint32_t am_hal_ble_default_trim_set(void *pHandle);
723723

724724
uint32_t am_hal_ble_default_trim_set_ramcode(void *pHandle);
725725

726-
//*****************************************************************************
727-
//
728-
// Set the 32M crystal frequency
729-
// based on the tested values at customer side.
730-
// set trim value smaller in case of negative frequency offset
731-
//
732-
//*****************************************************************************
733-
extern uint32_t am_hal_ble_crystal_trim_set(void *pHandle, uint32_t ui32TrimValue);
734-
735726
//*****************************************************************************
736727
//
737728
//! @brief Change the TX power setting.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4545
// POSSIBILITY OF SUCH DAMAGE.
4646
//
47-
// This is part of revision 2.1.0 of the AmbiqSuite Development Package.
47+
// This is part of revision v2.2.0-7-g63f7c2ba1 of the AmbiqSuite Development Package.
4848
//
4949
//*****************************************************************************
5050

@@ -335,7 +335,7 @@ am_hal_ble_buffer(0x0104) am_ble_performance_patch_data =
335335
{
336336
.bytes =
337337
{
338-
0x00,0x11,0x02,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0xc5,0x01,
338+
0x00,0x11,0x02,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0xc5,0x01,
339339
0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
340340
0x00,0x00,0x00,0x00,0x1b,0x00,0xa1,0x06,0x1f,0xb5,0x82,0xb0,0x08,0x98,0x00,0x90,
341341
0x02,0xa8,0x0f,0xc8,0x01,0x4c,0xa0,0x47,0x06,0xb0,0x10,0xbd,0x01,0x35,0x00,0x20,
@@ -668,7 +668,7 @@ am_hal_ble_buffer(0x00be) am_ble_buffer_nvds_data =
668668
0x15,0x06,0x01,0x08, //BLE major version
669669
0x16,0x06,0x01,0x03, //BLE minor version
670670
0x17,0x06,0x01,0x29, //BLE SW version build
671-
0x18,0x06,0x02,0x4c,0x04, //advertising interval (undirect)
671+
0x18,0x06,0x02,0xdc,0x05, //advertising interval (undirect)
672672
0x19,0x06,0x02,0xe2,0x04, //advertising interval (direct)
673673
0x20,0x06,0x01,0x01, //agc switch
674674
0x21,0x06,0x01,0x02, //EA programming latency

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

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

0 commit comments

Comments
 (0)