Separate radio xtal means we run the processor at 48MHz.
Fix the battery monitoring voltage divider resistor values.
Disable most of the code until we've got the radio working.
Signed-off-by: Keith Packard <keithp@keithp.com>
#define AO_STACK_SIZE 384
#define AO_STACK_SIZE 384
+#define RELOCATE_INTERRUPT 0
+
#define IS_FLASH_LOADER 0
#define IS_FLASH_LOADER 0
-/* 40MHz clock based on 16MHz reference */
+/* 48MHz clock based on 16MHz reference */
//#define AO_HSI48 1
#define AO_HSE 16000000
//#define AO_HSI48 1
#define AO_HSE 16000000
-#define AO_RCC_CFGR_PLLMUL STM_RCC_CFGR_PLLMUL_5
-#define AO_RCC_CFGR2_PLLDIV STM_RCC_CFGR2_PREDIV_2
-#define AO_PLLMUL 5
-#define AO_PLLDIV 2
+#define AO_RCC_CFGR_PLLMUL STM_RCC_CFGR_PLLMUL_3
+#define AO_RCC_CFGR2_PLLDIV STM_RCC_CFGR2_PREDIV_1
+#define AO_PLLMUL 3
+#define AO_PLLDIV 1
#define AO_AHB_PRESCALER 1
#define AO_RCC_CFGR_HPRE_DIV STM_RCC_CFGR_HPRE_DIV_1
#define AO_AHB_PRESCALER 1
#define AO_RCC_CFGR_HPRE_DIV STM_RCC_CFGR_HPRE_DIV_1
#define AO_APB_PRESCALER 1
#define AO_RCC_CFGR_PPRE_DIV STM_RCC_CFGR_PPRE_DIV_1
#define AO_APB_PRESCALER 1
#define AO_RCC_CFGR_PPRE_DIV STM_RCC_CFGR_PPRE_DIV_1
-/* Send PLL clock to cc1200 */
-#define AO_MCO_PORT (&stm_gpioa)
-#define AO_MCO_PIN 9
-#define AO_MCO_AF STM_AFR_AF5
-
#define HAS_USB 0
#define AO_USB_DIRECTIO 0
#define AO_PA11_PA12_RMP 0
#define HAS_USB 0
#define AO_USB_DIRECTIO 0
#define AO_PA11_PA12_RMP 0
-#define HAS_SPI_0 1
-#define SPI_SCK0_P0_6 1
#define HAS_SPI_1 1
#define SPI_SCK1_P1_15 1
#define SPI_MISO1_P0_22 1
#define HAS_SPI_1 1
#define SPI_SCK1_P1_15 1
#define SPI_MISO1_P0_22 1
/* CC1200 */
// #define AO_RADIO_CAL_DEFAULT 5695733
/* CC1200 */
// #define AO_RADIO_CAL_DEFAULT 5695733
-#define AO_RADIO_CAL_DEFAULT 5695947
+#define AO_RADIO_CAL_DEFAULT 5695717
#define AO_FEC_DEBUG 0
#define AO_CC1200_SPI_CS_PORT (&stm_gpiob)
#define AO_FEC_DEBUG 0
#define AO_CC1200_SPI_CS_PORT (&stm_gpiob)
/*
* Voltage divider on ADC battery sampler
*/
/*
* Voltage divider on ADC battery sampler
*/
-#define AO_BATTERY_DIV_PLUS 100 /* 100k */
-#define AO_BATTERY_DIV_MINUS 27 /* 27k */
+#define AO_BATTERY_DIV_PLUS 56 /* 5.6k */
+#define AO_BATTERY_DIV_MINUS 100 /* 10k */
/*
* Voltage divider on ADC igniter samplers
/*
* Voltage divider on ADC igniter samplers
ao_beep_init();
ao_cmd_init();
ao_beep_init();
ao_cmd_init();
- ao_flight_init();
- ao_log_init();
- ao_report_init();
- ao_telemetry_init();
+// ao_flight_init();
+// ao_log_init();
+// ao_report_init();
+// ao_telemetry_init();
ao_radio_init();
ao_packet_slave_init(TRUE);
ao_radio_init();
ao_packet_slave_init(TRUE);
+ ao_flight_force_idle = TRUE;
+