mirror of
https://gitee.com/dlmu-cone/tronone-h7-scaffold
synced 2026-07-23 19:25:09 +08:00
Regenerated HAL Drivers to Support Power 5V EN/24V EN,Also fixed FDCAN3 Tx Fifo Queue Elmts Nbr/Baudrate.
This commit is contained in:
@@ -57,6 +57,12 @@ void Error_Handler(void);
|
|||||||
/* USER CODE END EFP */
|
/* USER CODE END EFP */
|
||||||
|
|
||||||
/* Private defines -----------------------------------------------------------*/
|
/* Private defines -----------------------------------------------------------*/
|
||||||
|
#define Power2_Pin GPIO_PIN_13
|
||||||
|
#define Power2_GPIO_Port GPIOC
|
||||||
|
#define Power1_Pin GPIO_PIN_14
|
||||||
|
#define Power1_GPIO_Port GPIOC
|
||||||
|
#define Power_5V_EN_Pin GPIO_PIN_15
|
||||||
|
#define Power_5V_EN_GPIO_Port GPIOC
|
||||||
#define ACC_CS_Pin GPIO_PIN_0
|
#define ACC_CS_Pin GPIO_PIN_0
|
||||||
#define ACC_CS_GPIO_Port GPIOC
|
#define ACC_CS_GPIO_Port GPIOC
|
||||||
#define GYRO_CS_Pin GPIO_PIN_3
|
#define GYRO_CS_Pin GPIO_PIN_3
|
||||||
|
|||||||
@@ -141,10 +141,10 @@ void MX_FDCAN3_Init(void)
|
|||||||
hfdcan3.Init.AutoRetransmission = ENABLE;
|
hfdcan3.Init.AutoRetransmission = ENABLE;
|
||||||
hfdcan3.Init.TransmitPause = DISABLE;
|
hfdcan3.Init.TransmitPause = DISABLE;
|
||||||
hfdcan3.Init.ProtocolException = ENABLE;
|
hfdcan3.Init.ProtocolException = ENABLE;
|
||||||
hfdcan3.Init.NominalPrescaler = 24;
|
hfdcan3.Init.NominalPrescaler = 3;
|
||||||
hfdcan3.Init.NominalSyncJumpWidth = 10;
|
hfdcan3.Init.NominalSyncJumpWidth = 10;
|
||||||
hfdcan3.Init.NominalTimeSeg1 = 2;
|
hfdcan3.Init.NominalTimeSeg1 = 29;
|
||||||
hfdcan3.Init.NominalTimeSeg2 = 2;
|
hfdcan3.Init.NominalTimeSeg2 = 10;
|
||||||
hfdcan3.Init.DataPrescaler = 3;
|
hfdcan3.Init.DataPrescaler = 3;
|
||||||
hfdcan3.Init.DataSyncJumpWidth = 10;
|
hfdcan3.Init.DataSyncJumpWidth = 10;
|
||||||
hfdcan3.Init.DataTimeSeg1 = 29;
|
hfdcan3.Init.DataTimeSeg1 = 29;
|
||||||
@@ -160,7 +160,7 @@ void MX_FDCAN3_Init(void)
|
|||||||
hfdcan3.Init.RxBufferSize = FDCAN_DATA_BYTES_8;
|
hfdcan3.Init.RxBufferSize = FDCAN_DATA_BYTES_8;
|
||||||
hfdcan3.Init.TxEventsNbr = 0;
|
hfdcan3.Init.TxEventsNbr = 0;
|
||||||
hfdcan3.Init.TxBuffersNbr = 0;
|
hfdcan3.Init.TxBuffersNbr = 0;
|
||||||
hfdcan3.Init.TxFifoQueueElmtsNbr = 6;
|
hfdcan3.Init.TxFifoQueueElmtsNbr = 32;
|
||||||
hfdcan3.Init.TxFifoQueueMode = FDCAN_TX_FIFO_OPERATION;
|
hfdcan3.Init.TxFifoQueueMode = FDCAN_TX_FIFO_OPERATION;
|
||||||
hfdcan3.Init.TxElmtSize = FDCAN_DATA_BYTES_8;
|
hfdcan3.Init.TxElmtSize = FDCAN_DATA_BYTES_8;
|
||||||
if (HAL_FDCAN_Init(&hfdcan3) != HAL_OK)
|
if (HAL_FDCAN_Init(&hfdcan3) != HAL_OK)
|
||||||
|
|||||||
@@ -136,30 +136,20 @@ void StartINSTASK(void const *argument);
|
|||||||
/* USER CODE END FunctionPrototypes */
|
/* USER CODE END FunctionPrototypes */
|
||||||
|
|
||||||
void StartDefaultTask(void *argument);
|
void StartDefaultTask(void *argument);
|
||||||
|
|
||||||
void ShootTask(void *argument);
|
void ShootTask(void *argument);
|
||||||
|
|
||||||
void GimbalTask(void *argument);
|
void GimbalTask(void *argument);
|
||||||
|
|
||||||
void ChassisTask(void *argument);
|
void ChassisTask(void *argument);
|
||||||
|
|
||||||
void StartInitTask(void *argument);
|
void StartInitTask(void *argument);
|
||||||
|
|
||||||
void VisionTask(void *argument);
|
void VisionTask(void *argument);
|
||||||
|
|
||||||
void CmdTask(void *argument);
|
void CmdTask(void *argument);
|
||||||
|
|
||||||
void RefereeTask(void *argument);
|
void RefereeTask(void *argument);
|
||||||
|
|
||||||
extern void ws2812Task(void *argument);
|
extern void ws2812Task(void *argument);
|
||||||
|
|
||||||
extern void MX_USB_DEVICE_Init(void);
|
extern void MX_USB_DEVICE_Init(void);
|
||||||
|
|
||||||
void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */
|
void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */
|
||||||
|
|
||||||
/* Hook prototypes */
|
/* Hook prototypes */
|
||||||
void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName);
|
void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName);
|
||||||
|
|
||||||
void vApplicationMallocFailedHook(void);
|
void vApplicationMallocFailedHook(void);
|
||||||
|
|
||||||
/* USER CODE BEGIN 4 */
|
/* USER CODE BEGIN 4 */
|
||||||
@@ -194,8 +184,7 @@ void vApplicationMallocFailedHook(void)
|
|||||||
* @param None
|
* @param None
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void MX_FREERTOS_Init(void)
|
void MX_FREERTOS_Init(void) {
|
||||||
{
|
|
||||||
/* USER CODE BEGIN Init */
|
/* USER CODE BEGIN Init */
|
||||||
|
|
||||||
/* USER CODE END Init */
|
/* USER CODE END Init */
|
||||||
@@ -254,6 +243,7 @@ void MX_FREERTOS_Init(void)
|
|||||||
/* USER CODE BEGIN RTOS_EVENTS */
|
/* USER CODE BEGIN RTOS_EVENTS */
|
||||||
/* add events, ... */
|
/* add events, ... */
|
||||||
/* USER CODE END RTOS_EVENTS */
|
/* USER CODE END RTOS_EVENTS */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN Header_StartDefaultTask */
|
/* USER CODE BEGIN Header_StartDefaultTask */
|
||||||
|
|||||||
@@ -56,10 +56,10 @@ void MX_GPIO_Init(void)
|
|||||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14|ACC_CS_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(GPIOC, Power2_Pin|Power1_Pin|ACC_CS_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_15|GYRO_CS_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(GPIOC, Power_5V_EN_Pin|GYRO_CS_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOA, power2_Pin|power1_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(GPIOA, power2_Pin|power1_Pin, GPIO_PIN_SET);
|
||||||
@@ -76,8 +76,8 @@ void MX_GPIO_Init(void)
|
|||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(cs3_GPIO_Port, cs3_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(cs3_GPIO_Port, cs3_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
/*Configure GPIO pins : PC14 PC15 */
|
/*Configure GPIO pins : Power2_Pin Power1_Pin Power_5V_EN_Pin */
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15;
|
GPIO_InitStruct.Pin = Power2_Pin|Power1_Pin|Power_5V_EN_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ FDCAN2.TxFifoQueueElmtsNbr=32
|
|||||||
FDCAN3.AutoRetransmission=ENABLE
|
FDCAN3.AutoRetransmission=ENABLE
|
||||||
FDCAN3.CalculateBaudRateNominal=1000000
|
FDCAN3.CalculateBaudRateNominal=1000000
|
||||||
FDCAN3.CalculateTimeBitNominal=1000
|
FDCAN3.CalculateTimeBitNominal=1000
|
||||||
FDCAN3.CalculateTimeQuantumNominal=200.0
|
FDCAN3.CalculateTimeQuantumNominal=25.0
|
||||||
FDCAN3.ClockCalibrationCCU=DISABLE
|
FDCAN3.ClockCalibrationCCU=DISABLE
|
||||||
FDCAN3.DataPrescaler=3
|
FDCAN3.DataPrescaler=3
|
||||||
FDCAN3.DataSyncJumpWidth=10
|
FDCAN3.DataSyncJumpWidth=10
|
||||||
@@ -377,14 +377,14 @@ FDCAN3.DataTimeSeg1=29
|
|||||||
FDCAN3.DataTimeSeg2=10
|
FDCAN3.DataTimeSeg2=10
|
||||||
FDCAN3.IPParameters=CalculateTimeQuantumNominal,CalculateTimeBitNominal,CalculateBaudRateNominal,DataPrescaler,DataTimeSeg1,DataTimeSeg2,NominalPrescaler,NominalTimeSeg1,NominalTimeSeg2,RxFifo1ElmtsNbr,TxFifoQueueElmtsNbr,MessageRAMOffset,StdFiltersNbr,AutoRetransmission,ProtocolException,NominalSyncJumpWidth,DataSyncJumpWidth,ClockCalibrationCCU
|
FDCAN3.IPParameters=CalculateTimeQuantumNominal,CalculateTimeBitNominal,CalculateBaudRateNominal,DataPrescaler,DataTimeSeg1,DataTimeSeg2,NominalPrescaler,NominalTimeSeg1,NominalTimeSeg2,RxFifo1ElmtsNbr,TxFifoQueueElmtsNbr,MessageRAMOffset,StdFiltersNbr,AutoRetransmission,ProtocolException,NominalSyncJumpWidth,DataSyncJumpWidth,ClockCalibrationCCU
|
||||||
FDCAN3.MessageRAMOffset=1706
|
FDCAN3.MessageRAMOffset=1706
|
||||||
FDCAN3.NominalPrescaler=24
|
FDCAN3.NominalPrescaler=3
|
||||||
FDCAN3.NominalSyncJumpWidth=10
|
FDCAN3.NominalSyncJumpWidth=10
|
||||||
FDCAN3.NominalTimeSeg1=2
|
FDCAN3.NominalTimeSeg1=29
|
||||||
FDCAN3.NominalTimeSeg2=2
|
FDCAN3.NominalTimeSeg2=10
|
||||||
FDCAN3.ProtocolException=ENABLE
|
FDCAN3.ProtocolException=ENABLE
|
||||||
FDCAN3.RxFifo1ElmtsNbr=32
|
FDCAN3.RxFifo1ElmtsNbr=32
|
||||||
FDCAN3.StdFiltersNbr=1
|
FDCAN3.StdFiltersNbr=1
|
||||||
FDCAN3.TxFifoQueueElmtsNbr=6
|
FDCAN3.TxFifoQueueElmtsNbr=32
|
||||||
FREERTOS.FootprintOK=true
|
FREERTOS.FootprintOK=true
|
||||||
FREERTOS.IPParameters=Tasks01,configENABLE_FPU,FootprintOK,configUSE_NEWLIB_REENTRANT,configCHECK_FOR_STACK_OVERFLOW,configUSE_MALLOC_FAILED_HOOK,configTOTAL_HEAP_SIZE,configMINIMAL_STACK_SIZE
|
FREERTOS.IPParameters=Tasks01,configENABLE_FPU,FootprintOK,configUSE_NEWLIB_REENTRANT,configCHECK_FOR_STACK_OVERFLOW,configUSE_MALLOC_FAILED_HOOK,configTOTAL_HEAP_SIZE,configMINIMAL_STACK_SIZE
|
||||||
FREERTOS.Tasks01=BeginTask,24,256,StartDefaultTask,As weak,NULL,Dynamic,NULL,NULL;shoot,24,512,ShootTask,As weak,NULL,Dynamic,NULL,NULL;gimbal,24,512,GimbalTask,As weak,NULL,Dynamic,NULL,NULL;chassis,24,512,ChassisTask,As weak,NULL,Dynamic,NULL,NULL;init,40,256,StartInitTask,As weak,NULL,Dynamic,NULL,NULL;vision,24,512,VisionTask,As weak,NULL,Dynamic,NULL,NULL;cmd,24,512,CmdTask,As weak,NULL,Dynamic,NULL,NULL;reference,24,512,RefereeTask,As weak,NULL,Dynamic,NULL,NULL;WS2812Task,16,256,ws2812Task,As external,NULL,Dynamic,NULL,NULL
|
FREERTOS.Tasks01=BeginTask,24,256,StartDefaultTask,As weak,NULL,Dynamic,NULL,NULL;shoot,24,512,ShootTask,As weak,NULL,Dynamic,NULL,NULL;gimbal,24,512,GimbalTask,As weak,NULL,Dynamic,NULL,NULL;chassis,24,512,ChassisTask,As weak,NULL,Dynamic,NULL,NULL;init,40,256,StartInitTask,As weak,NULL,Dynamic,NULL,NULL;vision,24,512,VisionTask,As weak,NULL,Dynamic,NULL,NULL;cmd,24,512,CmdTask,As weak,NULL,Dynamic,NULL,NULL;reference,24,512,RefereeTask,As weak,NULL,Dynamic,NULL,NULL;WS2812Task,16,256,ws2812Task,As external,NULL,Dynamic,NULL,NULL
|
||||||
@@ -449,6 +449,7 @@ MMTAppReg6.MEMORYMAP.Size=1048576
|
|||||||
MMTAppReg6.MEMORYMAP.StartAddress=0x08000000
|
MMTAppReg6.MEMORYMAP.StartAddress=0x08000000
|
||||||
MMTAppRegionsCount=6
|
MMTAppRegionsCount=6
|
||||||
MMTConfigApplied=false
|
MMTConfigApplied=false
|
||||||
|
MMTSectionSuffix=
|
||||||
Mcu.CPN=STM32H723VGT6
|
Mcu.CPN=STM32H723VGT6
|
||||||
Mcu.Family=STM32H7
|
Mcu.Family=STM32H7
|
||||||
Mcu.IP0=ADC1
|
Mcu.IP0=ADC1
|
||||||
@@ -483,72 +484,73 @@ Mcu.Name=STM32H723VGTx
|
|||||||
Mcu.Package=LQFP100
|
Mcu.Package=LQFP100
|
||||||
Mcu.Pin0=PE2
|
Mcu.Pin0=PE2
|
||||||
Mcu.Pin1=PE3
|
Mcu.Pin1=PE3
|
||||||
Mcu.Pin10=PA0
|
Mcu.Pin10=PC3_C
|
||||||
Mcu.Pin11=PA2
|
Mcu.Pin11=PA0
|
||||||
Mcu.Pin12=PA5
|
Mcu.Pin12=PA2
|
||||||
Mcu.Pin13=PA6
|
Mcu.Pin13=PA5
|
||||||
Mcu.Pin14=PA7
|
Mcu.Pin14=PA6
|
||||||
Mcu.Pin15=PC4
|
Mcu.Pin15=PA7
|
||||||
Mcu.Pin16=PB1
|
Mcu.Pin16=PC4
|
||||||
Mcu.Pin17=PE7
|
Mcu.Pin17=PB1
|
||||||
Mcu.Pin18=PE8
|
Mcu.Pin18=PE7
|
||||||
Mcu.Pin19=PE9
|
Mcu.Pin19=PE8
|
||||||
Mcu.Pin2=PC14-OSC32_IN
|
Mcu.Pin2=PC13
|
||||||
Mcu.Pin20=PE10
|
Mcu.Pin20=PE9
|
||||||
Mcu.Pin21=PE12
|
Mcu.Pin21=PE10
|
||||||
Mcu.Pin22=PE13
|
Mcu.Pin22=PE12
|
||||||
Mcu.Pin23=PE15
|
Mcu.Pin23=PE13
|
||||||
Mcu.Pin24=PB10
|
Mcu.Pin24=PE15
|
||||||
Mcu.Pin25=PB11
|
Mcu.Pin25=PB10
|
||||||
Mcu.Pin26=PB13
|
Mcu.Pin26=PB11
|
||||||
Mcu.Pin27=PB15
|
Mcu.Pin27=PB13
|
||||||
Mcu.Pin28=PD8
|
Mcu.Pin28=PB15
|
||||||
Mcu.Pin29=PD9
|
Mcu.Pin29=PD8
|
||||||
Mcu.Pin3=PC15-OSC32_OUT
|
Mcu.Pin3=PC14-OSC32_IN
|
||||||
Mcu.Pin30=PD10
|
Mcu.Pin30=PD9
|
||||||
Mcu.Pin31=PD12
|
Mcu.Pin31=PD10
|
||||||
Mcu.Pin32=PD13
|
Mcu.Pin32=PD12
|
||||||
Mcu.Pin33=PA8
|
Mcu.Pin33=PD13
|
||||||
Mcu.Pin34=PA9
|
Mcu.Pin34=PA8
|
||||||
Mcu.Pin35=PA10
|
Mcu.Pin35=PA9
|
||||||
Mcu.Pin36=PA11
|
Mcu.Pin36=PA10
|
||||||
Mcu.Pin37=PA12
|
Mcu.Pin37=PA11
|
||||||
Mcu.Pin38=PC10
|
Mcu.Pin38=PA12
|
||||||
Mcu.Pin39=PC11
|
Mcu.Pin39=PC10
|
||||||
Mcu.Pin4=PH0-OSC_IN
|
Mcu.Pin4=PC15-OSC32_OUT
|
||||||
Mcu.Pin40=PC12
|
Mcu.Pin40=PC11
|
||||||
Mcu.Pin41=PD0
|
Mcu.Pin41=PC12
|
||||||
Mcu.Pin42=PD1
|
Mcu.Pin42=PD0
|
||||||
Mcu.Pin43=PD2
|
Mcu.Pin43=PD1
|
||||||
Mcu.Pin44=PD4
|
Mcu.Pin44=PD2
|
||||||
Mcu.Pin45=PD5
|
Mcu.Pin45=PD4
|
||||||
Mcu.Pin46=PD6
|
Mcu.Pin46=PD5
|
||||||
Mcu.Pin47=PD7
|
Mcu.Pin47=PD6
|
||||||
Mcu.Pin48=PB3(JTDO/TRACESWO)
|
Mcu.Pin48=PD7
|
||||||
Mcu.Pin49=PB4(NJTRST)
|
Mcu.Pin49=PB3(JTDO/TRACESWO)
|
||||||
Mcu.Pin5=PH1-OSC_OUT
|
Mcu.Pin5=PH0-OSC_IN
|
||||||
Mcu.Pin50=PB5
|
Mcu.Pin50=PB4(NJTRST)
|
||||||
Mcu.Pin51=PB6
|
Mcu.Pin51=PB5
|
||||||
Mcu.Pin52=VP_ADC3_TempSens_Input
|
Mcu.Pin52=PB6
|
||||||
Mcu.Pin53=VP_CRC_VS_CRC
|
Mcu.Pin53=VP_ADC3_TempSens_Input
|
||||||
Mcu.Pin54=VP_FREERTOS_VS_CMSIS_V2
|
Mcu.Pin54=VP_CRC_VS_CRC
|
||||||
Mcu.Pin55=VP_SYS_VS_tim23
|
Mcu.Pin55=VP_FREERTOS_VS_CMSIS_V2
|
||||||
Mcu.Pin56=VP_TIM1_VS_ClockSourceINT
|
Mcu.Pin56=VP_SYS_VS_tim23
|
||||||
Mcu.Pin57=VP_TIM1_VS_no_output3
|
Mcu.Pin57=VP_TIM1_VS_ClockSourceINT
|
||||||
Mcu.Pin58=VP_USB_DEVICE_VS_USB_DEVICE_CDC_HS
|
Mcu.Pin58=VP_TIM1_VS_no_output3
|
||||||
Mcu.Pin59=VP_MEMORYMAP_VS_MEMORYMAP
|
Mcu.Pin59=VP_USB_DEVICE_VS_USB_DEVICE_CDC_HS
|
||||||
Mcu.Pin6=PC0
|
Mcu.Pin6=PH1-OSC_OUT
|
||||||
Mcu.Pin60=VP_STMicroelectronics.X-CUBE-ALGOBUILD_VS_DSPOoLibraryJjLibrary_1.4.0_1.4.0
|
Mcu.Pin60=VP_MEMORYMAP_VS_MEMORYMAP
|
||||||
Mcu.Pin7=PC1
|
Mcu.Pin61=VP_STMicroelectronics.X-CUBE-ALGOBUILD_VS_DSPOoLibraryJjLibrary_1.4.0_1.4.0
|
||||||
Mcu.Pin8=PC2_C
|
Mcu.Pin7=PC0
|
||||||
Mcu.Pin9=PC3_C
|
Mcu.Pin8=PC1
|
||||||
Mcu.PinsNb=61
|
Mcu.Pin9=PC2_C
|
||||||
|
Mcu.PinsNb=62
|
||||||
Mcu.ThirdParty0=STMicroelectronics.X-CUBE-ALGOBUILD.1.4.0
|
Mcu.ThirdParty0=STMicroelectronics.X-CUBE-ALGOBUILD.1.4.0
|
||||||
Mcu.ThirdPartyNb=1
|
Mcu.ThirdPartyNb=1
|
||||||
Mcu.UserConstants=
|
Mcu.UserConstants=
|
||||||
Mcu.UserName=STM32H723VGTx
|
Mcu.UserName=STM32H723VGTx
|
||||||
MxCube.Version=6.15.0
|
MxCube.Version=6.16.0
|
||||||
MxDb.Version=DB.6.0.150
|
MxDb.Version=DB.6.0.160
|
||||||
NVIC.ADC_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
|
NVIC.ADC_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
|
||||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.DMA1_Stream0_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true
|
NVIC.DMA1_Stream0_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true
|
||||||
@@ -676,9 +678,16 @@ PC11.Signal=SPI3_MISO
|
|||||||
PC12.Locked=true
|
PC12.Locked=true
|
||||||
PC12.Signal=SharedStack_PC12
|
PC12.Signal=SharedStack_PC12
|
||||||
PC12.Stacked=true
|
PC12.Stacked=true
|
||||||
|
PC13.GPIOParameters=GPIO_Label
|
||||||
|
PC13.GPIO_Label=Power2
|
||||||
|
PC13.Locked=true
|
||||||
|
PC13.Signal=GPIO_Output
|
||||||
|
PC14-OSC32_IN.GPIOParameters=GPIO_Label
|
||||||
|
PC14-OSC32_IN.GPIO_Label=Power1
|
||||||
PC14-OSC32_IN.Locked=true
|
PC14-OSC32_IN.Locked=true
|
||||||
PC14-OSC32_IN.Signal=GPIO_Output
|
PC14-OSC32_IN.Signal=GPIO_Output
|
||||||
PC15-OSC32_OUT.GPIOParameters=PinState
|
PC15-OSC32_OUT.GPIOParameters=PinState,GPIO_Label
|
||||||
|
PC15-OSC32_OUT.GPIO_Label=Power_5V_EN
|
||||||
PC15-OSC32_OUT.Locked=true
|
PC15-OSC32_OUT.Locked=true
|
||||||
PC15-OSC32_OUT.PinState=GPIO_PIN_SET
|
PC15-OSC32_OUT.PinState=GPIO_PIN_SET
|
||||||
PC15-OSC32_OUT.Signal=GPIO_Output
|
PC15-OSC32_OUT.Signal=GPIO_Output
|
||||||
@@ -780,6 +789,7 @@ ProjectManager.DeletePrevious=true
|
|||||||
ProjectManager.DeviceId=STM32H723VGTx
|
ProjectManager.DeviceId=STM32H723VGTx
|
||||||
ProjectManager.FirmwarePackage=STM32Cube FW_H7 V1.12.1
|
ProjectManager.FirmwarePackage=STM32Cube FW_H7 V1.12.1
|
||||||
ProjectManager.FreePins=false
|
ProjectManager.FreePins=false
|
||||||
|
ProjectManager.FreePinsContext=
|
||||||
ProjectManager.HalAssertFull=false
|
ProjectManager.HalAssertFull=false
|
||||||
ProjectManager.HeapSize=0x4000
|
ProjectManager.HeapSize=0x4000
|
||||||
ProjectManager.KeepUserCode=true
|
ProjectManager.KeepUserCode=true
|
||||||
|
|||||||
@@ -124,13 +124,9 @@ extern USBD_HandleTypeDef hUsbDeviceHS;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int8_t CDC_Init_HS(void);
|
static int8_t CDC_Init_HS(void);
|
||||||
|
|
||||||
static int8_t CDC_DeInit_HS(void);
|
static int8_t CDC_DeInit_HS(void);
|
||||||
|
static int8_t CDC_Control_HS(uint8_t cmd, uint8_t* pbuf, uint16_t length);
|
||||||
static int8_t CDC_Control_HS(uint8_t cmd, uint8_t *pbuf, uint16_t length);
|
static int8_t CDC_Receive_HS(uint8_t* pbuf, uint32_t *Len);
|
||||||
|
|
||||||
static int8_t CDC_Receive_HS(uint8_t *pbuf, uint32_t *Len);
|
|
||||||
|
|
||||||
static int8_t CDC_TransmitCplt_HS(uint8_t *pbuf, uint32_t *Len, uint8_t epnum);
|
static int8_t CDC_TransmitCplt_HS(uint8_t *pbuf, uint32_t *Len, uint8_t epnum);
|
||||||
|
|
||||||
/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */
|
/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */
|
||||||
@@ -143,11 +139,11 @@ static int8_t CDC_TransmitCplt_HS(uint8_t *pbuf, uint32_t *Len, uint8_t epnum);
|
|||||||
|
|
||||||
USBD_CDC_ItfTypeDef USBD_Interface_fops_HS =
|
USBD_CDC_ItfTypeDef USBD_Interface_fops_HS =
|
||||||
{
|
{
|
||||||
CDC_Init_HS,
|
CDC_Init_HS,
|
||||||
CDC_DeInit_HS,
|
CDC_DeInit_HS,
|
||||||
CDC_Control_HS,
|
CDC_Control_HS,
|
||||||
CDC_Receive_HS,
|
CDC_Receive_HS,
|
||||||
CDC_TransmitCplt_HS
|
CDC_TransmitCplt_HS
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Private functions ---------------------------------------------------------*/
|
/* Private functions ---------------------------------------------------------*/
|
||||||
@@ -158,12 +154,12 @@ USBD_CDC_ItfTypeDef USBD_Interface_fops_HS =
|
|||||||
*/
|
*/
|
||||||
static int8_t CDC_Init_HS(void)
|
static int8_t CDC_Init_HS(void)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 8 */
|
/* USER CODE BEGIN 8 */
|
||||||
/* Set Application Buffers */
|
/* Set Application Buffers */
|
||||||
USBD_CDC_SetTxBuffer(&hUsbDeviceHS, UserTxBufferHS, 0);
|
USBD_CDC_SetTxBuffer(&hUsbDeviceHS, UserTxBufferHS, 0);
|
||||||
USBD_CDC_SetRxBuffer(&hUsbDeviceHS, UserRxBufferHS);
|
USBD_CDC_SetRxBuffer(&hUsbDeviceHS, UserRxBufferHS);
|
||||||
return (USBD_OK);
|
return (USBD_OK);
|
||||||
/* USER CODE END 8 */
|
/* USER CODE END 8 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -173,9 +169,9 @@ static int8_t CDC_Init_HS(void)
|
|||||||
*/
|
*/
|
||||||
static int8_t CDC_DeInit_HS(void)
|
static int8_t CDC_DeInit_HS(void)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 9 */
|
/* USER CODE BEGIN 9 */
|
||||||
return (USBD_OK);
|
return (USBD_OK);
|
||||||
/* USER CODE END 9 */
|
/* USER CODE END 9 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -185,9 +181,9 @@ static int8_t CDC_DeInit_HS(void)
|
|||||||
* @param length: Number of data to be sent (in bytes)
|
* @param length: Number of data to be sent (in bytes)
|
||||||
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
|
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
|
||||||
*/
|
*/
|
||||||
static int8_t CDC_Control_HS(uint8_t cmd, uint8_t *pbuf, uint16_t length)
|
static int8_t CDC_Control_HS(uint8_t cmd, uint8_t* pbuf, uint16_t length)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 10 */
|
/* USER CODE BEGIN 10 */
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case CDC_SEND_ENCAPSULATED_COMMAND:
|
case CDC_SEND_ENCAPSULATED_COMMAND:
|
||||||
@@ -248,7 +244,7 @@ static int8_t CDC_Control_HS(uint8_t cmd, uint8_t *pbuf, uint16_t length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (USBD_OK);
|
return (USBD_OK);
|
||||||
/* USER CODE END 10 */
|
/* USER CODE END 10 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -266,13 +262,13 @@ static int8_t CDC_Control_HS(uint8_t cmd, uint8_t *pbuf, uint16_t length)
|
|||||||
* @param Len: Number of data received (in bytes)
|
* @param Len: Number of data received (in bytes)
|
||||||
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAILL
|
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAILL
|
||||||
*/
|
*/
|
||||||
static int8_t CDC_Receive_HS(uint8_t *Buf, uint32_t *Len)
|
static int8_t CDC_Receive_HS(uint8_t* Buf, uint32_t *Len)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 11 */
|
/* USER CODE BEGIN 11 */
|
||||||
USBD_CDC_SetRxBuffer(&hUsbDeviceHS, &Buf[0]);
|
USBD_CDC_SetRxBuffer(&hUsbDeviceHS, &Buf[0]);
|
||||||
USBD_CDC_ReceivePacket(&hUsbDeviceHS);
|
USBD_CDC_ReceivePacket(&hUsbDeviceHS);
|
||||||
return (USBD_OK);
|
return (USBD_OK);
|
||||||
/* USER CODE END 11 */
|
/* USER CODE END 11 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -282,10 +278,10 @@ static int8_t CDC_Receive_HS(uint8_t *Buf, uint32_t *Len)
|
|||||||
* @param Len: Number of data to be sent (in bytes)
|
* @param Len: Number of data to be sent (in bytes)
|
||||||
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY
|
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY
|
||||||
*/
|
*/
|
||||||
uint8_t CDC_Transmit_HS(uint8_t *Buf, uint16_t Len)
|
uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len)
|
||||||
{
|
{
|
||||||
uint8_t result = USBD_OK;
|
uint8_t result = USBD_OK;
|
||||||
/* USER CODE BEGIN 12 */
|
/* USER CODE BEGIN 12 */
|
||||||
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) hUsbDeviceHS.pClassData;
|
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) hUsbDeviceHS.pClassData;
|
||||||
if (hcdc->TxState != 0)
|
if (hcdc->TxState != 0)
|
||||||
{
|
{
|
||||||
@@ -293,8 +289,8 @@ uint8_t CDC_Transmit_HS(uint8_t *Buf, uint16_t Len)
|
|||||||
}
|
}
|
||||||
USBD_CDC_SetTxBuffer(&hUsbDeviceHS, Buf, Len);
|
USBD_CDC_SetTxBuffer(&hUsbDeviceHS, Buf, Len);
|
||||||
result = USBD_CDC_TransmitPacket(&hUsbDeviceHS);
|
result = USBD_CDC_TransmitPacket(&hUsbDeviceHS);
|
||||||
/* USER CODE END 12 */
|
/* USER CODE END 12 */
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -311,15 +307,15 @@ uint8_t CDC_Transmit_HS(uint8_t *Buf, uint16_t Len)
|
|||||||
*/
|
*/
|
||||||
static int8_t CDC_TransmitCplt_HS(uint8_t *Buf, uint32_t *Len, uint8_t epnum)
|
static int8_t CDC_TransmitCplt_HS(uint8_t *Buf, uint32_t *Len, uint8_t epnum)
|
||||||
{
|
{
|
||||||
uint8_t result = USBD_OK;
|
uint8_t result = USBD_OK;
|
||||||
/* USER CODE BEGIN 14 */
|
/* USER CODE BEGIN 14 */
|
||||||
UNUSED(Buf);
|
UNUSED(Buf);
|
||||||
UNUSED(Len);
|
UNUSED(Len);
|
||||||
UNUSED(epnum);
|
UNUSED(epnum);
|
||||||
if (tx_cbk)
|
if (tx_cbk)
|
||||||
tx_cbk(*Len);
|
tx_cbk(*Len);
|
||||||
/* USER CODE END 14 */
|
/* USER CODE END 14 */
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */
|
/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */
|
||||||
|
|||||||
@@ -24,11 +24,7 @@
|
|||||||
#define __USBD_CDC_IF_H__
|
#define __USBD_CDC_IF_H__
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C" {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
@@ -111,7 +107,7 @@ extern USBD_CDC_ItfTypeDef USBD_Interface_fops_HS;
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint8_t CDC_Transmit_HS(uint8_t *Buf, uint16_t Len);
|
uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len);
|
||||||
|
|
||||||
/* USER CODE BEGIN EXPORTED_FUNCTIONS */
|
/* USER CODE BEGIN EXPORTED_FUNCTIONS */
|
||||||
uint8_t *CDCInitRxbufferNcallback(USBCallback transmit_cbk, USBCallback recv_cbk);
|
uint8_t *CDCInitRxbufferNcallback(USBCallback transmit_cbk, USBCallback recv_cbk);
|
||||||
|
|||||||
@@ -122,6 +122,8 @@
|
|||||||
|
|
||||||
华师佛山-VANGUARD [电控弹道解算例程](https://github.com/CodeAlanqian/SolveTrajectory)
|
华师佛山-VANGUARD [电控弹道解算例程](https://github.com/CodeAlanqian/SolveTrajectory)
|
||||||
|
|
||||||
|
达妙科技H7(MC02)开发板说明书及例程 :[达妙H7(MC02)开发板官方资料](https://gitee.com/kit-miao/dm-mc02)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
还要非常感谢愿意与我队电控一起交流,并无私提供帮助的这些队伍,他们是(以下排名不分先后):
|
还要非常感谢愿意与我队电控一起交流,并无私提供帮助的这些队伍,他们是(以下排名不分先后):
|
||||||
|
|||||||
Reference in New Issue
Block a user