From cf245dd5beb43abdcc2676231ade07d4c2380f44 Mon Sep 17 00:00:00 2001 From: edolomb Date: Mon, 12 Feb 2018 16:33:44 +0000 Subject: SAMA5D2-SPI now runs in DDRAM git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11488 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/ATSAMA5D2/SPI/Makefile | 4 +- .../ATSAMA5D2/SPI/debug/SAMA5D2-SPI (DDRAM).launch | 55 ++++ testhal/ATSAMA5D2/SPI/mcuconf.h | 286 ++++++++++----------- 3 files changed, 201 insertions(+), 144 deletions(-) create mode 100644 testhal/ATSAMA5D2/SPI/debug/SAMA5D2-SPI (DDRAM).launch (limited to 'testhal/ATSAMA5D2') diff --git a/testhal/ATSAMA5D2/SPI/Makefile b/testhal/ATSAMA5D2/SPI/Makefile index 75f0754e3..8b67c8404 100644 --- a/testhal/ATSAMA5D2/SPI/Makefile +++ b/testhal/ATSAMA5D2/SPI/Makefile @@ -127,7 +127,9 @@ include $(CHIBIOS)/os/common/ports/ARMCAx-TZ/compilers/GCC/mk/port_generic.mk #include $(CHIBIOS)/test/oslib/oslib_test.mk # Define linker script file here -LDSCRIPT= $(STARTUPLD)/SAMA5D2.ld +#LDSCRIPT= $(STARTUPLD)/SAMA5D2.ld +# Only if SAMA_NO_INIT is TRUE +LDSCRIPT= $(STARTUPLD)/SAMA5D2ddr.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. diff --git a/testhal/ATSAMA5D2/SPI/debug/SAMA5D2-SPI (DDRAM).launch b/testhal/ATSAMA5D2/SPI/debug/SAMA5D2-SPI (DDRAM).launch new file mode 100644 index 000000000..eb4d5e361 --- /dev/null +++ b/testhal/ATSAMA5D2/SPI/debug/SAMA5D2-SPI (DDRAM).launch @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testhal/ATSAMA5D2/SPI/mcuconf.h b/testhal/ATSAMA5D2/SPI/mcuconf.h index 13d62e19f..6d02dabd1 100644 --- a/testhal/ATSAMA5D2/SPI/mcuconf.h +++ b/testhal/ATSAMA5D2/SPI/mcuconf.h @@ -1,143 +1,143 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -#define SAMA5D2x_MCUCONF - -/* - * HAL driver system settings. - */ -#define SAMA_HAL_IS_SECURE TRUE -#define SAMA_NO_INIT FALSE -#define SAMA_MOSCRC_ENABLED FALSE -#define SAMA_MOSCXT_ENABLED TRUE -#define SAMA_MOSC_SEL SAMA_MOSC_MOSCXT -#define SAMA_OSC_SEL SAMA_OSC_OSCXT -#define SAMA_MCK_SEL SAMA_MCK_PLLA_CLK -#define SAMA_MCK_PRES_VALUE 1 -#define SAMA_MCK_MDIV_VALUE 3 -#define SAMA_PLLA_MUL_VALUE 83 -#define SAMA_PLLADIV2_EN TRUE -#define SAMA_H64MX_H32MX_RATIO 2 - -/* - * SPI driver system settings. - */ -#define SAMA_SPI_USE_SPI0 FALSE -#define SAMA_SPI_USE_SPI1 TRUE -#define SAMA_SPI_USE_FLEXCOM0 FALSE -#define SAMA_SPI_USE_FLEXCOM1 FALSE -#define SAMA_SPI_USE_FLEXCOM2 FALSE -#define SAMA_SPI_USE_FLEXCOM3 FALSE -#define SAMA_SPI_USE_FLEXCOM4 FALSE -#define SAMA_SPI_SPI0_DMA_IRQ_PRIORITY 4 -#define SAMA_SPI_SPI1_DMA_IRQ_PRIORITY 4 -#define SAMA_SPI_FLEXCOM0_DMA_IRQ_PRIORITY 4 -#define SAMA_SPI_FLEXCOM1_DMA_IRQ_PRIORITY 4 -#define SAMA_SPI_FLEXCOM2_DMA_IRQ_PRIORITY 4 -#define SAMA_SPI_FLEXCOM3_DMA_IRQ_PRIORITY 4 -#define SAMA_SPI_FLEXCOM4_DMA_IRQ_PRIORITY 4 -#define SAMA_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") -#define SPI_SELECT_MODE SPI_SELECT_MODE_NONE - -/* - * SECUMOD driver system settings. - */ -#define HAL_USE_SECUMOD FALSE - -/* - * SDMMC driver system settings. - */ -#define HAL_USE_SDMMC FALSE - -/* - * SERIAL driver system settings. - */ -#define SAMA_SERIAL_USE_UART0 FALSE -#define SAMA_SERIAL_USE_UART1 TRUE -#define SAMA_SERIAL_USE_UART2 FALSE -#define SAMA_SERIAL_USE_UART3 FALSE -#define SAMA_SERIAL_USE_UART4 FALSE -#define SAMA_SERIAL_USE_FLEXCOM0 FALSE -#define SAMA_SERIAL_USE_FLEXCOM1 FALSE -#define SAMA_SERIAL_USE_FLEXCOM2 FALSE -#define SAMA_SERIAL_USE_FLEXCOM3 FALSE -#define SAMA_SERIAL_USE_FLEXCOM4 FALSE -#define SAMA_SERIAL_UART0_IRQ_PRIORITY 4 -#define SAMA_SERIAL_UART1_IRQ_PRIORITY 4 -#define SAMA_SERIAL_UART2_IRQ_PRIORITY 4 -#define SAMA_SERIAL_UART3_IRQ_PRIORITY 4 -#define SAMA_SERIAL_UART4_IRQ_PRIORITY 4 -#define SAMA_SERIAL_FLEXCOM0_IRQ_PRIORITY 4 -#define SAMA_SERIAL_FLEXCOM1_IRQ_PRIORITY 4 -#define SAMA_SERIAL_FLEXCOM2_IRQ_PRIORITY 4 -#define SAMA_SERIAL_FLEXCOM3_IRQ_PRIORITY 4 -#define SAMA_SERIAL_FLEXCOM4_IRQ_PRIORITY 4 - -/* - * ST driver settings. - */ -#define SAMA_ST_USE_PIT TRUE -#define SAMA_ST_USE_TC0 FALSE -#define SAMA_ST_USE_TC1 FALSE - -/* - * TC driver system settings. - */ -#define HAL_USE_TC FALSE -#define SAMA_USE_TC0 FALSE -#define SAMA_USE_TC1 FALSE -#define SAMA_TC0_IRQ_PRIORITY 2 -#define SAMA_TC1_IRQ_PRIORITY 2 - -/* - * UART driver system settings. - */ -#define SAMA_UART_USE_UART0 FALSE -#define SAMA_UART_USE_UART1 FALSE -#define SAMA_UART_USE_UART2 FALSE -#define SAMA_UART_USE_UART3 FALSE -#define SAMA_UART_USE_UART4 FALSE -#define SAMA_UART_USE_FLEXCOM0 FALSE -#define SAMA_UART_USE_FLEXCOM1 FALSE -#define SAMA_UART_USE_FLEXCOM2 FALSE -#define SAMA_UART_USE_FLEXCOM3 FALSE -#define SAMA_UART_USE_FLEXCOM4 FALSE -#define SAMA_UART_UART0_IRQ_PRIORITY 4 -#define SAMA_UART_UART1_IRQ_PRIORITY 4 -#define SAMA_UART_UART2_IRQ_PRIORITY 4 -#define SAMA_UART_UART3_IRQ_PRIORITY 4 -#define SAMA_UART_UART4_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM0_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM1_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM2_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM3_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM4_IRQ_PRIORITY 4 -#define SAMA_UART_UART0_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_UART1_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_UART2_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_UART3_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_UART4_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM0_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM1_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM2_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM3_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_FLEXCOM4_DMA_IRQ_PRIORITY 4 -#define SAMA_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -#endif /* MCUCONF_H */ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +#define SAMA5D2x_MCUCONF + +/* + * HAL driver system settings. + */ +#define SAMA_HAL_IS_SECURE TRUE +#define SAMA_NO_INIT TRUE +#define SAMA_MOSCRC_ENABLED FALSE +#define SAMA_MOSCXT_ENABLED TRUE +#define SAMA_MOSC_SEL SAMA_MOSC_MOSCXT +#define SAMA_OSC_SEL SAMA_OSC_OSCXT +#define SAMA_MCK_SEL SAMA_MCK_PLLA_CLK +#define SAMA_MCK_PRES_VALUE 1 +#define SAMA_MCK_MDIV_VALUE 3 +#define SAMA_PLLA_MUL_VALUE 83 +#define SAMA_PLLADIV2_EN TRUE +#define SAMA_H64MX_H32MX_RATIO 2 + +/* + * SDMMC driver system settings. + */ +#define HAL_USE_SDMMC FALSE + +/* + * SECUMOD driver system settings. + */ +#define HAL_USE_SECUMOD FALSE + +/* + * SERIAL driver system settings. + */ +#define SAMA_SERIAL_USE_UART0 FALSE +#define SAMA_SERIAL_USE_UART1 TRUE +#define SAMA_SERIAL_USE_UART2 FALSE +#define SAMA_SERIAL_USE_UART3 FALSE +#define SAMA_SERIAL_USE_UART4 FALSE +#define SAMA_SERIAL_USE_FLEXCOM0 FALSE +#define SAMA_SERIAL_USE_FLEXCOM1 FALSE +#define SAMA_SERIAL_USE_FLEXCOM2 FALSE +#define SAMA_SERIAL_USE_FLEXCOM3 FALSE +#define SAMA_SERIAL_USE_FLEXCOM4 FALSE +#define SAMA_SERIAL_UART0_IRQ_PRIORITY 4 +#define SAMA_SERIAL_UART1_IRQ_PRIORITY 4 +#define SAMA_SERIAL_UART2_IRQ_PRIORITY 4 +#define SAMA_SERIAL_UART3_IRQ_PRIORITY 4 +#define SAMA_SERIAL_UART4_IRQ_PRIORITY 4 +#define SAMA_SERIAL_FLEXCOM0_IRQ_PRIORITY 4 +#define SAMA_SERIAL_FLEXCOM1_IRQ_PRIORITY 4 +#define SAMA_SERIAL_FLEXCOM2_IRQ_PRIORITY 4 +#define SAMA_SERIAL_FLEXCOM3_IRQ_PRIORITY 4 +#define SAMA_SERIAL_FLEXCOM4_IRQ_PRIORITY 4 + +/* + * SPI driver system settings. + */ +#define SAMA_SPI_USE_SPI0 FALSE +#define SAMA_SPI_USE_SPI1 TRUE +#define SAMA_SPI_USE_FLEXCOM0 FALSE +#define SAMA_SPI_USE_FLEXCOM1 FALSE +#define SAMA_SPI_USE_FLEXCOM2 FALSE +#define SAMA_SPI_USE_FLEXCOM3 FALSE +#define SAMA_SPI_USE_FLEXCOM4 FALSE +#define SAMA_SPI_SPI0_DMA_IRQ_PRIORITY 4 +#define SAMA_SPI_SPI1_DMA_IRQ_PRIORITY 4 +#define SAMA_SPI_FLEXCOM0_DMA_IRQ_PRIORITY 4 +#define SAMA_SPI_FLEXCOM1_DMA_IRQ_PRIORITY 4 +#define SAMA_SPI_FLEXCOM2_DMA_IRQ_PRIORITY 4 +#define SAMA_SPI_FLEXCOM3_DMA_IRQ_PRIORITY 4 +#define SAMA_SPI_FLEXCOM4_DMA_IRQ_PRIORITY 4 +#define SAMA_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") +#define SPI_SELECT_MODE SPI_SELECT_MODE_NONE + +/* + * ST driver settings. + */ +#define SAMA_ST_USE_PIT FALSE +#define SAMA_ST_USE_TC0 FALSE +#define SAMA_ST_USE_TC1 TRUE + +/* + * TC driver system settings. + */ +#define HAL_USE_TC FALSE +#define SAMA_USE_TC0 FALSE +#define SAMA_USE_TC1 FALSE +#define SAMA_TC0_IRQ_PRIORITY 2 +#define SAMA_TC1_IRQ_PRIORITY 2 + +/* + * UART driver system settings. + */ +#define SAMA_UART_USE_UART0 FALSE +#define SAMA_UART_USE_UART1 FALSE +#define SAMA_UART_USE_UART2 FALSE +#define SAMA_UART_USE_UART3 FALSE +#define SAMA_UART_USE_UART4 FALSE +#define SAMA_UART_USE_FLEXCOM0 FALSE +#define SAMA_UART_USE_FLEXCOM1 FALSE +#define SAMA_UART_USE_FLEXCOM2 FALSE +#define SAMA_UART_USE_FLEXCOM3 FALSE +#define SAMA_UART_USE_FLEXCOM4 FALSE +#define SAMA_UART_UART0_IRQ_PRIORITY 4 +#define SAMA_UART_UART1_IRQ_PRIORITY 4 +#define SAMA_UART_UART2_IRQ_PRIORITY 4 +#define SAMA_UART_UART3_IRQ_PRIORITY 4 +#define SAMA_UART_UART4_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM0_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM1_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM2_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM3_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM4_IRQ_PRIORITY 4 +#define SAMA_UART_UART0_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_UART1_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_UART2_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_UART3_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_UART4_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM0_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM1_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM2_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM3_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_FLEXCOM4_DMA_IRQ_PRIORITY 4 +#define SAMA_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +#endif /* MCUCONF_H */ -- cgit v1.2.3