2024-07-12 06:43 AM
IMHO in the file "stm32f3xx_hal_def.h" the section "Exported types" should be moved in front off section "Includes", because some of the types are used in the included files, but "stm32f3xx_hal_def.h" will not be reentered. It produces error like this:
In file included from .\Core\Inc/stm32f3xx_hal_conf.h:203,
from .\Drivers\STM32F3xx_HAL_Driver\Inc/stm32f3xx_hal.h:29,
from .\Drivers\CMSIS\Device\ST\STM32F3xx\Include/stm32f3xx.h:266,
from .\Drivers\STM32F3xx_HAL_Driver\Inc/stm32f3xx_hal_def.h:29,
from .\Drivers\STM32F3xx_HAL_Driver\Inc/stm32f3xx_hal_rcc.h:27,
from Src\setup.cpp:9:
.\Drivers\STM32F3xx_HAL_Driver\Inc/stm32f3xx_hal_gpio.h:297:1: error: 'HAL_StatusTypeDef' does not name a type; did you mean 'NOR_StatusTypedef'?
Solved! Go to Solution.
2024-07-12 07:14 AM
Ok, thanks, including "stm32f3xx_hal.h" instead of "stm32f3xx_hal_conf.h" fixed things!
I believe, though, that a good practice is to include the minimal amount of include stuff, and there is no reason not to do this modification.
IOC file:
#MicroXplorer Configuration settings - do not modify
CAD.formats=
CAD.pinconfig=
CAD.provider=
COMP1.IPParameters=InvertingInput,TriggerMode
COMP1.InvertingInput=COMP_INVERTINGINPUT_1_4VREFINT
COMP1.TriggerMode=COMP_TRIGGERMODE_IT_RISING
DAC.DAC_OutputBuffer=DAC_OUTPUTBUFFER_DISABLE
DAC.DAC_Trigger=DAC_TRIGGER_T6_TRGO
DAC.IPParameters=DAC_OutputBuffer,DAC_Trigger
Dma.DAC_CH1.0.Direction=DMA_MEMORY_TO_PERIPH
Dma.DAC_CH1.0.Instance=DMA1_Channel3
Dma.DAC_CH1.0.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
Dma.DAC_CH1.0.MemInc=DMA_MINC_ENABLE
Dma.DAC_CH1.0.Mode=DMA_NORMAL
Dma.DAC_CH1.0.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
Dma.DAC_CH1.0.PeriphInc=DMA_PINC_DISABLE
Dma.DAC_CH1.0.Priority=DMA_PRIORITY_LOW
Dma.DAC_CH1.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
Dma.Request0=DAC_CH1
Dma.Request1=USART2_TX
Dma.RequestsNb=2
Dma.USART2_TX.1.Direction=DMA_MEMORY_TO_PERIPH
Dma.USART2_TX.1.Instance=DMA1_Channel7
Dma.USART2_TX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
Dma.USART2_TX.1.MemInc=DMA_MINC_ENABLE
Dma.USART2_TX.1.Mode=DMA_NORMAL
Dma.USART2_TX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
Dma.USART2_TX.1.PeriphInc=DMA_PINC_DISABLE
Dma.USART2_TX.1.Priority=DMA_PRIORITY_LOW
Dma.USART2_TX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
File.Version=6
GPIO.groupedBy=Group By Peripherals
I2C1.IPParameters=Timing-I2C
I2C1.Timing-I2C=0x2000090E
KeepUserPlacement=false
Mcu.CPN=STM32F303VCT6
Mcu.Family=STM32F3
Mcu.IP0=COMP1
Mcu.IP1=DAC
Mcu.IP10=TIM6
Mcu.IP11=USART2
Mcu.IP2=DMA
Mcu.IP3=I2C1
Mcu.IP4=NVIC
Mcu.IP5=OPAMP1
Mcu.IP6=OPAMP4
Mcu.IP7=RCC
Mcu.IP8=SPI1
Mcu.IP9=SYS
Mcu.IPNb=12
Mcu.Name=STM32F303V(B-C)Tx
Mcu.Package=LQFP100
Mcu.Pin0=PE2
Mcu.Pin1=PE3
Mcu.Pin10=PA2
Mcu.Pin11=PA3
Mcu.Pin12=PA4
Mcu.Pin13=PA5
Mcu.Pin14=PA6
Mcu.Pin15=PA7
Mcu.Pin16=PC5
Mcu.Pin17=PE8
Mcu.Pin18=PE9
Mcu.Pin19=PE10
Mcu.Pin2=PE4
Mcu.Pin20=PE11
Mcu.Pin21=PE12
Mcu.Pin22=PE13
Mcu.Pin23=PE14
Mcu.Pin24=PE15
Mcu.Pin25=PB12
Mcu.Pin26=PA11
Mcu.Pin27=PA12
Mcu.Pin28=PA13
Mcu.Pin29=PA14
Mcu.Pin3=PE5
Mcu.Pin30=PA15
Mcu.Pin31=PD5
Mcu.Pin32=PB3
Mcu.Pin33=PB6
Mcu.Pin34=PB7
Mcu.Pin35=PE0
Mcu.Pin36=PE1
Mcu.Pin37=VP_COMP1_VS_VREFINT14
Mcu.Pin38=VP_SYS_VS_Systick
Mcu.Pin39=VP_TIM6_VS_ClockSourceINT
Mcu.Pin4=PC14-OSC32_IN
Mcu.Pin5=PC15-OSC32_OUT
Mcu.Pin6=PF0-OSC_IN
Mcu.Pin7=PF1-OSC_OUT
Mcu.Pin8=PA0
Mcu.Pin9=PA1
Mcu.PinsNb=40
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F303VCTx
MxCube.Version=6.11.1
MxDb.Version=DB.6.0.111
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.COMP1_2_3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DMA1_Channel3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DMA1_Channel7_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_0
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:true\:false\:true\:true\:true\:false
NVIC.USART2_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
PA0.GPIOParameters=GPIO_Label
PA0.GPIO_Label=B1 [Blue PushButton]
PA0.Locked=true
PA0.Signal=GPIO_Input
PA1.GPIOParameters=GPIO_Label
PA1.GPIO_Label=COMP_IN1
PA1.Mode=INP
PA1.Signal=COMP1_INP
PA11.GPIOParameters=GPIO_Label
PA11.GPIO_Label=DM
PA11.Locked=true
PA11.Signal=USB_DM
PA12.GPIOParameters=GPIO_Label
PA12.GPIO_Label=DP
PA12.Locked=true
PA12.Signal=USB_DP
PA13.GPIOParameters=GPIO_Label
PA13.GPIO_Label=SWDIO
PA13.Locked=true
PA13.Mode=Serial_Wire
PA13.Signal=SYS_JTMS-SWDIO
PA14.GPIOParameters=GPIO_Label
PA14.GPIO_Label=SWCLK
PA14.Locked=true
PA14.Mode=Serial_Wire
PA14.Signal=SYS_JTCK-SWCLK
PA15.GPIOParameters=GPIO_Label
PA15.GPIO_Label=TO_GREEN
PA15.Mode=Asynchronous
PA15.Signal=USART2_RX
PA2.Mode=Standalone
PA2.Signal=OPAMP1_VOUT
PA3.Mode=Standalone
PA3.Signal=OPAMP1_VINP
PA4.GPIOParameters=GPIO_Label
PA4.GPIO_Label=DAC_OUT
PA4.Signal=COMP_DAC1_group
PA5.GPIOParameters=GPIO_Label
PA5.GPIO_Label=SPI1_SCK [L3GD20_SCL/SPC]
PA5.Locked=true
PA5.Mode=Full_Duplex_Master
PA5.Signal=SPI1_SCK
PA6.GPIOParameters=GPIO_Label
PA6.GPIO_Label=SPI1_MISO [L3GD20_SA0/SDO]
PA6.Locked=true
PA6.Mode=Full_Duplex_Master
PA6.Signal=SPI1_MISO
PA7.GPIOParameters=GPIO_Label
PA7.GPIO_Label=SPI1_MISO [L3GD20_SDA/SDI/SDO]
PA7.Locked=true
PA7.Mode=Full_Duplex_Master
PA7.Signal=SPI1_MOSI
PB12.GPIOParameters=GPIO_Label
PB12.GPIO_Label=DAC_OPAMP_VOUT
PB12.Mode=Follower-DAC_OUT1-INP
PB12.Signal=OPAMP4_VOUT
PB3.GPIOParameters=GPIO_Label
PB3.GPIO_Label=SWO
PB3.Locked=true
PB3.Signal=SYS_JTDO-TRACESWO
PB6.GPIOParameters=GPIO_Label,GPIO_Pu
PB6.GPIO_Label=I2C1_SCL [LSM303DLHC_SCL]
PB6.GPIO_Pu=GPIO_PULLUP
PB6.Locked=true
PB6.Mode=I2C
PB6.Signal=I2C1_SCL
PB7.GPIOParameters=GPIO_Label,GPIO_Pu
PB7.GPIO_Label=I2C1_SDA [LSM303DLHC_SDA]
PB7.GPIO_Pu=GPIO_PULLUP
PB7.Locked=true
PB7.Mode=I2C
PB7.Signal=I2C1_SDA
PC14-OSC32_IN.GPIOParameters=GPIO_Label
PC14-OSC32_IN.GPIO_Label=OSC32_IN
PC14-OSC32_IN.Locked=true
PC14-OSC32_IN.Signal=RCC_OSC32_IN
PC15-OSC32_OUT.GPIOParameters=GPIO_Label
PC15-OSC32_OUT.GPIO_Label=OSC32_OUT
PC15-OSC32_OUT.Locked=true
PC15-OSC32_OUT.Signal=RCC_OSC32_OUT
PC5.Mode=Standalone
PC5.Signal=OPAMP1_VINM
PD5.GPIOParameters=GPIO_Label
PD5.GPIO_Label=TO_WHITE
PD5.Mode=Asynchronous
PD5.Signal=USART2_TX
PE0.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE0.GPIO_Label=MEMS_INT1 [L3GD20_INT1]
PE0.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE0.Locked=true
PE0.Signal=GPXTI0
PE1.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE1.GPIO_Label=MEMS_INT2 [L3GD20_DRDY/INT2]
PE1.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE1.Locked=true
PE1.Signal=GPXTI1
PE10.GPIOParameters=GPIO_Label
PE10.GPIO_Label=LD5 [Orange Led]
PE10.Locked=true
PE10.Signal=GPIO_Output
PE11.GPIOParameters=GPIO_Label
PE11.GPIO_Label=LD7 [Green Led]
PE11.Locked=true
PE11.Signal=GPIO_Output
PE12.GPIOParameters=GPIO_Label
PE12.GPIO_Label=LD9 [Blue Led]
PE12.Locked=true
PE12.Signal=GPIO_Output
PE13.GPIOParameters=GPIO_Label
PE13.GPIO_Label=LD10 [Red Led]
PE13.Locked=true
PE13.Signal=GPIO_Output
PE14.GPIOParameters=GPIO_Label
PE14.GPIO_Label=LD8 [Orange Led]
PE14.Locked=true
PE14.Signal=GPIO_Output
PE15.GPIOParameters=GPIO_Label
PE15.GPIO_Label=LD6 [Green Led]
PE15.Locked=true
PE15.Signal=GPIO_Output
PE2.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE2.GPIO_Label=DRDY [LSM303DLHC_DRDY]
PE2.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE2.Locked=true
PE2.Signal=GPXTI2
PE3.GPIOParameters=GPIO_Label
PE3.GPIO_Label=CS_I2C/SPI [L3GD20_CS_I2C/SPI]
PE3.Locked=true
PE3.Signal=GPIO_Output
PE4.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE4.GPIO_Label=MEMS_INT3 [LSM303DLHC_INT1]
PE4.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE4.Locked=true
PE4.Signal=GPXTI4
PE5.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE5.GPIO_Label=MEMS_INT4 [LSM303DLHC_INT2]
PE5.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE5.Locked=true
PE5.Signal=GPXTI5
PE8.GPIOParameters=GPIO_Label
PE8.GPIO_Label=LD4 [Blue Led]
PE8.Locked=true
PE8.Signal=GPIO_Output
PE9.GPIOParameters=GPIO_Label
PE9.GPIO_Label=LD3 [Red Led]
PE9.Locked=true
PE9.Signal=GPIO_Output
PF0-OSC_IN.GPIOParameters=GPIO_Label
PF0-OSC_IN.GPIO_Label=OSC_IN
PF0-OSC_IN.Locked=true
PF0-OSC_IN.Mode=HSE-External-Clock-Source
PF0-OSC_IN.Signal=RCC_OSC_IN
PF1-OSC_OUT.GPIOParameters=GPIO_Label
PF1-OSC_OUT.GPIO_Label=OSC_OUT
PF1-OSC_OUT.Locked=true
PF1-OSC_OUT.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=STM32F303VCTx
ProjectManager.FirmwarePackage=STM32Cube FW_F3 V1.11.5
ProjectManager.FreePins=true
ProjectManager.HalAssertFull=true
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=1
ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=STM32CubeIDE
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=F3discovery.ioc
ProjectManager.ProjectName=F3discovery
ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
ProjectManager.UAScriptAfterPath=
ProjectManager.UAScriptBeforePath=
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_DAC_Init-DAC-false-HAL-true,5-MX_I2C1_Init-I2C1-false-HAL-true,6-MX_SPI1_Init-SPI1-false-HAL-true,7-MX_OPAMP4_Init-OPAMP4-false-HAL-true,8-MX_TIM7_Init-TIM7-false-HAL-true,8-MX_COMP1_Init-COMP1-false-HAL-true,9-MX_OPAMP1_Init-OPAMP1-false-HAL-true,10-MX_USART2_UART_Init-USART2-false-HAL-true,11-MX_TIM6_Init-TIM6-false-HAL-true
RCC.ADC12outputFreq_Value=48000000
RCC.ADC34outputFreq_Value=48000000
RCC.AHBFreq_Value=48000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
RCC.APB1Freq_Value=24000000
RCC.APB1TimFreq_Value=48000000
RCC.APB2Freq_Value=48000000
RCC.APB2TimFreq_Value=48000000
RCC.CortexFreq_Value=48000000
RCC.FCLKCortexFreq_Value=48000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=48000000
RCC.HSEPLLFreq_Value=8000000
RCC.HSE_VALUE=8000000
RCC.HSIPLLFreq_Value=4000000
RCC.HSI_VALUE=8000000
RCC.I2C1Freq_Value=8000000
RCC.I2C2Freq_Value=8000000
RCC.I2SClocksFreq_Value=48000000
RCC.IPParameters=ADC12outputFreq_Value,ADC34outputFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSEPLLFreq_Value,HSE_VALUE,HSIPLLFreq_Value,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSourceVirtual,TIM1Freq_Value,TIM2Freq_Value,TIM8Freq_Value,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOOutput2Freq_Value
RCC.LSE_VALUE=32768
RCC.LSI_VALUE=40000
RCC.MCOFreq_Value=48000000
RCC.PLLCLKFreq_Value=48000000
RCC.PLLMCOFreq_Value=24000000
RCC.PLLMUL=RCC_PLL_MUL6
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
RCC.RTCFreq_Value=40000
RCC.RTCHSEDivFreq_Value=250000
RCC.SYSCLKFreq_VALUE=48000000
RCC.SYSCLKSourceVirtual=RCC_SYSCLKSOURCE_PLLCLK
RCC.TIM1Freq_Value=48000000
RCC.TIM2Freq_Value=48000000
RCC.TIM8Freq_Value=48000000
RCC.UART4Freq_Value=24000000
RCC.UART5Freq_Value=24000000
RCC.USART1Freq_Value=48000000
RCC.USART2Freq_Value=24000000
RCC.USART3Freq_Value=24000000
RCC.USBFreq_Value=48000000
RCC.VCOOutput2Freq_Value=8000000
SH.COMP_DAC1_group.0=DAC_OUT1,DAC_OUT1
SH.COMP_DAC1_group.ConfNb=1
SH.GPXTI0.0=GPIO_EXTI0
SH.GPXTI0.ConfNb=1
SH.GPXTI1.0=GPIO_EXTI1
SH.GPXTI1.ConfNb=1
SH.GPXTI2.0=GPIO_EXTI2
SH.GPXTI2.ConfNb=1
SH.GPXTI4.0=GPIO_EXTI4
SH.GPXTI4.ConfNb=1
SH.GPXTI5.0=GPIO_EXTI5
SH.GPXTI5.ConfNb=1
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4
SPI1.BaudRatePrescaler-Full_Duplex_Master=SPI_BAUDRATEPRESCALER_2
SPI1.CalculateBaudRate=12.0 MBits/s
SPI1.CalculateBaudRate-Full_Duplex_Master=24.0 MBits/s
SPI1.Direction=SPI_DIRECTION_2LINES
SPI1.IPParameters=CalculateBaudRate,BaudRatePrescaler,CalculateBaudRate-Full_Duplex_Master,BaudRatePrescaler-Full_Duplex_Master,Mode-Full_Duplex_Master,Mode,VirtualType,Direction
SPI1.Mode=SPI_MODE_MASTER
SPI1.Mode-Full_Duplex_Master=SPI_MODE_MASTER
SPI1.VirtualType=VM_MASTER
TIM6.IPParameters=TIM_MasterOutputTrigger
TIM6.TIM_MasterOutputTrigger=TIM_TRGO_UPDATE
USART2.BaudRate=115200
USART2.IPParameters=VirtualMode-Asynchronous,BaudRate
USART2.VirtualMode-Asynchronous=VM_ASYNC
VP_COMP1_VS_VREFINT14.Mode=VREFINT_14
VP_COMP1_VS_VREFINT14.Signal=COMP1_VS_VREFINT14
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
VP_TIM6_VS_ClockSourceINT.Mode=Enable_Timer
VP_TIM6_VS_ClockSourceINT.Signal=TIM6_VS_ClockSourceINT
board=STM32F3DISCOVERY
boardIOC=true
2024-07-12 06:49 AM - edited 2024-07-12 06:52 AM
Do you have an IOC file that generates code that produces these errors? If so can you attach it here?
Seems like an issue of not including the correct top-level HAL file. You should be including "stm32f3xx_hal.h" first (and only, generally) from your source file. The error message suggests #include "stm32f3xx_hal_conf.h" is first.
2024-07-12 07:14 AM
Ok, thanks, including "stm32f3xx_hal.h" instead of "stm32f3xx_hal_conf.h" fixed things!
I believe, though, that a good practice is to include the minimal amount of include stuff, and there is no reason not to do this modification.
IOC file:
#MicroXplorer Configuration settings - do not modify
CAD.formats=
CAD.pinconfig=
CAD.provider=
COMP1.IPParameters=InvertingInput,TriggerMode
COMP1.InvertingInput=COMP_INVERTINGINPUT_1_4VREFINT
COMP1.TriggerMode=COMP_TRIGGERMODE_IT_RISING
DAC.DAC_OutputBuffer=DAC_OUTPUTBUFFER_DISABLE
DAC.DAC_Trigger=DAC_TRIGGER_T6_TRGO
DAC.IPParameters=DAC_OutputBuffer,DAC_Trigger
Dma.DAC_CH1.0.Direction=DMA_MEMORY_TO_PERIPH
Dma.DAC_CH1.0.Instance=DMA1_Channel3
Dma.DAC_CH1.0.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
Dma.DAC_CH1.0.MemInc=DMA_MINC_ENABLE
Dma.DAC_CH1.0.Mode=DMA_NORMAL
Dma.DAC_CH1.0.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
Dma.DAC_CH1.0.PeriphInc=DMA_PINC_DISABLE
Dma.DAC_CH1.0.Priority=DMA_PRIORITY_LOW
Dma.DAC_CH1.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
Dma.Request0=DAC_CH1
Dma.Request1=USART2_TX
Dma.RequestsNb=2
Dma.USART2_TX.1.Direction=DMA_MEMORY_TO_PERIPH
Dma.USART2_TX.1.Instance=DMA1_Channel7
Dma.USART2_TX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
Dma.USART2_TX.1.MemInc=DMA_MINC_ENABLE
Dma.USART2_TX.1.Mode=DMA_NORMAL
Dma.USART2_TX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
Dma.USART2_TX.1.PeriphInc=DMA_PINC_DISABLE
Dma.USART2_TX.1.Priority=DMA_PRIORITY_LOW
Dma.USART2_TX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
File.Version=6
GPIO.groupedBy=Group By Peripherals
I2C1.IPParameters=Timing-I2C
I2C1.Timing-I2C=0x2000090E
KeepUserPlacement=false
Mcu.CPN=STM32F303VCT6
Mcu.Family=STM32F3
Mcu.IP0=COMP1
Mcu.IP1=DAC
Mcu.IP10=TIM6
Mcu.IP11=USART2
Mcu.IP2=DMA
Mcu.IP3=I2C1
Mcu.IP4=NVIC
Mcu.IP5=OPAMP1
Mcu.IP6=OPAMP4
Mcu.IP7=RCC
Mcu.IP8=SPI1
Mcu.IP9=SYS
Mcu.IPNb=12
Mcu.Name=STM32F303V(B-C)Tx
Mcu.Package=LQFP100
Mcu.Pin0=PE2
Mcu.Pin1=PE3
Mcu.Pin10=PA2
Mcu.Pin11=PA3
Mcu.Pin12=PA4
Mcu.Pin13=PA5
Mcu.Pin14=PA6
Mcu.Pin15=PA7
Mcu.Pin16=PC5
Mcu.Pin17=PE8
Mcu.Pin18=PE9
Mcu.Pin19=PE10
Mcu.Pin2=PE4
Mcu.Pin20=PE11
Mcu.Pin21=PE12
Mcu.Pin22=PE13
Mcu.Pin23=PE14
Mcu.Pin24=PE15
Mcu.Pin25=PB12
Mcu.Pin26=PA11
Mcu.Pin27=PA12
Mcu.Pin28=PA13
Mcu.Pin29=PA14
Mcu.Pin3=PE5
Mcu.Pin30=PA15
Mcu.Pin31=PD5
Mcu.Pin32=PB3
Mcu.Pin33=PB6
Mcu.Pin34=PB7
Mcu.Pin35=PE0
Mcu.Pin36=PE1
Mcu.Pin37=VP_COMP1_VS_VREFINT14
Mcu.Pin38=VP_SYS_VS_Systick
Mcu.Pin39=VP_TIM6_VS_ClockSourceINT
Mcu.Pin4=PC14-OSC32_IN
Mcu.Pin5=PC15-OSC32_OUT
Mcu.Pin6=PF0-OSC_IN
Mcu.Pin7=PF1-OSC_OUT
Mcu.Pin8=PA0
Mcu.Pin9=PA1
Mcu.PinsNb=40
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F303VCTx
MxCube.Version=6.11.1
MxDb.Version=DB.6.0.111
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.COMP1_2_3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DMA1_Channel3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DMA1_Channel7_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_0
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:true\:false\:true\:true\:true\:false
NVIC.USART2_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:true\:false\:false
PA0.GPIOParameters=GPIO_Label
PA0.GPIO_Label=B1 [Blue PushButton]
PA0.Locked=true
PA0.Signal=GPIO_Input
PA1.GPIOParameters=GPIO_Label
PA1.GPIO_Label=COMP_IN1
PA1.Mode=INP
PA1.Signal=COMP1_INP
PA11.GPIOParameters=GPIO_Label
PA11.GPIO_Label=DM
PA11.Locked=true
PA11.Signal=USB_DM
PA12.GPIOParameters=GPIO_Label
PA12.GPIO_Label=DP
PA12.Locked=true
PA12.Signal=USB_DP
PA13.GPIOParameters=GPIO_Label
PA13.GPIO_Label=SWDIO
PA13.Locked=true
PA13.Mode=Serial_Wire
PA13.Signal=SYS_JTMS-SWDIO
PA14.GPIOParameters=GPIO_Label
PA14.GPIO_Label=SWCLK
PA14.Locked=true
PA14.Mode=Serial_Wire
PA14.Signal=SYS_JTCK-SWCLK
PA15.GPIOParameters=GPIO_Label
PA15.GPIO_Label=TO_GREEN
PA15.Mode=Asynchronous
PA15.Signal=USART2_RX
PA2.Mode=Standalone
PA2.Signal=OPAMP1_VOUT
PA3.Mode=Standalone
PA3.Signal=OPAMP1_VINP
PA4.GPIOParameters=GPIO_Label
PA4.GPIO_Label=DAC_OUT
PA4.Signal=COMP_DAC1_group
PA5.GPIOParameters=GPIO_Label
PA5.GPIO_Label=SPI1_SCK [L3GD20_SCL/SPC]
PA5.Locked=true
PA5.Mode=Full_Duplex_Master
PA5.Signal=SPI1_SCK
PA6.GPIOParameters=GPIO_Label
PA6.GPIO_Label=SPI1_MISO [L3GD20_SA0/SDO]
PA6.Locked=true
PA6.Mode=Full_Duplex_Master
PA6.Signal=SPI1_MISO
PA7.GPIOParameters=GPIO_Label
PA7.GPIO_Label=SPI1_MISO [L3GD20_SDA/SDI/SDO]
PA7.Locked=true
PA7.Mode=Full_Duplex_Master
PA7.Signal=SPI1_MOSI
PB12.GPIOParameters=GPIO_Label
PB12.GPIO_Label=DAC_OPAMP_VOUT
PB12.Mode=Follower-DAC_OUT1-INP
PB12.Signal=OPAMP4_VOUT
PB3.GPIOParameters=GPIO_Label
PB3.GPIO_Label=SWO
PB3.Locked=true
PB3.Signal=SYS_JTDO-TRACESWO
PB6.GPIOParameters=GPIO_Label,GPIO_Pu
PB6.GPIO_Label=I2C1_SCL [LSM303DLHC_SCL]
PB6.GPIO_Pu=GPIO_PULLUP
PB6.Locked=true
PB6.Mode=I2C
PB6.Signal=I2C1_SCL
PB7.GPIOParameters=GPIO_Label,GPIO_Pu
PB7.GPIO_Label=I2C1_SDA [LSM303DLHC_SDA]
PB7.GPIO_Pu=GPIO_PULLUP
PB7.Locked=true
PB7.Mode=I2C
PB7.Signal=I2C1_SDA
PC14-OSC32_IN.GPIOParameters=GPIO_Label
PC14-OSC32_IN.GPIO_Label=OSC32_IN
PC14-OSC32_IN.Locked=true
PC14-OSC32_IN.Signal=RCC_OSC32_IN
PC15-OSC32_OUT.GPIOParameters=GPIO_Label
PC15-OSC32_OUT.GPIO_Label=OSC32_OUT
PC15-OSC32_OUT.Locked=true
PC15-OSC32_OUT.Signal=RCC_OSC32_OUT
PC5.Mode=Standalone
PC5.Signal=OPAMP1_VINM
PD5.GPIOParameters=GPIO_Label
PD5.GPIO_Label=TO_WHITE
PD5.Mode=Asynchronous
PD5.Signal=USART2_TX
PE0.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE0.GPIO_Label=MEMS_INT1 [L3GD20_INT1]
PE0.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE0.Locked=true
PE0.Signal=GPXTI0
PE1.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE1.GPIO_Label=MEMS_INT2 [L3GD20_DRDY/INT2]
PE1.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE1.Locked=true
PE1.Signal=GPXTI1
PE10.GPIOParameters=GPIO_Label
PE10.GPIO_Label=LD5 [Orange Led]
PE10.Locked=true
PE10.Signal=GPIO_Output
PE11.GPIOParameters=GPIO_Label
PE11.GPIO_Label=LD7 [Green Led]
PE11.Locked=true
PE11.Signal=GPIO_Output
PE12.GPIOParameters=GPIO_Label
PE12.GPIO_Label=LD9 [Blue Led]
PE12.Locked=true
PE12.Signal=GPIO_Output
PE13.GPIOParameters=GPIO_Label
PE13.GPIO_Label=LD10 [Red Led]
PE13.Locked=true
PE13.Signal=GPIO_Output
PE14.GPIOParameters=GPIO_Label
PE14.GPIO_Label=LD8 [Orange Led]
PE14.Locked=true
PE14.Signal=GPIO_Output
PE15.GPIOParameters=GPIO_Label
PE15.GPIO_Label=LD6 [Green Led]
PE15.Locked=true
PE15.Signal=GPIO_Output
PE2.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE2.GPIO_Label=DRDY [LSM303DLHC_DRDY]
PE2.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE2.Locked=true
PE2.Signal=GPXTI2
PE3.GPIOParameters=GPIO_Label
PE3.GPIO_Label=CS_I2C/SPI [L3GD20_CS_I2C/SPI]
PE3.Locked=true
PE3.Signal=GPIO_Output
PE4.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE4.GPIO_Label=MEMS_INT3 [LSM303DLHC_INT1]
PE4.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE4.Locked=true
PE4.Signal=GPXTI4
PE5.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
PE5.GPIO_Label=MEMS_INT4 [LSM303DLHC_INT2]
PE5.GPIO_ModeDefaultEXTI=GPIO_MODE_EVT_RISING
PE5.Locked=true
PE5.Signal=GPXTI5
PE8.GPIOParameters=GPIO_Label
PE8.GPIO_Label=LD4 [Blue Led]
PE8.Locked=true
PE8.Signal=GPIO_Output
PE9.GPIOParameters=GPIO_Label
PE9.GPIO_Label=LD3 [Red Led]
PE9.Locked=true
PE9.Signal=GPIO_Output
PF0-OSC_IN.GPIOParameters=GPIO_Label
PF0-OSC_IN.GPIO_Label=OSC_IN
PF0-OSC_IN.Locked=true
PF0-OSC_IN.Mode=HSE-External-Clock-Source
PF0-OSC_IN.Signal=RCC_OSC_IN
PF1-OSC_OUT.GPIOParameters=GPIO_Label
PF1-OSC_OUT.GPIO_Label=OSC_OUT
PF1-OSC_OUT.Locked=true
PF1-OSC_OUT.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=STM32F303VCTx
ProjectManager.FirmwarePackage=STM32Cube FW_F3 V1.11.5
ProjectManager.FreePins=true
ProjectManager.HalAssertFull=true
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=1
ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=STM32CubeIDE
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=F3discovery.ioc
ProjectManager.ProjectName=F3discovery
ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
ProjectManager.UAScriptAfterPath=
ProjectManager.UAScriptBeforePath=
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_DAC_Init-DAC-false-HAL-true,5-MX_I2C1_Init-I2C1-false-HAL-true,6-MX_SPI1_Init-SPI1-false-HAL-true,7-MX_OPAMP4_Init-OPAMP4-false-HAL-true,8-MX_TIM7_Init-TIM7-false-HAL-true,8-MX_COMP1_Init-COMP1-false-HAL-true,9-MX_OPAMP1_Init-OPAMP1-false-HAL-true,10-MX_USART2_UART_Init-USART2-false-HAL-true,11-MX_TIM6_Init-TIM6-false-HAL-true
RCC.ADC12outputFreq_Value=48000000
RCC.ADC34outputFreq_Value=48000000
RCC.AHBFreq_Value=48000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
RCC.APB1Freq_Value=24000000
RCC.APB1TimFreq_Value=48000000
RCC.APB2Freq_Value=48000000
RCC.APB2TimFreq_Value=48000000
RCC.CortexFreq_Value=48000000
RCC.FCLKCortexFreq_Value=48000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=48000000
RCC.HSEPLLFreq_Value=8000000
RCC.HSE_VALUE=8000000
RCC.HSIPLLFreq_Value=4000000
RCC.HSI_VALUE=8000000
RCC.I2C1Freq_Value=8000000
RCC.I2C2Freq_Value=8000000
RCC.I2SClocksFreq_Value=48000000
RCC.IPParameters=ADC12outputFreq_Value,ADC34outputFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSEPLLFreq_Value,HSE_VALUE,HSIPLLFreq_Value,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2SClocksFreq_Value,LSE_VALUE,LSI_VALUE,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtual,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSourceVirtual,TIM1Freq_Value,TIM2Freq_Value,TIM8Freq_Value,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOOutput2Freq_Value
RCC.LSE_VALUE=32768
RCC.LSI_VALUE=40000
RCC.MCOFreq_Value=48000000
RCC.PLLCLKFreq_Value=48000000
RCC.PLLMCOFreq_Value=24000000
RCC.PLLMUL=RCC_PLL_MUL6
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
RCC.RTCFreq_Value=40000
RCC.RTCHSEDivFreq_Value=250000
RCC.SYSCLKFreq_VALUE=48000000
RCC.SYSCLKSourceVirtual=RCC_SYSCLKSOURCE_PLLCLK
RCC.TIM1Freq_Value=48000000
RCC.TIM2Freq_Value=48000000
RCC.TIM8Freq_Value=48000000
RCC.UART4Freq_Value=24000000
RCC.UART5Freq_Value=24000000
RCC.USART1Freq_Value=48000000
RCC.USART2Freq_Value=24000000
RCC.USART3Freq_Value=24000000
RCC.USBFreq_Value=48000000
RCC.VCOOutput2Freq_Value=8000000
SH.COMP_DAC1_group.0=DAC_OUT1,DAC_OUT1
SH.COMP_DAC1_group.ConfNb=1
SH.GPXTI0.0=GPIO_EXTI0
SH.GPXTI0.ConfNb=1
SH.GPXTI1.0=GPIO_EXTI1
SH.GPXTI1.ConfNb=1
SH.GPXTI2.0=GPIO_EXTI2
SH.GPXTI2.ConfNb=1
SH.GPXTI4.0=GPIO_EXTI4
SH.GPXTI4.ConfNb=1
SH.GPXTI5.0=GPIO_EXTI5
SH.GPXTI5.ConfNb=1
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4
SPI1.BaudRatePrescaler-Full_Duplex_Master=SPI_BAUDRATEPRESCALER_2
SPI1.CalculateBaudRate=12.0 MBits/s
SPI1.CalculateBaudRate-Full_Duplex_Master=24.0 MBits/s
SPI1.Direction=SPI_DIRECTION_2LINES
SPI1.IPParameters=CalculateBaudRate,BaudRatePrescaler,CalculateBaudRate-Full_Duplex_Master,BaudRatePrescaler-Full_Duplex_Master,Mode-Full_Duplex_Master,Mode,VirtualType,Direction
SPI1.Mode=SPI_MODE_MASTER
SPI1.Mode-Full_Duplex_Master=SPI_MODE_MASTER
SPI1.VirtualType=VM_MASTER
TIM6.IPParameters=TIM_MasterOutputTrigger
TIM6.TIM_MasterOutputTrigger=TIM_TRGO_UPDATE
USART2.BaudRate=115200
USART2.IPParameters=VirtualMode-Asynchronous,BaudRate
USART2.VirtualMode-Asynchronous=VM_ASYNC
VP_COMP1_VS_VREFINT14.Mode=VREFINT_14
VP_COMP1_VS_VREFINT14.Signal=COMP1_VS_VREFINT14
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
VP_TIM6_VS_ClockSourceINT.Mode=Enable_Timer
VP_TIM6_VS_ClockSourceINT.Signal=TIM6_VS_ClockSourceINT
board=STM32F3DISCOVERY
boardIOC=true
2024-07-12 08:41 AM - edited 2024-07-12 08:42 AM
> no reason not to do this modification.
Libraries should not be changed because people are not using them correctly. You want to use a library, you need to follow its rules. The C include system is a mess, changing this one thing isn't going to fix that. Changing it could make bugs harder to spot.
> a good practice is to include the minimal amount of include stuff,
Agreed, and in the case of the HAL library, that minimal amount of stuff is "stm32f3xx_hal.h".