2011-12-10 01:48 AM
2011-12-13 12:51 AM
Hello Eric
The serial communication implemented in the STM32 FOC SDK 3.0 has been the firts try to estabilsh a realtime communication between the firmware and the PC. Consider that the fist version of Workbench do not support real time communication. We knows that in the user manual of the STM32 FOC SDK 3.0 there are some mistakes regarding the serial communication registers and may be something is not well documented. We are now develop a new version of protocol that will be used to comunicate with ST MC Workbench (1.2) and to make the firmware compatible we will release a 3.0.1 version soon. Regarding the documentation of the MC protocol we don't have a new document release. It will be done in the release of STM32 FOC SDK 3.2. Until then I can try to explain the beaviour of the released version of MC protocol you need. The status register reaturs the status of the firmware state macchine according the following table </colgroup>
IDLE
0x0
IDLE_ALIGNMENT
0x1
ALIGNMENT
0x2
IDLE_START
0x3
START
0x4
START_RUN
0x5
RUN
0x6
ANY_STOP
0x7
STOP
0x8
STOP_IDLE
0x9
FAULT_NOW
0xA
FAULT_OVER
0XB
The flag register is a bit filed value composed by the following bits or-ed </colgroup>
NO FAULTS
0x0000
FOC DURATION
0x0001
OVER_VOLTAGE
0x0002
UNDER_VOLTAGE
0x0004
OVERHEAT
0x0008
START_UP_FAILURE
0x0010
SPEED_FEEDBACK
0x0020
OVERCURRENT
0x0040
SOFTWARE_ERROR
0x0080
Get board info 0x06 0x00 0x06 frame returs a string containg the firmware version you can try to decode it in ascii. Finally the 0x0A error code is BAD CRC. Consider that some register is not correctly mapped in the table you find in the user manual please consider the defined value in the UserInterfaceClass.h typedef enum { MC_PROTOCOL_REG_TARGET_MOTOR, MC_PROTOCOL_REG_FLAGS, MC_PROTOCOL_REG_STATUS, MC_PROTOCOL_REG_CONTROL_MODE, ... } MC_Protocol_REG_t; Ciao Gigi2011-12-13 01:02 AM
2011-12-13 05:39 AM
Ciao Eric
I think that in the first quarter of 2012 a web distribution of STM32 FOC SDK 3.2 can be availble. Ciao Gigi2021-06-28 02:44 AM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards