Qorvo pac55xx: initial support

Qorvo (Nee Active Semi) PAC55xx "Intelligent Motor Control" parts,
cortex-m4 SoCs
This commit is contained in:
Brian Viele 2019-11-26 14:18:37 -05:00 committed by Karl Palsson
parent bcfdcc09ac
commit dd18b9fdbc
12 changed files with 135 additions and 2 deletions

1
.gitignore vendored
View File

@ -36,6 +36,7 @@ include/libopencmsis/lpc13xx/
include/libopencmsis/lpc17xx/
include/libopencmsis/lpc43xx/
include/libopencmsis/msp432/
include/libopencmsis/pac55xx/
include/libopencmsis/sam/
include/libopencmsis/stm32/
include/libopencmsis/swm050/

View File

@ -37,7 +37,8 @@ TARGETS ?= stm32/f0 stm32/f1 stm32/f2 stm32/f3 stm32/f4 stm32/f7 \
sam/3a sam/3n sam/3s sam/3u sam/3x sam/4l \
sam/d \
vf6xx \
swm050
swm050 \
pac55xx
# Be silent per default, but 'make V=1' will show all compiler calls.
ifneq ($(V),1)

View File

@ -16,6 +16,7 @@ Currently (at least partly) supported microcontrollers:
- TI (Tiva) LM4F series (continuing as TM4F, pin and peripheral compatible)
- EFM32 Gecko series (only core support)
- Freescale Vybrid VF6xx
- Qorvo (formerly ActiveSemi) PAC55XX
The library is written completely from scratch based on the vendor datasheets,
programming manuals, and application notes. The code is meant to be used

View File

@ -15,7 +15,9 @@ TARGETS ?= stm32/f0 stm32/f1 stm32/f2 stm32/f3 stm32/f4 stm32/f7 \
lpc13xx lpc17xx lpc43xx \
sam/3a sam/3n sam/3s sam/3u sam/3x \
vf6xx \
swm050
swm050 \
pac55xx
TARGETS_DIRS = $(subst /,,$(TARGETS))

1
doc/pac55xx/doxy.custom Normal file
View File

@ -0,0 +1 @@
PREDEFINED += __ARM_ARCH_7EM__

View File

@ -78,6 +78,9 @@
#elif defined(SWM050)
# include <libopencm3/swm050/nvic.h>
#elif defined(PAC55XX)
# include <libopencm3/pac55xx/nvic.h>
#else
# warning"no interrupts defined for chipset; NVIC_IRQ_COUNT = 0"

View File

@ -0,0 +1,38 @@
{
"irqs": [
"memctl",
"wdt",
"rtc",
"adc0",
"adc1",
"adc2",
"adc3",
"timera",
"timerb",
"timerc",
"timerd",
"timera_qep",
"timerb_qep",
"timerc_qep",
"timerd_qep",
"gpioa",
"gpiob",
"gpioc",
"gpiod",
"gpioe",
"gpiof",
"gpiog",
"i2c",
"usarta",
"usartb",
"usartc",
"usartd",
"can",
"gptimera",
"gptimerb",
"scc"
],
"partname_humanreadable": "PAC55XX Series",
"partname_doxygen": "PAC55XX",
"includeguard": "LIBOPENCM3_PAC55XX_H_"
}

View File

@ -467,6 +467,15 @@ vf610 vf6xx RAM=256K RAM1=256K RAM_OFF=0x1f000000 RAM1_OFF=0x3f040000
swm050* END ROM=8K RAM=1K ROM_OFF=0x00000000 RAM_OFF=0x20000000 CPU=cortex-m0 FPU=soft
################################################################################
# Qorvo PAC55xx Cortex-M4 based chips
pac5523 pac55xx ROM=128K RAM=32K
pac5524 pac55xx ROM=128K RAM=32K
pac5527 pac55xx ROM=128K RAM=32K
pac5532 pac55xx ROM=128K RAM=32K
pac5556 pac55xx ROM=128K RAM=32K
################################################################################
################################################################################
################################################################################
@ -564,3 +573,8 @@ rm46l END ROM_OFF=0x00000000 RAM_OFF=0x08000000 RAM1_OFF=0x08400000
# VF6xx families
vf6xx END CPU=cortex-m4 FPU=hard-fpv4-sp-d16
################################################################################
# PAC55xx families
pac55xx END ROM_OFF=0x00000000 RAM_OFF=0x20000000 CPU=cortex-m4 FPU=hard-fpv4-sp-d16

View File

@ -16,6 +16,8 @@
# include "../efm32/wg/vector_chipset.c"
#elif defined(EZR32WG)
# include "../efm32/ezr32wg/vector_chipset.c"
#elif defined(PAC55XX)
# include "../pac55xx/vector_chipset.c"
#else
static void pre_main(void) {}

View File

@ -64,6 +64,10 @@
#elif defined(VF6XX)
# include "../vf6xx/vector_nvic.c"
#elif defined(PAC55XX)
# include "../pac55xx/vector_nvic.c"
#elif defined(LM3S) || defined(LM4F)
/* Yes, we use the same interrupt table for both LM3S and LM4F */
# include "../lm3s/vector_nvic.c"

41
lib/pac55xx/Makefile Normal file
View File

@ -0,0 +1,41 @@
##
## This file is part of the libopencm3 project.
##
## Copyright (C) 2019 Brian Viele <vielster@allocor.tech>
##
## This library is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This library is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
##
## The PAC55xx by Qorvo (formerly ActiveSemi) is a Cortex-M4F based device
## which is specialized for motor control and PSC applications.
LIBNAME = libopencm3_pac55xx
SRCLIBDIR ?= ..
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
CC = $(PREFIX)gcc
AR = $(PREFIX)ar
TGT_CFLAGS = -Os \
-Wall -Wextra -Wimplicit-function-declaration \
-Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes \
-Wundef -Wshadow \
-I../../include -fno-common \
-mcpu=cortex-m4 -mthumb $(FP_FLAGS) -Wstrict-prototypes \
-ffunction-sections -fdata-sections -MD -DPAC55XX
TGT_CFLAGS += $(DEBUG_FLAGS)
TGT_CFLAGS += $(STANDARD_FLAGS)
ARFLAGS = rcs
VPATH += ../cm3
include ../Makefile.include

View File

@ -0,0 +1,25 @@
/*
* This file is part of the libopencm3 project.
*
* Copyright (C) 2019 Brian Viele <vielster@allocor.tech>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* Standard Cortex-M4F initialization of FPU. */
static void pre_main(void)
{
/* Enable FPU */
SCB_CPACR |= SCB_CPACR_FULL * (SCB_CPACR_CP10 | SCB_CPACR_CP11);
}