cancel
Showing results for 
Search instead for 
Did you mean: 

FOC Hardware configuration.

Posted on November 12, 2017 at 10:25

I've opened the P-NUCLEO-IHM001_SINGLEDRIVE project.

In Control stage parameters.h I see

#define PHASE_UH_GPIO_PORT            GPIOA                                                                            

#define PHASE_UH_GPIO_PIN                GPIO_Pin_8                                                 

#define PHASE_VH_GPIO_PORT            GPIOA                                                       

#define PHASE_VH_GPIO_PIN                 GPIO_Pin_9

#define PHASE_WH_GPIO_PORT           GPIOA                                                                         

#define PHASE_WH_GPIO_PIN               GPIO_Pin_10

#define PHASE_UL_GPIO_PORT            GPIOC                                                                        

#define PHASE_UL_GPIO_PIN                 GPIO_Pin_10

#define PHASE_VL_GPIO_PORT            GPIOC                                                                

#define PHASE_VL_GPIO_PIN                 GPIO_Pin_11

#define PHASE_WL_GPIO_PORT           GPIOC                                                        

#define PHASE_WL_GPIO_PIN                GPIO_Pin_12

But pins PC10, PC11, PC12 have no TIM1 functions.

Then I see

#define PHASE_U_CURR_ADC                ADC1

#define PHASE_U_CURR_CHANNEL      ADC_Channel_1

#define PHASE_U_GPIO_PORT               GPIOA

#define PHASE_U_GPIO_PIN                GPIO_Pin_0

But PA0 already used

#define ENC_A_GPIO_PORT               GPIOA

#define ENC_B_GPIO_PORT               GPIOA

#define ENC_A_GPIO_PIN                    GPIO_Pin_0

#define ENC_B_GPIO_PIN                    GPIO_Pin_1

And I didn't find any B-emf related pins.

And in the main.c - there is no hardware initialization function.

0 REPLIES 0