MotorControl Workbench_6.3.2 __weak void MX_MotorControl_Init() ... can be excuetable??
1. using Workbench
"B-G431B-ESC1" board, "Gimbal GBM2804H-100T" motor
2. Generated Code "stm32CubeIDE", drive type: HAL
3. CubeIde code.
generated code as below...........
in main(), MX_MotorControl_Init() function can be executable normally?
Shouldn't the "__weak" in front of the function disappear?
Is the code generated properly?
Is there something wrong with the setting?
I generated the code without connecting B-G431B-ESC1.
main.c
int main(void)
{
..........
MX_TIM2_Init();
MX_MotorControl_Init();
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
motorcontrol.c
__weak void MX_MotorControl_Init(void)
{
/* Reconfigure the SysTick interrupt to fire every 500 us. */
(void)HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq() / SYS_TICK_FREQUENCY);
HAL_NVIC_SetPriority(SysTick_IRQn, uwTickPrio, 0U);
/* Initialize the Motor Control Subsystem */
MCboot(pMCI);
mc_lock_pins();
}
mc_task.c
__weak void MCboot( MCI_Handle_t* pMCIList[NBR_OF_MOTORS] )
{.........}
__weak void mc_lock_pins (void)
{.........}
........Thank you in advance.
