2015-07-04 09:37:54 +02:00
|
|
|
/*
|
2015-07-16 02:56:33 +02:00
|
|
|
* Copyright (C) 2015 Rakendra Thapa <rakendrathapa@gmail.com>
|
2015-07-04 09:37:54 +02:00
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
|
|
* Public License v2.1. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup boards_ek-lm4f120xl
|
|
|
|
* @{
|
|
|
|
*
|
2015-07-21 18:08:56 +02:00
|
|
|
* @file
|
2015-07-04 09:37:54 +02:00
|
|
|
* @name Peripheral MCU configuration for the ek-lm4f120xl board
|
|
|
|
*
|
|
|
|
* @author Rakendra Thapa <rakendrathapa@gmail.com>
|
|
|
|
*/
|
|
|
|
|
2015-07-16 02:56:33 +02:00
|
|
|
#ifndef PERIPH_CONF_H
|
|
|
|
#define PERIPH_CONF_H
|
2015-07-04 09:37:54 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-07-18 03:16:46 +02:00
|
|
|
/**
|
|
|
|
* @name Define the nominal CPU core clock in this board
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define CLK80 1
|
|
|
|
#define CLK50 2
|
|
|
|
#define CLK40 3
|
|
|
|
#define CLK16 4
|
|
|
|
#define CLK1 5
|
2015-07-21 18:08:56 +02:00
|
|
|
#define CLOCK_SOURCE CLK40
|
2015-07-18 03:16:46 +02:00
|
|
|
/** @} */
|
|
|
|
|
2015-07-04 09:37:54 +02:00
|
|
|
/**
|
|
|
|
* @name Timer configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define TIMER_NUMOF (2U)
|
|
|
|
#define TIMER_0_EN 1
|
2015-10-05 21:12:10 +02:00
|
|
|
#define TIMER_1_EN 1
|
2015-07-04 09:37:54 +02:00
|
|
|
#define TIMER_IRQ_PRIO 1
|
|
|
|
|
2015-10-05 21:12:10 +02:00
|
|
|
/* Timer 0 configuration
|
|
|
|
*
|
|
|
|
* WTIMER0 is a 32/64bits timer.
|
|
|
|
* We use timer_a as TIMER_0
|
|
|
|
*/
|
2015-07-16 02:56:33 +02:00
|
|
|
#define TIMER_0_CHANNELS 1
|
2015-07-04 09:37:54 +02:00
|
|
|
#define TIMER_0_MAX_VALUE (0xffffffff)
|
2015-07-18 09:28:16 +02:00
|
|
|
#define TIMER_0_ISR isr_wtimer0a
|
2015-07-04 09:37:54 +02:00
|
|
|
#define TIMER_0_IRQ_CHAN Timer0A_IRQn
|
|
|
|
|
2015-10-05 21:12:10 +02:00
|
|
|
/* Timer 1 configuration
|
|
|
|
*
|
|
|
|
* WTIMER1 is a 32/64bits timer.
|
|
|
|
* We use timer_a as TIMER_1
|
|
|
|
*/
|
|
|
|
|
2015-07-16 02:56:33 +02:00
|
|
|
#define TIMER_1_CHANNELS 1
|
2015-07-04 09:37:54 +02:00
|
|
|
#define TIMER_1_MAX_VALUE (0xffffffff)
|
2015-07-18 09:28:16 +02:00
|
|
|
#define TIMER_1_ISR isr_wtimer1a
|
2015-07-04 09:37:54 +02:00
|
|
|
#define TIMER_1_IRQ_CHAN Timer1A_IRQn
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name UART configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define UART_NUMOF (1U)
|
|
|
|
#define UART_0_EN 1
|
|
|
|
#define UART_1_EN 0
|
|
|
|
#define UART_IRQ_PRIO 1
|
2015-07-16 02:56:33 +02:00
|
|
|
#define UART_CLK ROM_SysCtlClockGet() /* UART clock runs with 40MHz */
|
2015-07-04 09:37:54 +02:00
|
|
|
/* UART 0 device configuration */
|
|
|
|
#define UART_0_DEV UART0_BASE
|
2015-07-16 02:56:33 +02:00
|
|
|
#define UART_0_CLK (40000000)
|
2015-07-04 09:37:54 +02:00
|
|
|
#define UART_0_IRQ_CHAN UART0_IRQn
|
2015-07-18 09:28:16 +02:00
|
|
|
#define UART_0_ISR isr_uart0
|
2015-07-04 09:37:54 +02:00
|
|
|
/* UART 0 pin configuration */
|
|
|
|
#define UART_0_PORT GPIOA
|
|
|
|
#define UART_0_TX_PIN UART_PA1_U0TX
|
|
|
|
#define UART_0_RX_PIN UART_PA0_U0RX
|
|
|
|
|
|
|
|
/* UART 1 device configuration */
|
|
|
|
#define UART_1_DEV UART1_BASE
|
2015-07-16 02:56:33 +02:00
|
|
|
#define UART_1_CLK (40000000)
|
2015-07-04 09:37:54 +02:00
|
|
|
#define UART_1_IRQ_CHAN UART1_IRQn
|
2015-07-18 09:28:16 +02:00
|
|
|
#define UART_1_ISR isr_uart1
|
2015-07-04 09:37:54 +02:00
|
|
|
/** @} */
|
|
|
|
|
2015-12-03 13:10:12 +01:00
|
|
|
/**
|
2017-01-26 18:14:32 +01:00
|
|
|
* @name ADC configuration
|
2015-12-03 13:10:12 +01:00
|
|
|
* @{
|
|
|
|
*/
|
2016-03-14 11:30:53 +01:00
|
|
|
#define ADC_NUMOF (12)
|
|
|
|
/** @} */
|
2015-12-03 13:10:12 +01:00
|
|
|
|
2015-07-04 09:37:54 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-07-16 02:56:33 +02:00
|
|
|
#endif /* PERIPH_CONF_H */
|
2015-07-04 09:37:54 +02:00
|
|
|
/** @} */
|