cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 FOC PMSM SDKv3.0 Timer initialisation

n239955_stm1_stmicro
Associate II
Posted on February 15, 2012 at 01:24

Hi,

I'm working with the PMSM firmware library V3.0 to make a motor control using the STM32F103C8T6 processor operating on my own board. I am working with the provided non-RTOS project which was originally configured for the STM3210B-EVAL board.

I have the problem that timer 1 apears to be remapped (AFIOMAPR:TIM1_REMAP = 0x3) regardless of definition:

#define PWM_TIMER_REMAPPING               PWM_NO_REMAP

in the Control stage parameters.h file.

Edit: Problem solved by using the Batch build option to re-compile the motor control code instead of just Download and Debug which only recompiles the user project.

Thank you

Nick
2 REPLIES 2
bille.stello
Associate III
Posted on February 15, 2012 at 16:24

Hello Nick,

r you using the PC Tool STMCWB (ST MC Workbench)  for the generation of Control stage parameters.h file? Can you share the ST MC Workbench configuration file?

Regards,

Billino

n239955_stm1_stmicro
Associate II
Posted on February 15, 2012 at 21:09

Hi Billino,

Thank you for your prompt reply.

I originally generated the Control stage parameters.h file with ST MC Workbench for the STM3210B-EVAL board  and then modified them by hand for my hardware.

Actually I have already solved the problem: I had not used the Batch Build function in IAR Workbench after modifying the .h files. Once the software was re-built with the Batch Build function it began to work correctly.

Thank you,

Nick