Now demo works in DDR
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11534 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
86c2338782
commit
d39b1c2290
|
@ -127,7 +127,8 @@ include $(CHIBIOS)/os/common/ports/ARMCAx-TZ/compilers/GCC/mk/port_generic.mk
|
||||||
#include $(CHIBIOS)/test/oslib/oslib_test.mk
|
#include $(CHIBIOS)/test/oslib/oslib_test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(STARTUPLD)/SAMA5D2.ld
|
#LDSCRIPT= $(STARTUPLD)/SAMA5D2.ld
|
||||||
|
LDSCRIPT= $(STARTUPLD)/SAMA5D2ddr.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
* @brief Enables the SERIAL subsystem.
|
* @brief Enables the SERIAL subsystem.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_SERIAL TRUE
|
#define HAL_USE_SERIAL FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
|
|
||||||
#define BUFFER_SIZE 5
|
#define BUFFER 5
|
||||||
|
|
||||||
static virtual_timer_t vt3, vt4, vt5;
|
static virtual_timer_t vt3, vt4, vt5;
|
||||||
static const uint8_t message[] = "ABCDE";
|
static const uint8_t message[] = {'a','b','c','d','e','f'};
|
||||||
static uint8_t buffer[BUFFER_SIZE];
|
static uint8_t buffer[BUFFER];
|
||||||
|
|
||||||
static void led3off(void *p) {
|
static void led3off(void *p) {
|
||||||
|
|
||||||
|
@ -140,15 +140,6 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
uartStart(&FUARTD0, &uart_cfg_1);
|
uartStart(&FUARTD0, &uart_cfg_1);
|
||||||
|
|
||||||
/*
|
|
||||||
* Activates the serial driver 0 using the driver default configuration.
|
|
||||||
*/
|
|
||||||
sdStart(&SD0, NULL);
|
|
||||||
|
|
||||||
/* Redirecting SERIAL RX on PB26 and UART0 TX on PB27. */
|
|
||||||
palSetGroupMode(PIOB, PAL_PORT_BIT(26) | PAL_PORT_BIT(27), 0U,
|
|
||||||
PAL_SAMA_FUNC_PERIPH_C | PAL_MODE_SECURE);
|
|
||||||
|
|
||||||
/* Redirecting UART FLEXCOM0 RX on PB28 and UART FLEXCOM0 TX on PB29. */
|
/* Redirecting UART FLEXCOM0 RX on PB28 and UART FLEXCOM0 TX on PB29. */
|
||||||
palSetGroupMode(PIOB, PAL_PORT_BIT(28) | PAL_PORT_BIT(29), 0U,
|
palSetGroupMode(PIOB, PAL_PORT_BIT(28) | PAL_PORT_BIT(29), 0U,
|
||||||
PAL_SAMA_FUNC_PERIPH_C | PAL_MODE_SECURE);
|
PAL_SAMA_FUNC_PERIPH_C | PAL_MODE_SECURE);
|
||||||
|
@ -165,9 +156,10 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
uartStopReceive(&FUARTD0);
|
uartStopReceive(&FUARTD0);
|
||||||
uartStopSend(&FUARTD0);
|
uartStopSend(&FUARTD0);
|
||||||
uartStartReceive(&FUARTD0, BUFFER_SIZE, buffer);
|
uartStartReceive(&FUARTD0, BUFFER, buffer);
|
||||||
uartStartSend(&FUARTD0, BUFFER_SIZE, message);
|
uartStartSend(&FUARTD0, 6, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* HAL driver system settings.
|
* HAL driver system settings.
|
||||||
*/
|
*/
|
||||||
#define SAMA_HAL_IS_SECURE TRUE
|
#define SAMA_HAL_IS_SECURE TRUE
|
||||||
#define SAMA_NO_INIT FALSE
|
#define SAMA_NO_INIT TRUE
|
||||||
#define SAMA_MOSCRC_ENABLED FALSE
|
#define SAMA_MOSCRC_ENABLED FALSE
|
||||||
#define SAMA_MOSCXT_ENABLED TRUE
|
#define SAMA_MOSCXT_ENABLED TRUE
|
||||||
#define SAMA_MOSC_SEL SAMA_MOSC_MOSCXT
|
#define SAMA_MOSC_SEL SAMA_MOSC_MOSCXT
|
||||||
|
@ -35,6 +35,23 @@
|
||||||
#define SAMA_PLLADIV2_EN TRUE
|
#define SAMA_PLLADIV2_EN TRUE
|
||||||
#define SAMA_H64MX_H32MX_RATIO 2
|
#define SAMA_H64MX_H32MX_RATIO 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ST driver settings.
|
||||||
|
*/
|
||||||
|
#define SAMA_ST_USE_PIT FALSE
|
||||||
|
#define SAMA_ST_USE_TC0 FALSE
|
||||||
|
#define SAMA_ST_USE_TC1 TRUE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SECUMOD driver system settings.
|
||||||
|
*/
|
||||||
|
#define HAL_USE_SECUMOD FALSE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SDMMC driver system settings.
|
||||||
|
*/
|
||||||
|
#define HAL_USE_SDMMC FALSE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SPI driver system settings.
|
* SPI driver system settings.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue