From 8477c2229b48d3de85ebbe39b6f20c73f8129fbf Mon Sep 17 00:00:00 2001 From: James Cotton Date: Thu, 17 Nov 2011 01:58:51 -0600 Subject: [PATCH] Using real prototype board now. Move telemetry to GPS port for easy-ness right now. --- flight/PiOS/Boards/STM32F4xx_Revolution.h | 12 ++++++------ flight/Revolution/Makefile | 3 ++- flight/Revolution/System/pios_board.c | 17 +++++++++-------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/flight/PiOS/Boards/STM32F4xx_Revolution.h b/flight/PiOS/Boards/STM32F4xx_Revolution.h index c0968b138..6c769643b 100644 --- a/flight/PiOS/Boards/STM32F4xx_Revolution.h +++ b/flight/PiOS/Boards/STM32F4xx_Revolution.h @@ -77,12 +77,12 @@ TIM8 | | | | //------------------------ // PIOS_LED //------------------------ -#define PIOS_LED_LED1_GPIO_PORT GPIOA -#define PIOS_LED_LED1_GPIO_PIN GPIO_Pin_3 -#define PIOS_LED_LED1_GPIO_CLK RCC_APB2Periph_GPIOA -#define PIOS_LED_LED2_GPIO_PORT GPIOA -#define PIOS_LED_LED2_GPIO_PIN GPIO_Pin_2 -#define PIOS_LED_LED2_GPIO_CLK RCC_APB2Periph_GPIOA +#define PIOS_LED_LED1_GPIO_PORT GPIOE +#define PIOS_LED_LED1_GPIO_PIN GPIO_Pin_2 +#define PIOS_LED_LED1_GPIO_CLK RCC_APB2Periph_GPIOE +#define PIOS_LED_LED2_GPIO_PORT GPIOE +#define PIOS_LED_LED2_GPIO_PIN GPIO_Pin_3 +#define PIOS_LED_LED2_GPIO_CLK RCC_APB2Periph_GPIOE #define PIOS_LED_NUM 2 #define PIOS_LED_PORTS { PIOS_LED_LED1_GPIO_PORT, PIOS_LED_LED2_GPIO_PORT } #define PIOS_LED_PINS { PIOS_LED_LED1_GPIO_PIN, PIOS_LED_LED2_GPIO_PIN } diff --git a/flight/Revolution/Makefile b/flight/Revolution/Makefile index b3df5b711..61e5a9de7 100644 --- a/flight/Revolution/Makefile +++ b/flight/Revolution/Makefile @@ -49,7 +49,8 @@ endif FLASH_TOOL = OPENOCD # List of modules to include -MODULES = Actuator Telemetry ManualControl Stabilization Attitude/revolution +MODULES = Actuator Telemetry ManualControl Stabilization +# Attitude/revolution PYMODULES = #FlightPlan diff --git a/flight/Revolution/System/pios_board.c b/flight/Revolution/System/pios_board.c index 07b3f70a1..e49abe6d8 100644 --- a/flight/Revolution/System/pios_board.c +++ b/flight/Revolution/System/pios_board.c @@ -398,8 +398,9 @@ static uint8_t pios_com_gps_rx_buffer[PIOS_COM_GPS_RX_BUF_LEN]; * Telemetry on main USART */ static const struct pios_usart_cfg pios_usart_telem_main_cfg = { - .regs = UART4, - .remap = GPIO_AF_UART4, + .regs = USART6, + .regs = USART1, + .remap = GPIO_AF_USART1, .init = { .USART_BaudRate = 57600, .USART_WordLength = USART_WordLength_8b, @@ -411,16 +412,16 @@ static const struct pios_usart_cfg pios_usart_telem_main_cfg = { }, .irq = { .init = { - .NVIC_IRQChannel = UART4_IRQn, - .NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_HIGH, + .NVIC_IRQChannel = USART1_IRQn, + .NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID, .NVIC_IRQChannelSubPriority = 0, .NVIC_IRQChannelCmd = ENABLE, }, }, .rx = { - .gpio = GPIOC, + .gpio = GPIOA, .init = { - .GPIO_Pin = GPIO_Pin_11, + .GPIO_Pin = GPIO_Pin_10, .GPIO_Speed = GPIO_Speed_2MHz, .GPIO_Mode = GPIO_Mode_AF, .GPIO_OType = GPIO_OType_PP, @@ -428,9 +429,9 @@ static const struct pios_usart_cfg pios_usart_telem_main_cfg = { }, }, .tx = { - .gpio = GPIOC, + .gpio = GPIOA, .init = { - .GPIO_Pin = GPIO_Pin_10, + .GPIO_Pin = GPIO_Pin_9, .GPIO_Speed = GPIO_Speed_2MHz, .GPIO_Mode = GPIO_Mode_AF, .GPIO_OType = GPIO_OType_PP,