diff --git a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp index dd79b1997c..2b17ac55cf 100644 --- a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp +++ b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp @@ -265,8 +265,8 @@ void AnalogIn::init() } else { adcgrpcfg.sqr[2] |= chan << (6*(i-9)); } -#elif defined(STM32F3) || defined(STM32G4) || defined(STM32L4) -#if defined(STM32G4) || defined(STM32L4) +#elif defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) +#if defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) adcgrpcfg.smpr[chan/10] |= ADC_SMPR_SMP_640P5 << (3*(chan%10)); #else adcgrpcfg.smpr[chan/10] |= ADC_SMPR_SMP_601P5 << (3*(chan%10)); diff --git a/libraries/AP_HAL_ChibiOS/GPIO.cpp b/libraries/AP_HAL_ChibiOS/GPIO.cpp index 53afc7b1af..93d72a948c 100644 --- a/libraries/AP_HAL_ChibiOS/GPIO.cpp +++ b/libraries/AP_HAL_ChibiOS/GPIO.cpp @@ -205,7 +205,7 @@ void GPIO::pinMode(uint8_t pin, uint8_t output) return; } g->mode = output?PAL_MODE_OUTPUT_PUSHPULL:PAL_MODE_INPUT; -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F4) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F4) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) if (g->mode == PAL_MODE_OUTPUT_PUSHPULL) { // retain OPENDRAIN if already set iomode_t old_mode = palReadLineMode(g->pal_line); @@ -550,7 +550,7 @@ bool GPIO::pin_to_servo_channel(uint8_t pin, uint8_t& servo_ch) const return false; } -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F4) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F4) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) // allow for save and restore of pin settings bool GPIO::get_mode(uint8_t pin, uint32_t &mode) diff --git a/libraries/AP_HAL_ChibiOS/GPIO.h b/libraries/AP_HAL_ChibiOS/GPIO.h index ef575d71df..d467f1f0fd 100644 --- a/libraries/AP_HAL_ChibiOS/GPIO.h +++ b/libraries/AP_HAL_ChibiOS/GPIO.h @@ -94,7 +94,7 @@ public: */ static ioline_t resolve_alt_config(ioline_t base, PERIPH_TYPE ptype, uint8_t instance); -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F4) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F4) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) // allow for save and restore of pin settings bool get_mode(uint8_t pin, uint32_t &mode) override; void set_mode(uint8_t pin, uint32_t mode) override; diff --git a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp index e05a09883e..f046fdd497 100644 --- a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp +++ b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp @@ -76,6 +76,14 @@ I2CBus I2CDeviceManager::businfo[ARRAY_SIZE(I2CD)]; #define HAL_I2C_L4_400_TIMINGR 0x00702991 #endif +#ifndef HAL_I2C_L4PLUS_100_TIMINGR +#define HAL_I2C_L4PLUS_100_TIMINGR 0x307075B1 +#endif + +#ifndef HAL_I2C_L4PLUS_400_TIMINGR +#define HAL_I2C_L4PLUS_400_TIMINGR 0x00501BFF +#endif + #ifndef HAL_I2C_G4_100_TIMINGR #define HAL_I2C_G4_100_TIMINGR 0x60505F8C #endif @@ -223,6 +231,15 @@ I2CDeviceManager::I2CDeviceManager(void) businfo[i].i2ccfg.timingr = HAL_I2C_L4_400_TIMINGR; businfo[i].busclock = 400000; } +#elif defined(STM32L4PLUS) + if (businfo[i].busclock <= 100000) { + businfo[i].i2ccfg.timingr = HAL_I2C_L4PLUS_100_TIMINGR; + businfo[i].busclock = 100000; + } else { + businfo[i].i2ccfg.timingr = HAL_I2C_L4PLUS_400_TIMINGR; + businfo[i].busclock = 400000; + } + #elif defined(STM32G4) if (businfo[i].busclock <= 100000) { businfo[i].i2ccfg.timingr = HAL_I2C_G4_100_TIMINGR; @@ -255,7 +272,7 @@ I2CDevice::I2CDevice(uint8_t busnum, uint8_t address, uint32_t bus_clock, bool u asprintf(&pname, "I2C:%u:%02x", (unsigned)busnum, (unsigned)address); if (bus_clock < bus.busclock) { -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) if (bus_clock <= 100000) { bus.i2ccfg.timingr = HAL_I2C_F7_100_TIMINGR; bus.busclock = 100000; @@ -302,7 +319,7 @@ bool I2CDevice::transfer(const uint8_t *send, uint32_t send_len, return false; } -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) if (_use_smbus) { bus.i2ccfg.cr1 |= I2C_CR1_SMBHEN; } else { diff --git a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp index edbc6d6170..e1949d3959 100644 --- a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp +++ b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp @@ -38,6 +38,12 @@ using namespace ChibiOS; #define HAVE_USB_SERIAL #endif +#if defined (STM32L4PLUS) +#ifndef USART_CR1_RXNEIE +#define USART_CR1_RXNEIE USART_CR1_RXNEIE_RXFNEIE +#endif +#endif + #if HAL_WITH_IO_MCU extern ChibiOS::UARTDriver uart_io; #endif @@ -383,7 +389,7 @@ void UARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS) (void *)this); osalDbgAssert(rxdma, "stream alloc failed"); chSysUnlock(); -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) dmaStreamSetPeripheral(rxdma, &((SerialDriver*)sdef.serial)->usart->RDR); #else dmaStreamSetPeripheral(rxdma, &((SerialDriver*)sdef.serial)->usart->DR); @@ -482,7 +488,7 @@ void UARTDriver::dma_tx_allocate(Shared_DMA *ctx) (void *)this); osalDbgAssert(txdma, "stream alloc failed"); chSysUnlock(); -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) dmaStreamSetPeripheral(txdma, &((SerialDriver*)sdef.serial)->usart->TDR); #else dmaStreamSetPeripheral(txdma, &((SerialDriver*)sdef.serial)->usart->DR); @@ -531,7 +537,7 @@ void UARTDriver::rx_irq_cb(void* self) #if defined(STM32F7) || defined(STM32H7) //disable dma, triggering DMA transfer complete interrupt uart_drv->rxdma->stream->CR &= ~STM32_DMA_CR_EN; -#elif defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#elif defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) //disable dma, triggering DMA transfer complete interrupt dmaStreamDisable(uart_drv->rxdma); uart_drv->rxdma->channel->CCR &= ~STM32_DMA_CR_EN; @@ -1186,7 +1192,7 @@ void UARTDriver::_rx_timer_tick(void) //Check if DMA is enabled //if not, it might be because the DMA interrupt was silenced //let's handle that here so that we can continue receiving -#if defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) bool enabled = (rxdma->channel->CCR & STM32_DMA_CR_EN); #else bool enabled = (rxdma->stream->CR & STM32_DMA_CR_EN); @@ -1608,7 +1614,7 @@ bool UARTDriver::set_options(uint16_t options) // Check flow control, might have to disable if RTS line is gone set_flow_control(_flow_control); -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) // F7 has built-in support for inversion in all uarts ioline_t rx_line = (options & OPTION_SWAP)?atx_line:arx_line; ioline_t tx_line = (options & OPTION_SWAP)?arx_line:atx_line; diff --git a/libraries/AP_HAL_ChibiOS/hwdef/PixFlamingo/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/PixFlamingo/hwdef-bl.dat new file mode 100644 index 0000000000..e60cd01bbc --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/PixFlamingo/hwdef-bl.dat @@ -0,0 +1,48 @@ +# MCU class and specific type +MCU STM32L4xx STM32L4R5xx + +# board ID for firmware load +APJ_BOARD_ID 1090 + +USB_STRING_MANUFACTURER "Dheeran labs" +USB_STRING_PRODUCT "PixFlamingo" + +# crystal frequency +OSCILLATOR_HZ 24000000 + +# ChibiOS system timer +STM32_ST_USE_TIMER 5 + +APP_START_OFFSET_KB 8 + +# flash size +FLASH_SIZE_KB 2048 + +# order of UARTs (and USB) +SERIAL_ORDER OTG1 + +HAL_BOOTLOADER_TIMEOUT 1000 + +PE7 LED_BOOTLOADER OUTPUT LOW +PB2 LED_ACTIVITY OUTPUT +define HAL_LED_ON 1 + +PA9 VBUS INPUT + +PA11 USB_OTG_FS_DM OTG1 +PA12 USB_OTG_FS_DP OTG1 + +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# location of application code +FLASH_BOOTLOADER_LOAD_KB 20 + +# bootloader loads at start of flash +FLASH_RESERVE_START_KB 0 + +# Add CS pins to ensure they are high in bootloader +PD0 IMU1_CS CS +PE0 GYRO_CS CS +PB5 BARO_CS CS +PD7 MAG_CS CS diff --git a/libraries/AP_HAL_ChibiOS/hwdef/PixFlamingo/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/PixFlamingo/hwdef.dat new file mode 100644 index 0000000000..df4a3c1b1b --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/PixFlamingo/hwdef.dat @@ -0,0 +1,190 @@ + +# MCU class and specific type +MCU STM32L4xx STM32L4R5xx + +# board ID for firmware load +APJ_BOARD_ID 1090 + +# crystal frequency +OSCILLATOR_HZ 24000000 + +USB_STRING_MANUFACTURER "Dheeran labs" +USB_STRING_PRODUCT "PixFlamingo" + +# ChibiOS system timer +STM32_ST_USE_TIMER 5 +define CH_CFG_ST_RESOLUTION 16 + + +# flash size +FLASH_SIZE_KB 2048 + +FLASH_RESERVE_START_KB 28 +env OPTIMIZE -O2 + +# only one I2C bus +I2C_ORDER I2C2 + +# order of UARTs (and USB) +SERIAL_ORDER OTG1 USART3 USART1 UART4 + +PC1 BATT_VOLTAGE_SENS ADC1 +PC0 BATT_CURRENT_SENS ADC1 +PA4 VDD_5V_SENS ADC1 SCALE(2) + +# SPI1 is fram bus +PA5 SPI1_SCK SPI1 +PA6 SPI1_MISO SPI1 +PA7 SPI1_MOSI SPI1 + +PA9 VBUS INPUT + +PA11 USB_OTG_FS_DM OTG1 +PA12 USB_OTG_FS_DP OTG1 + +# USART3 serial3 telem1 +PC4 USART3_TX USART3 +PC5 USART3_RX USART3 +PB13 USART3_CTS USART3 +PB14 USART3_RTS USART3 + +# USART1 serial1 telem2 +PB6 USART1_TX USART1 +PB7 USART1_RX USART1 +PB4 USART1_CTS USART1 +PB3 USART1_RTS USART1 + + +# UART4 is GPS +PA0 UART4_TX UART4 +PA1 UART4_RX UART4 +define HAL_USE_SERIAL TRUE + +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# PWM output for buzzer + +PA15 BUZZER OUTPUT GPIO(80) LOW +define HAL_BUZZER_PIN 80 +define HAL_BUZZER_ON 1 +define HAL_BUZZER_OFF 0 + +PE2 BOOT1 INPUT +PD9 VDD_BRICK_VALID INPUT PULLDOWN + +PB10 I2C2_SCL I2C2 +PB11 I2C2_SDA I2C2 + +# SPI2 is for sensors +PD1 SPI2_SCK SPI2 +PD3 SPI2_MISO SPI2 +PD4 SPI2_MOSI SPI2 + +PB8 CAN1_RX CAN1 +PB9 CAN1_TX CAN1 + +PD0 IMU1_CS CS +PE0 GYRO_CS CS +PB5 BARO_CS CS +PD7 MAG_CS CS + +# This defines more ADC inputs. +PC2 AUX_POWER ADC1 SCALE(1) +PC3 AUX_ADC2 ADC1 SCALE(1) + +PD10 VBUS_VALID INPUT PULLDOWN +PB0 RSSI_IN ADC1 SCALE(1) +PE12 LED_SAFETY OUTPUT +PE15 SAFETY_IN INPUT PULLDOWN +PC14 VDD_PERIPH_EN OUTPUT HIGH + +#PD6 RCININT PULLDOWN LOW # also USART6_RX for serial RC +PC7 SBUS_INV OUTPUT LOW + +PC8 SDMMC1_D0 SDMMC1 +PC9 SDMMC1_D1 SDMMC1 +PC10 SDMMC1_D2 SDMMC1 +PC11 SDMMC1_D3 SDMMC1 +PC12 SDMMC1_CK SDMMC1 +PD2 SDMMC1_CMD SDMMC1 + + +PE5 IMU1_DRDY INPUT +PE4 MAG_DRDY INPUT +PE6 GYRO_DRDY INPUT + +PC13 VDD_SENSORS_EN OUTPUT HIGH + + +PC6 TIM8_CH1 TIM8 RCININT PULLDOWN LOW + +PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50) +PE13 TIM1_CH3 TIM1 PWM(2) GPIO(51) +PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52) +PE9 TIM1_CH1 TIM1 PWM(4) GPIO(53) +PD12 TIM4_CH1 TIM4 PWM(5) GPIO(54) +PD13 TIM4_CH2 TIM4 PWM(6) GPIO(55) +PD14 TIM4_CH3 TIM4 PWM(7) GPIO(56) +PD15 TIM4_CH4 TIM4 PWM(8) GPIO(57) +PB15 TIM15_CH2 TIM15 PWM(9) GPIO(59) + + +# SPI device table. + +SPIDEV icm42670 SPI2 DEVID1 IMU1_CS MODE3 2*MHZ 8*MHZ +SPIDEV ms5611 SPI1 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ +SPIDEV lis3mdl SPI2 DEVID5 MAG_CS MODE3 500*KHZ 500*KHZ +SPIDEV lsm9ds0_g SPI2 DEVID4 GYRO_CS MODE3 11*MHZ 11*MHZ + +# enable FAT filesystem +define HAL_OS_FATFS_IO 1 + + +define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" +define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" + + +# pixracer has 3 LEDs, Red, Green, Blue +define HAL_HAVE_PIXRACER_LED + +define HAL_GPIO_LED_ON 0 +define HAL_GPIO_LED_OFF 1 + +# LED setup for PixracerLED driver +PE8 LED_RED OUTPUT GPIO(0) +PE7 LED_GREEN OUTPUT GPIO(1) +PB2 LED_BLUE OUTPUT GPIO(2) + +define HAL_GPIO_A_LED_PIN 0 +define HAL_GPIO_B_LED_PIN 1 +define HAL_GPIO_C_LED_PIN 2 + +# battery setup +define HAL_BATT_MONITOR_DEFAULT 4 +define HAL_BATT_VOLT_PIN 2 +define HAL_BATT_CURR_PIN 1 +define HAL_BATT_VOLT_SCALE 10.1 +define HAL_BATT_CURR_SCALE 17.0 + +DMA_PRIORITY S* + +define STORAGE_FLASH_PAGE 5 +define HAL_STORAGE_SIZE 16384 + + +# two IMUs +IMU Invensensev3 SPI:icm42670 ROTATION_YAW_270 +IMU LSM9DS0 SPI:lsm9ds0_g SPI:lsm9ds0_am ROTATION_ROLL_180 ROTATION_ROLL_180_YAW_270 ROTATION_PITCH_180 + +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +COMPASS LIS3MDL SPI:lis3mdl false ROTATION_NONE + +# also probe all types of external I2C compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 + +define STM32_I2C_USE_DMA FALSE +# one barometer +BARO MS56XX SPI:ms5611 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/STM32CubeConf/L4R5-24MHz/L4R5-24MHz.ioc b/libraries/AP_HAL_ChibiOS/hwdef/STM32CubeConf/L4R5-24MHz/L4R5-24MHz.ioc new file mode 100755 index 0000000000..2246c38268 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/STM32CubeConf/L4R5-24MHz/L4R5-24MHz.ioc @@ -0,0 +1,490 @@ +#MicroXplorer Configuration settings - do not modify +ADC1.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_15 +ADC1.ClockPrescaler=ADC_CLOCK_ASYNC_DIV4 +ADC1.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,NbrOfConversionFlag,SingleDiff-0\#ChannelRegularConversion,master,ClockPrescaler +ADC1.NbrOfConversionFlag=1 +ADC1.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE +ADC1.Rank-0\#ChannelRegularConversion=1 +ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 +ADC1.SingleDiff-0\#ChannelRegularConversion=ADC_DIFFERENTIAL_ENDED +ADC1.master=1 +CAN1.BS1=CAN_BS1_7TQ +CAN1.CalculateBaudRate=833333 +CAN1.CalculateTimeBit=1200 +CAN1.CalculateTimeQuantum=133.33333333333334 +CAN1.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,BS1 +File.Version=6 +GPIO.groupedBy= +I2C2.CustomTiming=Enabled +I2C2.I2C_Speed_Mode=I2C_Standard +I2C2.IPParameters=Timing,I2C_Speed_Mode,Speed,CustomTiming +I2C2.Speed=100 +I2C2.Timing=0x00B03FDB +KeepUserPlacement=false +Mcu.CPN=STM32L4R5VIT6 +Mcu.Family=STM32L4 +Mcu.IP0=ADC1 +Mcu.IP1=CAN1 +Mcu.IP10=TIM1 +Mcu.IP11=TIM2 +Mcu.IP12=TIM3 +Mcu.IP13=TIM4 +Mcu.IP14=UART4 +Mcu.IP15=USART1 +Mcu.IP16=USART2 +Mcu.IP17=USART3 +Mcu.IP18=USB_OTG_FS +Mcu.IP2=I2C2 +Mcu.IP3=LPUART1 +Mcu.IP4=NVIC +Mcu.IP5=RCC +Mcu.IP6=SDMMC1 +Mcu.IP7=SPI1 +Mcu.IP8=SPI2 +Mcu.IP9=SYS +Mcu.IPNb=19 +Mcu.Name=STM32L4R5V(G-I)Tx +Mcu.Package=LQFP100 +Mcu.Pin0=PE3 +Mcu.Pin1=PE4 +Mcu.Pin10=PC2 +Mcu.Pin11=PC3 +Mcu.Pin12=PA0 +Mcu.Pin13=PA1 +Mcu.Pin14=PA2 +Mcu.Pin15=PA3 +Mcu.Pin16=PA4 +Mcu.Pin17=PA5 +Mcu.Pin18=PA6 +Mcu.Pin19=PA7 +Mcu.Pin2=PE5 +Mcu.Pin20=PC4 +Mcu.Pin21=PC5 +Mcu.Pin22=PB0 +Mcu.Pin23=PB1 +Mcu.Pin24=PB2 +Mcu.Pin25=PE7 +Mcu.Pin26=PE8 +Mcu.Pin27=PE9 +Mcu.Pin28=PE10 +Mcu.Pin29=PE11 +Mcu.Pin3=PE6 +Mcu.Pin30=PE13 +Mcu.Pin31=PE14 +Mcu.Pin32=PB10 +Mcu.Pin33=PB11 +Mcu.Pin34=PB13 +Mcu.Pin35=PB14 +Mcu.Pin36=PB15 +Mcu.Pin37=PD9 +Mcu.Pin38=PD10 +Mcu.Pin39=PD12 +Mcu.Pin4=PC13 +Mcu.Pin40=PD13 +Mcu.Pin41=PD14 +Mcu.Pin42=PD15 +Mcu.Pin43=PC6 +Mcu.Pin44=PC7 +Mcu.Pin45=PC8 +Mcu.Pin46=PC9 +Mcu.Pin47=PA9 +Mcu.Pin48=PA10 +Mcu.Pin49=PA11 +Mcu.Pin5=PC14-OSC32_IN (PC14) +Mcu.Pin50=PA12 +Mcu.Pin51=PA13 (JTMS/SWDIO) +Mcu.Pin52=PA14 (JTCK/SWCLK) +Mcu.Pin53=PA15 (JTDI) +Mcu.Pin54=PC10 +Mcu.Pin55=PC11 +Mcu.Pin56=PC12 +Mcu.Pin57=PD0 +Mcu.Pin58=PD1 +Mcu.Pin59=PD2 +Mcu.Pin6=PH0-OSC_IN (PH0) +Mcu.Pin60=PD3 +Mcu.Pin61=PD4 +Mcu.Pin62=PD5 +Mcu.Pin63=PD6 +Mcu.Pin64=PD7 +Mcu.Pin65=PB3 (JTDO/TRACESWO) +Mcu.Pin66=PB4 (NJTRST) +Mcu.Pin67=PB5 +Mcu.Pin68=PB6 +Mcu.Pin69=PB7 +Mcu.Pin7=PH1-OSC_OUT (PH1) +Mcu.Pin70=PB8 +Mcu.Pin71=PB9 +Mcu.Pin72=PE0 +Mcu.Pin73=VP_SYS_VS_Systick +Mcu.Pin8=PC0 +Mcu.Pin9=PC1 +Mcu.PinsNb=74 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32L4R5VITx +MxCube.Version=6.6.1 +MxDb.Version=DB.6.0.60 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +PA0.Locked=true +PA0.Mode=Asynchronous +PA0.Signal=UART4_TX +PA1.Locked=true +PA1.Mode=Asynchronous +PA1.Signal=UART4_RX +PA10.Mode=OTG/Dual_Role_Device +PA10.Signal=USB_OTG_FS_ID +PA11.Locked=true +PA11.Mode=OTG/Dual_Role_Device +PA11.Signal=USB_OTG_FS_DM +PA12.Locked=true +PA12.Mode=OTG/Dual_Role_Device +PA12.Signal=USB_OTG_FS_DP +PA13\ (JTMS/SWDIO).Locked=true +PA13\ (JTMS/SWDIO).Signal=SYS_JTMS-SWDIO +PA14\ (JTCK/SWCLK).Locked=true +PA14\ (JTCK/SWCLK).Signal=SYS_JTCK-SWCLK +PA15\ (JTDI).Locked=true +PA15\ (JTDI).Signal=S_TIM2_CH1 +PA2.Locked=true +PA2.Mode=Asynchronous +PA2.Signal=LPUART1_TX +PA3.Locked=true +PA3.Mode=Asynchronous +PA3.Signal=LPUART1_RX +PA4.Locked=true +PA4.Signal=GPIO_Output +PA5.Locked=true +PA5.Mode=Full_Duplex_Master +PA5.Signal=SPI1_SCK +PA6.Locked=true +PA6.Mode=Full_Duplex_Master +PA6.Signal=SPI1_MISO +PA7.Locked=true +PA7.Mode=Full_Duplex_Master +PA7.Signal=SPI1_MOSI +PA9.Locked=true +PA9.Mode=Activate_VBUS +PA9.Signal=USB_OTG_FS_VBUS +PB0.Locked=true +PB0.Signal=ADCx_IN15 +PB1.Signal=ADCx_IN16 +PB10.Locked=true +PB10.Mode=I2C +PB10.Signal=I2C2_SCL +PB11.Locked=true +PB11.Mode=I2C +PB11.Signal=I2C2_SDA +PB13.Locked=true +PB13.Mode=CTS_RTS +PB13.Signal=USART3_CTS +PB14.Locked=true +PB14.Mode=CTS_RTS +PB14.Signal=USART3_RTS +PB15.Locked=true +PB15.Signal=S_TIM15_CH2 +PB2.Locked=true +PB2.Signal=GPIO_Output +PB3\ (JTDO/TRACESWO).Locked=true +PB3\ (JTDO/TRACESWO).Mode=CTS_RTS +PB3\ (JTDO/TRACESWO).Signal=USART1_RTS +PB4\ (NJTRST).Locked=true +PB4\ (NJTRST).Mode=CTS_RTS +PB4\ (NJTRST).Signal=USART1_CTS +PB5.Locked=true +PB5.Signal=GPIO_Output +PB6.Locked=true +PB6.Mode=Asynchronous +PB6.Signal=USART1_TX +PB7.Locked=true +PB7.Mode=Asynchronous +PB7.Signal=USART1_RX +PB8.Locked=true +PB8.Mode=CAN_Activate +PB8.Signal=CAN1_RX +PB9.Locked=true +PB9.Mode=CAN_Activate +PB9.Signal=CAN1_TX +PC0.Signal=ADCx_IN1 +PC1.Signal=ADCx_IN2 +PC10.Locked=true +PC10.Mode=SD_4_bits_Wide_bus +PC10.Signal=SDMMC1_D2 +PC11.Locked=true +PC11.Mode=SD_4_bits_Wide_bus +PC11.Signal=SDMMC1_D3 +PC12.Locked=true +PC12.Mode=SD_4_bits_Wide_bus +PC12.Signal=SDMMC1_CK +PC13.Locked=true +PC13.Signal=GPIO_Output +PC14-OSC32_IN\ (PC14).Locked=true +PC14-OSC32_IN\ (PC14).Signal=GPIO_Output +PC2.Locked=true +PC2.Signal=ADCx_IN3 +PC3.Locked=true +PC3.Signal=ADCx_IN4 +PC4.Locked=true +PC4.Mode=Asynchronous +PC4.Signal=USART3_TX +PC5.Locked=true +PC5.Mode=Asynchronous +PC5.Signal=USART3_RX +PC6.Locked=true +PC6.Signal=S_TIM8_CH1 +PC7.Locked=true +PC7.Signal=GPIO_Output +PC8.Locked=true +PC8.Mode=SD_4_bits_Wide_bus +PC8.Signal=SDMMC1_D0 +PC9.Locked=true +PC9.Mode=SD_4_bits_Wide_bus +PC9.Signal=SDMMC1_D1 +PD0.Locked=true +PD0.Signal=GPIO_Output +PD1.Locked=true +PD1.Mode=Full_Duplex_Master +PD1.Signal=SPI2_SCK +PD10.Locked=true +PD10.Signal=GPIO_Output +PD12.Locked=true +PD12.Signal=S_TIM4_CH1 +PD13.Locked=true +PD13.Signal=S_TIM4_CH2 +PD14.Locked=true +PD14.Signal=S_TIM4_CH3 +PD15.Locked=true +PD15.Signal=S_TIM4_CH4 +PD2.Locked=true +PD2.Mode=SD_4_bits_Wide_bus +PD2.Signal=SDMMC1_CMD +PD3.Locked=true +PD3.Mode=Full_Duplex_Master +PD3.Signal=SPI2_MISO +PD4.Locked=true +PD4.Mode=Full_Duplex_Master +PD4.Signal=SPI2_MOSI +PD5.Locked=true +PD5.Mode=Asynchronous +PD5.Signal=USART2_TX +PD6.Locked=true +PD6.Mode=Asynchronous +PD6.Signal=USART2_RX +PD7.Locked=true +PD7.Signal=GPIO_Output +PD9.Locked=true +PD9.Signal=GPIO_Output +PE0.Locked=true +PE0.Signal=GPIO_Output +PE10.Locked=true +PE10.Signal=GPIO_Output +PE11.Locked=true +PE11.Signal=S_TIM1_CH2 +PE13.Locked=true +PE13.Signal=S_TIM1_CH3 +PE14.Locked=true +PE14.Signal=S_TIM1_CH4 +PE3.Signal=S_TIM3_CH1 +PE4.Locked=true +PE4.Signal=S_TIM3_CH2 +PE5.Signal=S_TIM3_CH3 +PE6.Signal=S_TIM3_CH4 +PE7.Locked=true +PE7.Signal=GPIO_Output +PE8.Locked=true +PE8.Signal=GPIO_Output +PE9.Locked=true +PE9.Signal=S_TIM1_CH1 +PH0-OSC_IN\ (PH0).Mode=HSE-External-Oscillator +PH0-OSC_IN\ (PH0).Signal=RCC_OSC_IN +PH1-OSC_OUT\ (PH1).Mode=HSE-External-Oscillator +PH1-OSC_OUT\ (PH1).Signal=RCC_OSC_OUT +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=false +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32L4R5VITx +ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.17.2 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=0 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=flamingo_written.ioc +ProjectManager.ProjectName=flamingo_written +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=EWARM +ProjectManager.ToolChainLocation= +ProjectManager.UnderRoot=false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN1_Init-CAN1-false-HAL-true,4-MX_TIM3_Init-TIM3-false-HAL-true,5-MX_ADC1_Init-ADC1-false-HAL-true,6-MX_I2C2_Init-I2C2-false-HAL-true,7-MX_LPUART1_UART_Init-LPUART1-false-HAL-true,8-MX_UART4_Init-UART4-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true,10-MX_USART2_UART_Init-USART2-false-HAL-true,11-MX_USART3_UART_Init-USART3-false-HAL-true,12-MX_SDMMC1_SD_Init-SDMMC1-false-HAL-true,13-MX_SPI1_Init-SPI1-false-HAL-true,14-MX_SPI2_Init-SPI2-false-HAL-true,15-MX_TIM1_Init-TIM1-false-HAL-true,16-MX_TIM2_Init-TIM2-false-HAL-true,17-MX_TIM4_Init-TIM4-false-HAL-true,18-MX_USB_OTG_FS_USB_Init-USB_OTG_FS-false-HAL-true +RCC.ADCFreq_Value=48000000 +RCC.AHBFreq_Value=120000000 +RCC.APB1Freq_Value=120000000 +RCC.APB1TimFreq_Value=120000000 +RCC.APB2Freq_Value=120000000 +RCC.APB2TimFreq_Value=120000000 +RCC.CRSFreq_Value=48000000 +RCC.CortexFreq_Value=120000000 +RCC.DFSDMFreq_Value=120000000 +RCC.FCLKCortexFreq_Value=120000000 +RCC.FLatency-AdvancedSettings=FLASH_LATENCY_5 +RCC.FamilyName=M +RCC.HCLKFreq_Value=120000000 +RCC.HSE_VALUE=24000000 +RCC.HSI48_VALUE=48000000 +RCC.HSI_VALUE=16000000 +RCC.I2C1Freq_Value=120000000 +RCC.I2C2Freq_Value=120000000 +RCC.I2C3Freq_Value=120000000 +RCC.I2C4Freq_Value=120000000 +RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CRSFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FLatency-AdvancedSettings,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,LCDTFTFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1CLockSelection,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,OCTOSPIMFreq_Value,PLLM1,PLLM2,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2QoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PWREXT_OverDrive,PWRFreq_Value,RCC_TIM_PRescaler_Selection,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4CLockSelection,UART4Freq_Value,UART5Freq_Value,USART1CLockSelection,USART1Freq_Value,USART2CLockSelection,USART2Freq_Value,USART3CLockSelection,USART3Freq_Value,USBFreq_Value,VCOInput2Freq_Value,VCOInput3Freq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value +RCC.LCDTFTFreq_Value=48000000 +RCC.LPTIM1Freq_Value=120000000 +RCC.LPTIM2Freq_Value=120000000 +RCC.LPUART1CLockSelection=RCC_LPUART1CLKSOURCE_SYSCLK +RCC.LPUART1Freq_Value=120000000 +RCC.LSCOPinFreq_Value=32000 +RCC.LSE_VALUE=32768 +RCC.LSI_VALUE=32000 +RCC.MCO1PinFreq_Value=120000000 +RCC.MSI_VALUE=4000000 +RCC.OCTOSPIMFreq_Value=120000000 +RCC.PLLM1=3 +RCC.PLLM2=3 +RCC.PLLN=30 +RCC.PLLPoutputFreq_Value=120000000 +RCC.PLLQoutputFreq_Value=120000000 +RCC.PLLRCLKFreq_Value=120000000 +RCC.PLLSAI1N=12 +RCC.PLLSAI1PoutputFreq_Value=48000000 +RCC.PLLSAI1QoutputFreq_Value=48000000 +RCC.PLLSAI1RoutputFreq_Value=48000000 +RCC.PLLSAI2PoutputFreq_Value=96000000 +RCC.PLLSAI2QoutputFreq_Value=96000000 +RCC.PLLSAI2RoutputFreq_Value=96000000 +RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE +RCC.PWREXT_OverDrive=PWREXT_OverDrive_DESACTIVATED +RCC.PWRFreq_Value=120000000 +RCC.RCC_TIM_PRescaler_Selection=RCC_TIMPRES_DESACTIVATED +RCC.RNGFreq_Value=48000000 +RCC.SAI1Freq_Value=48000000 +RCC.SAI2Freq_Value=48000000 +RCC.SDMMCFreq_Value=120000000 +RCC.SYSCLKFreq_VALUE=120000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.UART4CLockSelection=RCC_UART4CLKSOURCE_SYSCLK +RCC.UART4Freq_Value=120000000 +RCC.UART5Freq_Value=120000000 +RCC.USART1CLockSelection=RCC_USART1CLKSOURCE_SYSCLK +RCC.USART1Freq_Value=120000000 +RCC.USART2CLockSelection=RCC_USART2CLKSOURCE_SYSCLK +RCC.USART2Freq_Value=120000000 +RCC.USART3CLockSelection=RCC_USART3CLKSOURCE_SYSCLK +RCC.USART3Freq_Value=120000000 +RCC.USBFreq_Value=48000000 +RCC.VCOInput2Freq_Value=8000000 +RCC.VCOInput3Freq_Value=24000000 +RCC.VCOInputFreq_Value=8000000 +RCC.VCOOutputFreq_Value=240000000 +RCC.VCOSAI1OutputFreq_Value=96000000 +RCC.VCOSAI2OutputFreq_Value=192000000 +SH.ADCx_IN1.0=ADC1_IN1,IN1-Single-Ended +SH.ADCx_IN1.ConfNb=1 +SH.ADCx_IN15.0=ADC1_IN15,IN15-Differential +SH.ADCx_IN15.ConfNb=1 +SH.ADCx_IN16.0=ADC1_IN16,IN15-Differential +SH.ADCx_IN16.ConfNb=1 +SH.ADCx_IN2.0=ADC1_IN2,IN2-Single-Ended +SH.ADCx_IN2.ConfNb=1 +SH.ADCx_IN3.0=ADC1_IN3,IN3-Single-Ended +SH.ADCx_IN3.ConfNb=1 +SH.ADCx_IN4.0=ADC1_IN4 +SH.ADCx_IN4.ConfNb=1 +SH.S_TIM15_CH2.0=TIM15_CH2 +SH.S_TIM15_CH2.ConfNb=1 +SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1 +SH.S_TIM1_CH1.ConfNb=1 +SH.S_TIM1_CH2.0=TIM1_CH2,PWM Generation2 CH2 +SH.S_TIM1_CH2.ConfNb=1 +SH.S_TIM1_CH3.0=TIM1_CH3,PWM Generation3 CH3 +SH.S_TIM1_CH3.ConfNb=1 +SH.S_TIM1_CH4.0=TIM1_CH4,PWM Generation4 CH4 +SH.S_TIM1_CH4.ConfNb=1 +SH.S_TIM2_CH1.0=TIM2_CH1,PWM Generation1 CH1 +SH.S_TIM2_CH1.ConfNb=1 +SH.S_TIM3_CH1.0=TIM3_CH1,Input_Capture1_from_TI1 +SH.S_TIM3_CH1.ConfNb=1 +SH.S_TIM3_CH2.0=TIM3_CH2,Input_Capture2_from_TI2 +SH.S_TIM3_CH2.ConfNb=1 +SH.S_TIM3_CH3.0=TIM3_CH3,Input_Capture3_from_TI3 +SH.S_TIM3_CH3.ConfNb=1 +SH.S_TIM3_CH4.0=TIM3_CH4,Input_Capture4_from_TI4 +SH.S_TIM3_CH4.ConfNb=1 +SH.S_TIM4_CH1.0=TIM4_CH1,PWM Generation1 CH1 +SH.S_TIM4_CH1.ConfNb=1 +SH.S_TIM4_CH2.0=TIM4_CH2,PWM Generation2 CH2 +SH.S_TIM4_CH2.ConfNb=1 +SH.S_TIM4_CH3.0=TIM4_CH3,PWM Generation3 CH3 +SH.S_TIM4_CH3.ConfNb=1 +SH.S_TIM4_CH4.0=TIM4_CH4,PWM Generation4 CH4 +SH.S_TIM4_CH4.ConfNb=1 +SH.S_TIM8_CH1.0=TIM8_CH1 +SH.S_TIM8_CH1.ConfNb=1 +SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_2 +SPI1.CalculateBaudRate=60.0 MBits/s +SPI1.Direction=SPI_DIRECTION_2LINES +SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,BaudRatePrescaler +SPI1.Mode=SPI_MODE_MASTER +SPI1.VirtualType=VM_MASTER +SPI2.CalculateBaudRate=60.0 MBits/s +SPI2.Direction=SPI_DIRECTION_2LINES +SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +SPI2.Mode=SPI_MODE_MASTER +SPI2.VirtualType=VM_MASTER +TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM1.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 +TIM1.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 +TIM1.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 +TIM1.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4 +TIM2.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM2.IPParameters=Channel-PWM Generation1 CH1 +TIM3.Channel-Input_Capture1_from_TI1=TIM_CHANNEL_1 +TIM3.Channel-Input_Capture2_from_TI2=TIM_CHANNEL_2 +TIM3.Channel-Input_Capture3_from_TI3=TIM_CHANNEL_3 +TIM3.Channel-Input_Capture4_from_TI4=TIM_CHANNEL_4 +TIM3.IPParameters=Channel-Input_Capture1_from_TI1,Channel-Input_Capture3_from_TI3,Channel-Input_Capture4_from_TI4,Channel-Input_Capture2_from_TI2 +TIM4.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM4.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 +TIM4.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 +TIM4.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 +TIM4.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4 +USART1.IPParameters=VirtualMode-Asynchronous +USART1.VirtualMode-Asynchronous=VM_ASYNC +USART2.IPParameters=VirtualMode-Asynchronous +USART2.VirtualMode-Asynchronous=VM_ASYNC +USART3.IPParameters=VirtualMode-Asynchronous +USART3.VirtualMode-Asynchronous=VM_ASYNC +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +board=custom diff --git a/libraries/AP_HAL_ChibiOS/hwdef/STM32CubeConf/L4R5-8MHz/L4R5-8MHz.ioc b/libraries/AP_HAL_ChibiOS/hwdef/STM32CubeConf/L4R5-8MHz/L4R5-8MHz.ioc new file mode 100755 index 0000000000..d72885cfea --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/STM32CubeConf/L4R5-8MHz/L4R5-8MHz.ioc @@ -0,0 +1,470 @@ +#MicroXplorer Configuration settings - do not modify +ADC1.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_15 +ADC1.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,NbrOfConversionFlag,SingleDiff-0\#ChannelRegularConversion,master +ADC1.NbrOfConversionFlag=1 +ADC1.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE +ADC1.Rank-0\#ChannelRegularConversion=1 +ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 +ADC1.SingleDiff-0\#ChannelRegularConversion=ADC_DIFFERENTIAL_ENDED +ADC1.master=1 +CAN1.BS1=CAN_BS1_1TQ +CAN1.BS2=CAN_BS2_1TQ +CAN1.CalculateBaudRate=625000 +CAN1.CalculateTimeBit=1600 +CAN1.CalculateTimeQuantum=533.3333333333334 +CAN1.IPParameters=CalculateTimeQuantum,CalculateTimeBit,CalculateBaudRate,BS1,BS2 +File.Version=6 +GPIO.groupedBy= +I2C2.IPParameters=Timing +I2C2.Timing=0x007074AF +KeepUserPlacement=false +Mcu.CPN=STM32L4R5VIT6 +Mcu.Family=STM32L4 +Mcu.IP0=ADC1 +Mcu.IP1=CAN1 +Mcu.IP10=TIM1 +Mcu.IP11=TIM2 +Mcu.IP12=TIM3 +Mcu.IP13=TIM4 +Mcu.IP14=UART4 +Mcu.IP15=USART1 +Mcu.IP16=USART2 +Mcu.IP17=USART3 +Mcu.IP18=USB_OTG_FS +Mcu.IP2=I2C2 +Mcu.IP3=LPUART1 +Mcu.IP4=NVIC +Mcu.IP5=RCC +Mcu.IP6=SDMMC1 +Mcu.IP7=SPI1 +Mcu.IP8=SPI2 +Mcu.IP9=SYS +Mcu.IPNb=19 +Mcu.Name=STM32L4R5V(G-I)Tx +Mcu.Package=LQFP100 +Mcu.Pin0=PE3 +Mcu.Pin1=PE4 +Mcu.Pin10=PA0 +Mcu.Pin11=PA1 +Mcu.Pin12=PA2 +Mcu.Pin13=PA3 +Mcu.Pin14=PA4 +Mcu.Pin15=PA5 +Mcu.Pin16=PA6 +Mcu.Pin17=PA7 +Mcu.Pin18=PC4 +Mcu.Pin19=PC5 +Mcu.Pin2=PE5 +Mcu.Pin20=PB0 +Mcu.Pin21=PB1 +Mcu.Pin22=PB2 +Mcu.Pin23=PE7 +Mcu.Pin24=PE8 +Mcu.Pin25=PE9 +Mcu.Pin26=PE10 +Mcu.Pin27=PE11 +Mcu.Pin28=PE13 +Mcu.Pin29=PE14 +Mcu.Pin3=PE6 +Mcu.Pin30=PB10 +Mcu.Pin31=PB11 +Mcu.Pin32=PB13 +Mcu.Pin33=PB14 +Mcu.Pin34=PB15 +Mcu.Pin35=PD9 +Mcu.Pin36=PD10 +Mcu.Pin37=PD12 +Mcu.Pin38=PD13 +Mcu.Pin39=PD14 +Mcu.Pin4=PC13 +Mcu.Pin40=PD15 +Mcu.Pin41=PC6 +Mcu.Pin42=PC7 +Mcu.Pin43=PC8 +Mcu.Pin44=PC9 +Mcu.Pin45=PA9 +Mcu.Pin46=PA10 +Mcu.Pin47=PA11 +Mcu.Pin48=PA12 +Mcu.Pin49=PA13 (JTMS/SWDIO) +Mcu.Pin5=PC14-OSC32_IN (PC14) +Mcu.Pin50=PA14 (JTCK/SWCLK) +Mcu.Pin51=PA15 (JTDI) +Mcu.Pin52=PC10 +Mcu.Pin53=PC11 +Mcu.Pin54=PC12 +Mcu.Pin55=PD0 +Mcu.Pin56=PD1 +Mcu.Pin57=PD2 +Mcu.Pin58=PD3 +Mcu.Pin59=PD4 +Mcu.Pin6=PH0-OSC_IN (PH0) +Mcu.Pin60=PD5 +Mcu.Pin61=PD6 +Mcu.Pin62=PD7 +Mcu.Pin63=PB3 (JTDO/TRACESWO) +Mcu.Pin64=PB4 (NJTRST) +Mcu.Pin65=PB5 +Mcu.Pin66=PB6 +Mcu.Pin67=PB7 +Mcu.Pin68=PB8 +Mcu.Pin69=PB9 +Mcu.Pin7=PH1-OSC_OUT (PH1) +Mcu.Pin70=PE0 +Mcu.Pin71=VP_SYS_VS_Systick +Mcu.Pin8=PC2 +Mcu.Pin9=PC3 +Mcu.PinsNb=72 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32L4R5VITx +MxCube.Version=6.6.1 +MxDb.Version=DB.6.0.60 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +PA0.Locked=true +PA0.Mode=Asynchronous +PA0.Signal=UART4_TX +PA1.Locked=true +PA1.Mode=Asynchronous +PA1.Signal=UART4_RX +PA10.Mode=OTG/Dual_Role_Device +PA10.Signal=USB_OTG_FS_ID +PA11.Locked=true +PA11.Mode=OTG/Dual_Role_Device +PA11.Signal=USB_OTG_FS_DM +PA12.Locked=true +PA12.Mode=OTG/Dual_Role_Device +PA12.Signal=USB_OTG_FS_DP +PA13\ (JTMS/SWDIO).Locked=true +PA13\ (JTMS/SWDIO).Signal=SYS_JTMS-SWDIO +PA14\ (JTCK/SWCLK).Locked=true +PA14\ (JTCK/SWCLK).Signal=SYS_JTCK-SWCLK +PA15\ (JTDI).Locked=true +PA15\ (JTDI).Signal=S_TIM2_CH1 +PA2.Locked=true +PA2.Mode=Asynchronous +PA2.Signal=LPUART1_TX +PA3.Locked=true +PA3.Mode=Asynchronous +PA3.Signal=LPUART1_RX +PA4.Locked=true +PA4.Signal=GPIO_Output +PA5.Locked=true +PA5.Mode=Full_Duplex_Master +PA5.Signal=SPI1_SCK +PA6.Locked=true +PA6.Mode=Full_Duplex_Master +PA6.Signal=SPI1_MISO +PA7.Locked=true +PA7.Mode=Full_Duplex_Master +PA7.Signal=SPI1_MOSI +PA9.Locked=true +PA9.Mode=Activate_VBUS +PA9.Signal=USB_OTG_FS_VBUS +PB0.Locked=true +PB0.Signal=ADCx_IN15 +PB1.Signal=ADCx_IN16 +PB10.Locked=true +PB10.Mode=I2C +PB10.Signal=I2C2_SCL +PB11.Locked=true +PB11.Mode=I2C +PB11.Signal=I2C2_SDA +PB13.Locked=true +PB13.Mode=CTS_RTS +PB13.Signal=USART3_CTS +PB14.Locked=true +PB14.Mode=CTS_RTS +PB14.Signal=USART3_RTS +PB15.Locked=true +PB15.Signal=S_TIM15_CH2 +PB2.Locked=true +PB2.Signal=GPIO_Output +PB3\ (JTDO/TRACESWO).Locked=true +PB3\ (JTDO/TRACESWO).Mode=CTS_RTS +PB3\ (JTDO/TRACESWO).Signal=USART1_RTS +PB4\ (NJTRST).Locked=true +PB4\ (NJTRST).Mode=CTS_RTS +PB4\ (NJTRST).Signal=USART1_CTS +PB5.Locked=true +PB5.Signal=GPIO_Output +PB6.Locked=true +PB6.Mode=Asynchronous +PB6.Signal=USART1_TX +PB7.Locked=true +PB7.Mode=Asynchronous +PB7.Signal=USART1_RX +PB8.Locked=true +PB8.Mode=CAN_Activate +PB8.Signal=CAN1_RX +PB9.Locked=true +PB9.Mode=CAN_Activate +PB9.Signal=CAN1_TX +PC10.Locked=true +PC10.Mode=SD_4_bits_Wide_bus +PC10.Signal=SDMMC1_D2 +PC11.Locked=true +PC11.Mode=SD_4_bits_Wide_bus +PC11.Signal=SDMMC1_D3 +PC12.Locked=true +PC12.Mode=SD_4_bits_Wide_bus +PC12.Signal=SDMMC1_CK +PC13.Locked=true +PC13.Signal=GPIO_Output +PC14-OSC32_IN\ (PC14).Locked=true +PC14-OSC32_IN\ (PC14).Signal=GPIO_Output +PC2.Locked=true +PC2.Signal=ADCx_IN3 +PC3.Locked=true +PC3.Signal=ADCx_IN4 +PC4.Locked=true +PC4.Mode=Asynchronous +PC4.Signal=USART3_TX +PC5.Locked=true +PC5.Mode=Asynchronous +PC5.Signal=USART3_RX +PC6.Locked=true +PC6.Signal=S_TIM8_CH1 +PC7.Locked=true +PC7.Signal=GPIO_Output +PC8.Locked=true +PC8.Mode=SD_4_bits_Wide_bus +PC8.Signal=SDMMC1_D0 +PC9.Locked=true +PC9.Mode=SD_4_bits_Wide_bus +PC9.Signal=SDMMC1_D1 +PD0.Locked=true +PD0.Signal=GPIO_Output +PD1.Locked=true +PD1.Mode=Full_Duplex_Master +PD1.Signal=SPI2_SCK +PD10.Locked=true +PD10.Signal=GPIO_Output +PD12.Locked=true +PD12.Signal=S_TIM4_CH1 +PD13.Locked=true +PD13.Signal=S_TIM4_CH2 +PD14.Locked=true +PD14.Signal=S_TIM4_CH3 +PD15.Locked=true +PD15.Signal=S_TIM4_CH4 +PD2.Locked=true +PD2.Mode=SD_4_bits_Wide_bus +PD2.Signal=SDMMC1_CMD +PD3.Locked=true +PD3.Mode=Full_Duplex_Master +PD3.Signal=SPI2_MISO +PD4.Locked=true +PD4.Mode=Full_Duplex_Master +PD4.Signal=SPI2_MOSI +PD5.Locked=true +PD5.Mode=Asynchronous +PD5.Signal=USART2_TX +PD6.Locked=true +PD6.Mode=Asynchronous +PD6.Signal=USART2_RX +PD7.Locked=true +PD7.Signal=GPIO_Output +PD9.Locked=true +PD9.Signal=GPIO_Output +PE0.Locked=true +PE0.Signal=GPIO_Output +PE10.Locked=true +PE10.Signal=GPIO_Output +PE11.Locked=true +PE11.Signal=S_TIM1_CH2 +PE13.Locked=true +PE13.Signal=S_TIM1_CH3 +PE14.Locked=true +PE14.Signal=S_TIM1_CH4 +PE3.Signal=S_TIM3_CH1 +PE4.Locked=true +PE4.Signal=S_TIM3_CH2 +PE5.Signal=S_TIM3_CH3 +PE6.Signal=S_TIM3_CH4 +PE7.Locked=true +PE7.Signal=GPIO_Output +PE8.Locked=true +PE8.Signal=GPIO_Output +PE9.Locked=true +PE9.Signal=S_TIM1_CH1 +PH0-OSC_IN\ (PH0).Mode=HSE-External-Oscillator +PH0-OSC_IN\ (PH0).Signal=RCC_OSC_IN +PH1-OSC_OUT\ (PH1).Mode=HSE-External-Oscillator +PH1-OSC_OUT\ (PH1).Signal=RCC_OSC_OUT +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=false +ProjectManager.CustomerFirmwarePackage= +ProjectManager.DefaultFWLocation=true +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32L4R5VITx +ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.17.2 +ProjectManager.FreePins=false +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=0 +ProjectManager.MainLocation=Core/Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=flamingo_written.ioc +ProjectManager.ProjectName=flamingo_written +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=EWARM +ProjectManager.ToolChainLocation= +ProjectManager.UnderRoot=false +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_CAN1_Init-CAN1-false-HAL-true,4-MX_TIM3_Init-TIM3-false-HAL-true,5-MX_ADC1_Init-ADC1-false-HAL-true,6-MX_I2C2_Init-I2C2-false-HAL-true,7-MX_LPUART1_UART_Init-LPUART1-false-HAL-true,8-MX_UART4_Init-UART4-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true,10-MX_USART2_UART_Init-USART2-false-HAL-true,11-MX_USART3_UART_Init-USART3-false-HAL-true,12-MX_SDMMC1_SD_Init-SDMMC1-false-HAL-true,13-MX_SPI1_Init-SPI1-false-HAL-true,14-MX_SPI2_Init-SPI2-false-HAL-true,15-MX_TIM1_Init-TIM1-false-HAL-true,16-MX_TIM2_Init-TIM2-false-HAL-true,17-MX_TIM4_Init-TIM4-false-HAL-true,18-MX_USB_OTG_FS_HCD_Init-USB_OTG_FS-false-HAL-true +RCC.ADCFreq_Value=48000000 +RCC.AHBFreq_Value=32000000 +RCC.APB1CLKDivider=RCC_HCLK_DIV4 +RCC.APB1Freq_Value=8000000 +RCC.APB1TimFreq_Value=16000000 +RCC.APB2Freq_Value=32000000 +RCC.APB2TimFreq_Value=32000000 +RCC.CRSFreq_Value=48000000 +RCC.CortexFreq_Value=32000000 +RCC.DFSDMFreq_Value=8000000 +RCC.FCLKCortexFreq_Value=32000000 +RCC.FamilyName=M +RCC.HCLKFreq_Value=32000000 +RCC.HSE_VALUE=8000000 +RCC.HSI48_VALUE=48000000 +RCC.HSI_VALUE=16000000 +RCC.I2C1Freq_Value=8000000 +RCC.I2C2Freq_Value=8000000 +RCC.I2C3Freq_Value=8000000 +RCC.I2C4Freq_Value=8000000 +RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CRSFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,LCDTFTFreq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,OCTOSPIMFreq_Value,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2QoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PWREXT_OverDrive,PWRFreq_Value,RCC_TIM_PRescaler_Selection,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInput2Freq_Value,VCOInput3Freq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value +RCC.LCDTFTFreq_Value=16000000 +RCC.LPTIM1Freq_Value=8000000 +RCC.LPTIM2Freq_Value=8000000 +RCC.LPUART1Freq_Value=8000000 +RCC.LSCOPinFreq_Value=32000 +RCC.LSE_VALUE=32768 +RCC.LSI_VALUE=32000 +RCC.MCO1PinFreq_Value=32000000 +RCC.MSI_VALUE=4000000 +RCC.OCTOSPIMFreq_Value=32000000 +RCC.PLLPoutputFreq_Value=32000000 +RCC.PLLQoutputFreq_Value=32000000 +RCC.PLLRCLKFreq_Value=32000000 +RCC.PLLSAI1N=12 +RCC.PLLSAI1PoutputFreq_Value=48000000 +RCC.PLLSAI1QoutputFreq_Value=48000000 +RCC.PLLSAI1RoutputFreq_Value=48000000 +RCC.PLLSAI2PoutputFreq_Value=32000000 +RCC.PLLSAI2QoutputFreq_Value=32000000 +RCC.PLLSAI2RoutputFreq_Value=32000000 +RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE +RCC.PWREXT_OverDrive=PWREXT_OverDrive_DESACTIVATED +RCC.PWRFreq_Value=32000000 +RCC.RCC_TIM_PRescaler_Selection=RCC_TIMPRES_DESACTIVATED +RCC.RNGFreq_Value=48000000 +RCC.SAI1Freq_Value=48000000 +RCC.SAI2Freq_Value=48000000 +RCC.SDMMCFreq_Value=32000000 +RCC.SYSCLKFreq_VALUE=32000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.UART4Freq_Value=8000000 +RCC.UART5Freq_Value=8000000 +RCC.USART1Freq_Value=32000000 +RCC.USART2Freq_Value=8000000 +RCC.USART3Freq_Value=8000000 +RCC.USBFreq_Value=48000000 +RCC.VCOInput2Freq_Value=8000000 +RCC.VCOInput3Freq_Value=8000000 +RCC.VCOInputFreq_Value=8000000 +RCC.VCOOutputFreq_Value=64000000 +RCC.VCOSAI1OutputFreq_Value=96000000 +RCC.VCOSAI2OutputFreq_Value=64000000 +SH.ADCx_IN15.0=ADC1_IN15,IN15-Differential +SH.ADCx_IN15.ConfNb=1 +SH.ADCx_IN16.0=ADC1_IN16,IN15-Differential +SH.ADCx_IN16.ConfNb=1 +SH.ADCx_IN3.0=ADC1_IN3 +SH.ADCx_IN3.ConfNb=1 +SH.ADCx_IN4.0=ADC1_IN4,IN4-Single-Ended +SH.ADCx_IN4.ConfNb=1 +SH.S_TIM15_CH2.0=TIM15_CH2 +SH.S_TIM15_CH2.ConfNb=1 +SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1 +SH.S_TIM1_CH1.ConfNb=1 +SH.S_TIM1_CH2.0=TIM1_CH2,PWM Generation2 CH2 +SH.S_TIM1_CH2.ConfNb=1 +SH.S_TIM1_CH3.0=TIM1_CH3,PWM Generation3 CH3 +SH.S_TIM1_CH3.ConfNb=1 +SH.S_TIM1_CH4.0=TIM1_CH4,PWM Generation4 CH4 +SH.S_TIM1_CH4.ConfNb=1 +SH.S_TIM2_CH1.0=TIM2_CH1,PWM Generation1 CH1 +SH.S_TIM2_CH1.ConfNb=1 +SH.S_TIM3_CH1.0=TIM3_CH1,Input_Capture1_from_TI1 +SH.S_TIM3_CH1.ConfNb=1 +SH.S_TIM3_CH2.0=TIM3_CH2,Input_Capture2_from_TI2 +SH.S_TIM3_CH2.ConfNb=1 +SH.S_TIM3_CH3.0=TIM3_CH3,Input_Capture3_from_TI3 +SH.S_TIM3_CH3.ConfNb=1 +SH.S_TIM3_CH4.0=TIM3_CH4,Input_Capture4_from_TI4 +SH.S_TIM3_CH4.ConfNb=1 +SH.S_TIM4_CH1.0=TIM4_CH1,PWM Generation1 CH1 +SH.S_TIM4_CH1.ConfNb=1 +SH.S_TIM4_CH2.0=TIM4_CH2,PWM Generation2 CH2 +SH.S_TIM4_CH2.ConfNb=1 +SH.S_TIM4_CH3.0=TIM4_CH3,PWM Generation3 CH3 +SH.S_TIM4_CH3.ConfNb=1 +SH.S_TIM4_CH4.0=TIM4_CH4,PWM Generation4 CH4 +SH.S_TIM4_CH4.ConfNb=1 +SH.S_TIM8_CH1.0=TIM8_CH1 +SH.S_TIM8_CH1.ConfNb=1 +SPI1.CalculateBaudRate=16.0 MBits/s +SPI1.Direction=SPI_DIRECTION_2LINES +SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +SPI1.Mode=SPI_MODE_MASTER +SPI1.VirtualType=VM_MASTER +SPI2.CalculateBaudRate=4.0 MBits/s +SPI2.Direction=SPI_DIRECTION_2LINES +SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate +SPI2.Mode=SPI_MODE_MASTER +SPI2.VirtualType=VM_MASTER +TIM1.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM1.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 +TIM1.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 +TIM1.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 +TIM1.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4 +TIM2.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM2.IPParameters=Channel-PWM Generation1 CH1 +TIM3.Channel-Input_Capture1_from_TI1=TIM_CHANNEL_1 +TIM3.Channel-Input_Capture2_from_TI2=TIM_CHANNEL_2 +TIM3.Channel-Input_Capture3_from_TI3=TIM_CHANNEL_3 +TIM3.Channel-Input_Capture4_from_TI4=TIM_CHANNEL_4 +TIM3.IPParameters=Channel-Input_Capture1_from_TI1,Channel-Input_Capture3_from_TI3,Channel-Input_Capture4_from_TI4,Channel-Input_Capture2_from_TI2 +TIM4.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 +TIM4.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2 +TIM4.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3 +TIM4.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 +TIM4.IPParameters=Channel-PWM Generation1 CH1,Channel-PWM Generation2 CH2,Channel-PWM Generation3 CH3,Channel-PWM Generation4 CH4 +USART1.IPParameters=VirtualMode-Asynchronous +USART1.VirtualMode-Asynchronous=VM_ASYNC +USART2.IPParameters=VirtualMode-Asynchronous +USART2.VirtualMode-Asynchronous=VM_ASYNC +USART3.IPParameters=VirtualMode-Asynchronous +USART3.VirtualMode-Asynchronous=VM_ASYNC +VP_SYS_VS_Systick.Mode=SysTick +VP_SYS_VS_Systick.Signal=SYS_VS_Systick +board=custom diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/board.c b/libraries/AP_HAL_ChibiOS/hwdef/common/board.c index a6f88d64ec..8c38182e41 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/board.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/board.c @@ -178,7 +178,7 @@ static void stm32_gpio_init(void) { #elif defined(STM32F3) rccResetAHB(STM32_GPIO_EN_MASK); rccEnableAHB(STM32_GPIO_EN_MASK, true); -#elif defined(STM32G4) || defined(STM32L4) +#elif defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) rccResetAHB2(STM32_GPIO_EN_MASK); rccEnableAHB2(STM32_GPIO_EN_MASK, true); #else diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/crashdump.c b/libraries/AP_HAL_ChibiOS/hwdef/common/crashdump.c index 61093b69e0..8c60109e8b 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/crashdump.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/crashdump.c @@ -505,7 +505,7 @@ static void init_uarts(void) /* Baud rate setting.*/ uint32_t fck; -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) fck = (uint32_t)(((HAL_CRASH_SERIAL_PORT_CLOCK + ((HAL_CRASH_SERIAL_PORT_BAUD)/2)) / HAL_CRASH_SERIAL_PORT_BAUD)); #else #if STM32_HAS_USART6 @@ -516,11 +516,11 @@ static void init_uarts(void) fck = (STM32_PCLK2+((HAL_CRASH_SERIAL_PORT_BAUD)/2)) / HAL_CRASH_SERIAL_PORT_BAUD; else fck = (STM32_PCLK1+((HAL_CRASH_SERIAL_PORT_BAUD)/2)) / HAL_CRASH_SERIAL_PORT_BAUD; -#endif //defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#endif //defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) u->BRR = fck; -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) /* Resetting eventual pending status flags.*/ u->ICR = 0xFFFFFFFFU; #else @@ -545,7 +545,7 @@ int CrashCatcher_getc(void) static const char* wait_for_string = "dump_crash_log"; uint8_t curr_off = 0; while (true) { -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) while (!(USART_ISR_RXNE & u->ISR)) {} uint8_t c = u->RDR; #else @@ -571,12 +571,12 @@ void CrashCatcher_putc(int c) init_uarts(); } USART_TypeDef *u = HAL_CRASH_SERIAL_PORT; -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) u->TDR = c & 0xFF; #else u->DR = c & 0xFF; #endif -#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) +#if defined(STM32F7) || defined(STM32H7) || defined(STM32F3) || defined(STM32G4) || defined(STM32L4) || defined(STM32L4PLUS) while (!(USART_ISR_TC & u->ISR)) { #else while (!(USART_SR_TC & u->SR)) { diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/flash.c b/libraries/AP_HAL_ChibiOS/hwdef/common/flash.c index 3ea2c423c6..1d7beac7a3 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/flash.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/flash.c @@ -133,6 +133,9 @@ static const uint32_t flash_memmap[STM32_FLASH_NPAGES] = { KB(32), KB(32), KB(32 #elif defined(STM32G4) #define STM32_FLASH_NPAGES (BOARD_FLASH_SIZE/2) #define STM32_FLASH_FIXED_PAGE_SIZE 2 +#elif defined(STM32L4PLUS) +#define STM32_FLASH_NPAGES (BOARD_FLASH_SIZE/4) +#define STM32_FLASH_FIXED_PAGE_SIZE 4 #elif defined(STM32L4) #define STM32_FLASH_NPAGES (BOARD_FLASH_SIZE/2) #define STM32_FLASH_FIXED_PAGE_SIZE 2 @@ -464,6 +467,15 @@ bool stm32_flash_erasepage(uint32_t page) // there is an 8th bit FLASH->CR |= page<CR |= FLASH_CR_STRT; +#elif defined(STM32L4PLUS) + FLASH->CR |= FLASH_CR_PER; + if (page >= 256) { + FLASH->CR |= FLASH_CR_BKER; + } + FLASH->CR &= ~FLASH_CR_PNB; + + FLASH->CR |= (page<256 ?page: (page -256))<CR |= FLASH_CR_STRT; #elif defined(STM32L4) FLASH->CR = FLASH_CR_PER; FLASH->CR |= page<