cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 FOC PMSM SDKv3.0 register information not in manual.

ericc
Associate II
Posted on December 10, 2011 at 10:48

Is there a document that shows how to interpret the ''flags'' and ''status'' (Serial communication) register when read from the processor. I can query and receive the u32 Flags data and the u8 status data but the user manual doesn't provide any context to the bit's.

The same goes for using frame code 0x06 which is suppose to report ''board info''.  I get a frame with a lot of data and no way to interpret it.

Finally I did see an error code of 0x0a which isn't listed in the manual. I'm guessing this is a bad CRC error code?

Is there another document which descibeds this information other then STM32 PMSM MC Library v3.0 User manual?

Thanks

Eric

#stm32-foc-pmsm-sdkv3.0
4 REPLIES 4
Gigi
ST Employee
Posted on December 13, 2011 at 09:51

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 Gigi
ericc
Associate II
Posted on December 13, 2011 at 10:02

Thank you for the quick response. The register information you provided will be most helpful.

Do you have an estimate on when the next release of the SDK and MC Workbench are due?

Thanks

Eric

Gigi
ST Employee
Posted on December 13, 2011 at 14:39

Ciao Eric

I think that in the first quarter of 2012 a web distribution of STM32 FOC SDK 3.2 can be availble.

Ciao

Gigi

Laurent Ca...
Lead II

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