Add support for the Sparkfun Logomatic V2.6 logger.

This commit is contained in:
Martin Mueller
2012-03-11 15:18:03 +01:00
parent 928862fa8c
commit 74339b4129
3 changed files with 232 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<!DOCTYPE airframe SYSTEM "airframe.dtd">
<!--
Sparkfun Logomatic V26 data logger
http://www.sparkfun.com/products/10216
P1-P8 can be used as ADC_0-ADC_7
P1 as PPM_IN
P2 as SERV_CLK
For now only non SDHC SD cards (<= 2GB) are supported. martinmm@pfump.org
-->
<airframe name="Logomatic">
<firmware name="logger">
<target name="ap" board="logom_2.6" >
<configure name="LOG_MSG_FMT" value="LOG_XBEE"/>
<configure name="SPI_CHANNEL" value="0" />
<configure name="UART0_BAUD" value="B57600" />
<configure name="UART1_BAUD" value="B57600" />
</target>
</firmware>
</airframe>
+27
View File
@@ -0,0 +1,27 @@
#
# logom_2.6.makefile
#
# http://www.sparkfun.com/products/10216
#
ARCH=lpc21
BOARD=logom
BOARD_VERSION=2.6
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
ifndef FLASH_MODE
FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400
LPC21ISP_XTAL = 12000
ADC_GENERIC_NB_SAMPLES = 16
# All targets on the board run on the same processor achitecture
$(TARGET).ARCHDIR = $(ARCH)
+177
View File
@@ -0,0 +1,177 @@
/* board definition file for Sparkfun Logomatic V2.6 data logger */
#ifndef CONFIG_LOGOMATIC_H
#define CONFIG_LOGOMATIC_H
#ifdef SITL
/* Dummy definitions: adc are unused anyway */
#define AdcBank0(x) (x)
#define AdcBank1(x) (x)
#endif /* SITL */
/* Master oscillator freq. */
#define FOSC (12000000)
/* PLL multiplier */
#define PLL_MUL (5)
/* CPU clock freq. */
#define CCLK (FOSC * PLL_MUL)
/* PCLK needs to run @ 30MHz for USB */
#define USE_USB_HIGH_PCLK
#ifdef USE_USB_HIGH_PCLK
/* Peripheral bus speed mask 0x00-> 4, 0x01-> 1, 0x02-> 2 */
/* change both PBSD_BITS/VAL 15MHz, 60MHz, 30MHz */
#define PBSD_BITS 0x02
#define PBSD_VAL 2
#else
/* Peripheral bus speed mask 0x00->4, 0x01-> 1, 0x02 -> 2 */
#define PBSD_BITS 0x00
#define PBSD_VAL 4
#endif
/* Peripheral bus clock freq. */
#define PCLK (CCLK / PBSD_VAL)
#define LED_1_BANK 1
#define LED_1_PIN 16
#define LED_2_BANK 0
#define LED_2_PIN 2
#define LED_3_BANK 0
#define LED_3_PIN 11
#define LED_4_BANK 1
#define LED_4_PIN 17
#define POWER_SWITCH_LED 4
#define LED_5_BANK 1
#define LED_5_PIN 18
#define CAM_SWITCH_LED 5
#define LED_GPS_RESET_BANK 1
#define LED_GPS_RESET_PIN 19
#define Configure_GPS_RESET_Pin() LED_INIT(GPS_RESET)
#define Set_GPS_RESET_Pin_LOW() LED_ON(GPS_RESET)
#define Open_GPS_RESET_Pin() ClearBit(LED_DIR(GPS_RESET), LED_PIN(GPS_RESET))
/* P0.29 aka MAT0.3 (P2) */
#define SERVO_CLOCK_PIN 29
#define SERVO_CLOCK_PINSEL PINSEL0
#define SERVO_CLOCK_PINSEL_VAL 0x02
#define SERVO_CLOCK_PINSEL_BIT 10
/* p1.20 */
#define SERVO_RESET_PIN 20
/* PPM : rc rx on P0.6 aka CAP0.0 (P1) */
#define PPM_PINSEL PINSEL0
#define PPM_PINSEL_VAL 0x02
#define PPM_PINSEL_BIT 12
#define PPM_CRI TIR_CR2I
#define PPM_CCR_CRF TCCR_CR2_F
#define PPM_CCR_CRR TCCR_CR2_R
#define PPM_CCR_CRI TCCR_CR2_I
#define PPM_CR T0CR2
/* ADC */
#define ADC_0 AdcBank0(3)
#ifdef USE_ADC_0
#ifndef USE_AD0
#define USE_AD0
#endif
#define USE_AD0_3
#endif
#define ADC_1 AdcBank0(2)
#ifdef USE_ADC_1
#ifndef USE_AD0
#define USE_AD0
#endif
#define USE_AD0_2
#endif
#define ADC_2 AdcBank0(1)
#ifdef USE_ADC_2
#ifndef USE_AD0
#define USE_AD0
#endif
#define USE_AD0_1
#endif
#define ADC_3 AdcBank0(4)
#ifdef USE_ADC_3
#ifndef USE_AD0
#define USE_AD0
#endif
#define USE_AD0_4
#endif
#define ADC_4 AdcBank1(7)
#ifdef USE_ADC_4
#ifndef USE_AD1
#define USE_AD1
#endif
#define USE_AD1_7
#endif
#define ADC_5 AdcBank1(6)
#ifdef USE_ADC_5
#ifndef USE_AD1
#define USE_AD1
#endif
#define USE_AD1_6
#endif
#define ADC_6 AdcBank1(2)
#ifdef USE_ADC_6
#ifndef USE_AD1
#define USE_AD1
#endif
#define USE_AD1_2
#endif
#define ADC_7 AdcBank1(2)
#ifdef USE_ADC_7
#ifndef USE_AD1
#define USE_AD1
#endif
#define USE_AD1_2
#endif
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
#ifndef ADC_CHANNEL_VSUPPLY
#define ADC_CHANNEL_VSUPPLY AdcBank1(4)
#ifndef USE_AD1
#define USE_AD1
#endif
#define USE_AD1_4
#endif
#define DefaultVoltageOfAdc(adc) (0.068505859375*adc)
#define SPI_SELECT_SLAVE0_PORT 0
#define SPI_SELECT_SLAVE0_PIN 20
#define SPI1_DRDY_PINSEL PINSEL1
#define SPI1_DRDY_PINSEL_BIT 0
#define SPI1_DRDY_PINSEL_VAL 1
#define SPI1_DRDY_EINT 0
#define SPI1_DRDY_VIC_IT VIC_EINT0
/* micro SD connected to SPI0 */
#define SPI_CHANNEL 0
/* STOP button P0.3 */
#define LOG_STOP_KEY 3
#endif /* CONFIG_LOGOMATIC_H */