mirror of
https://github.com/peterantypas/maiana.git
synced 2025-05-18 08:20:08 -07:00
Changed UART parameters to reduce noise
This commit is contained in:
parent
b0115b9c4a
commit
516f9804a0
@ -35,7 +35,7 @@ void DataTerminal::init()
|
|||||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF;
|
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF;
|
||||||
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
|
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
|
||||||
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_Level_1;
|
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
GPIO_Init(GPIOB, &GPIO_InitStruct);
|
GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE);
|
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE);
|
||||||
|
@ -84,13 +84,13 @@ void GPS::init()
|
|||||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF;
|
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF;
|
||||||
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
|
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
|
||||||
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_Level_2;
|
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
GPIO_Init(GPIOA, &GPIO_InitStruct);
|
GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
/* PA0 is connected to EXTI_Line0 -- currently the PPS signal from the GPS */
|
/* PA0 is connected to EXTI_Line0 -- currently the PPS signal from the GPS */
|
||||||
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0;
|
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_0;
|
||||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
|
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN;
|
||||||
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_Level_1;
|
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
|
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
|
||||||
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
GPIO_Init(GPIOA, &GPIO_InitStruct);
|
GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
@ -42,7 +42,7 @@ void RadioManager::init()
|
|||||||
GPIO_InitTypeDef gpio;
|
GPIO_InitTypeDef gpio;
|
||||||
gpio.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;
|
gpio.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;
|
||||||
gpio.GPIO_Mode = GPIO_Mode_AF;
|
gpio.GPIO_Mode = GPIO_Mode_AF;
|
||||||
gpio.GPIO_Speed = GPIO_Speed_Level_3;
|
gpio.GPIO_Speed = GPIO_Speed_Level_2;
|
||||||
gpio.GPIO_OType = GPIO_OType_PP;
|
gpio.GPIO_OType = GPIO_OType_PP;
|
||||||
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ void RadioManager::init()
|
|||||||
// PB8 is SDN2
|
// PB8 is SDN2
|
||||||
gpio.GPIO_Pin = GPIO_Pin_8;
|
gpio.GPIO_Pin = GPIO_Pin_8;
|
||||||
gpio.GPIO_Mode = GPIO_Mode_OUT;
|
gpio.GPIO_Mode = GPIO_Mode_OUT;
|
||||||
gpio.GPIO_Speed = GPIO_Speed_Level_2;
|
gpio.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
gpio.GPIO_OType = GPIO_OType_PP;
|
gpio.GPIO_OType = GPIO_OType_PP;
|
||||||
gpio.GPIO_PuPd = GPIO_PuPd_UP;
|
gpio.GPIO_PuPd = GPIO_PuPd_UP;
|
||||||
GPIO_Init(GPIOB, &gpio);
|
GPIO_Init(GPIOB, &gpio);
|
||||||
@ -71,7 +71,7 @@ void RadioManager::init()
|
|||||||
// PC13 starts as input, used for POR status (RFIC2 GPIO1 -> MCU), then switched between RX/TX DATA as necessary
|
// PC13 starts as input, used for POR status (RFIC2 GPIO1 -> MCU), then switched between RX/TX DATA as necessary
|
||||||
gpio.GPIO_Pin = GPIO_Pin_13;
|
gpio.GPIO_Pin = GPIO_Pin_13;
|
||||||
gpio.GPIO_Mode = GPIO_Mode_IN;
|
gpio.GPIO_Mode = GPIO_Mode_IN;
|
||||||
gpio.GPIO_Speed = GPIO_Speed_Level_1;
|
gpio.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
gpio.GPIO_OType = GPIO_OType_PP;
|
gpio.GPIO_OType = GPIO_OType_PP;
|
||||||
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
GPIO_Init(GPIOC, &gpio);
|
GPIO_Init(GPIOC, &gpio);
|
||||||
@ -79,7 +79,7 @@ void RadioManager::init()
|
|||||||
// PB9 is input for bit clock, both RX and TX (RFIC2 GPIO3 -> MCU)
|
// PB9 is input for bit clock, both RX and TX (RFIC2 GPIO3 -> MCU)
|
||||||
gpio.GPIO_Pin = GPIO_Pin_9;
|
gpio.GPIO_Pin = GPIO_Pin_9;
|
||||||
gpio.GPIO_Mode = GPIO_Mode_IN;
|
gpio.GPIO_Mode = GPIO_Mode_IN;
|
||||||
gpio.GPIO_Speed = GPIO_Speed_Level_2;
|
gpio.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
gpio.GPIO_OType = GPIO_OType_PP;
|
gpio.GPIO_OType = GPIO_OType_PP;
|
||||||
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
GPIO_Init(GPIOB, &gpio);
|
GPIO_Init(GPIOB, &gpio);
|
||||||
@ -96,7 +96,7 @@ void RadioManager::init()
|
|||||||
// PA3 will be the SDN1 pin
|
// PA3 will be the SDN1 pin
|
||||||
gpio.GPIO_Pin = GPIO_Pin_3;
|
gpio.GPIO_Pin = GPIO_Pin_3;
|
||||||
gpio.GPIO_Mode = GPIO_Mode_OUT;
|
gpio.GPIO_Mode = GPIO_Mode_OUT;
|
||||||
gpio.GPIO_Speed = GPIO_Speed_Level_2;
|
gpio.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
gpio.GPIO_OType = GPIO_OType_PP;
|
gpio.GPIO_OType = GPIO_OType_PP;
|
||||||
gpio.GPIO_PuPd = GPIO_PuPd_UP;
|
gpio.GPIO_PuPd = GPIO_PuPd_UP;
|
||||||
GPIO_Init(GPIOA, &gpio);
|
GPIO_Init(GPIOA, &gpio);
|
||||||
@ -104,7 +104,7 @@ void RadioManager::init()
|
|||||||
// PB2 starts as input, used for POR status (RFIC1 GPIO1 -> MCU), then switched between RX/TX DATA as necessary
|
// PB2 starts as input, used for POR status (RFIC1 GPIO1 -> MCU), then switched between RX/TX DATA as necessary
|
||||||
gpio.GPIO_Pin = GPIO_Pin_2;
|
gpio.GPIO_Pin = GPIO_Pin_2;
|
||||||
gpio.GPIO_Mode = GPIO_Mode_IN;
|
gpio.GPIO_Mode = GPIO_Mode_IN;
|
||||||
gpio.GPIO_Speed = GPIO_Speed_Level_1;
|
gpio.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
gpio.GPIO_OType = GPIO_OType_PP;
|
gpio.GPIO_OType = GPIO_OType_PP;
|
||||||
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
GPIO_Init(GPIOB, &gpio);
|
GPIO_Init(GPIOB, &gpio);
|
||||||
@ -112,7 +112,7 @@ void RadioManager::init()
|
|||||||
// PA1 is input for bit clock, both RX and TX (RFIC1 GPIO3 -> MCU)
|
// PA1 is input for bit clock, both RX and TX (RFIC1 GPIO3 -> MCU)
|
||||||
gpio.GPIO_Pin = GPIO_Pin_1;
|
gpio.GPIO_Pin = GPIO_Pin_1;
|
||||||
gpio.GPIO_Mode = GPIO_Mode_IN;
|
gpio.GPIO_Mode = GPIO_Mode_IN;
|
||||||
gpio.GPIO_Speed = GPIO_Speed_Level_2;
|
gpio.GPIO_Speed = GPIO_Speed_Level_3;
|
||||||
gpio.GPIO_OType = GPIO_OType_PP;
|
gpio.GPIO_OType = GPIO_OType_PP;
|
||||||
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
gpio.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||||
GPIO_Init(GPIOA, &gpio);
|
GPIO_Init(GPIOA, &gpio);
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef CALIBRATION_MODE
|
#ifdef CALIBRATION_MODE
|
||||||
#define TX_POWER_LEVEL PWR_M27
|
#define TX_POWER_LEVEL PWR_M16
|
||||||
#else
|
#else
|
||||||
#ifdef TX_TEST_MODE
|
#ifdef TX_TEST_MODE
|
||||||
#define TX_POWER_LEVEL PWR_P16
|
#define TX_POWER_LEVEL PWR_P16
|
||||||
|
@ -56,7 +56,7 @@ main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
// At this stage the system clock should have already been configured
|
// At this stage the system clock should have already been configured
|
||||||
// at high speed.
|
// at high speed.
|
||||||
printf2_Init(230400);
|
printf2_Init(38400);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// Disable buffered memory writes to debug imprecise bus faults
|
// Disable buffered memory writes to debug imprecise bus faults
|
||||||
|
Loading…
x
Reference in New Issue
Block a user