cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communicaion Class Documentation questions (FOC SDK) UM1052

ericc
Associate II
Posted on November 29, 2011 at 23:48

 I'm reviewing the user manual for the

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/CD00298474.pdf

(Doc ID 18458 Rev 2) and I have a few questions.

Table 37: Page 112/122 shows information about Register type (u8,u16,etc) and a column for payload length associated with each register type.

For each register type, for example u8 it lists a payload size of (2 bytes).  u32 shows a payload length of (5 bytes).  This looks to me like this is payload data + CRC for the payload size.

However, if we look at any of the Figures that shown frame data the payload size NEVER includes the CRC.

For example Figure 80 shows a Data Ack frame as being (0xF0,0x00,CRC) where the payload size is 0x00.

What is the correct payload length for each of the commands? Does this include the CRC? Does data from the SDK include the CRC in it's payload size value?

Finally going back to Table 37.

The Register ID values in the table go from 0x0C to 0x1D,0x1E,0x1F,0x10.  I'm assuming this should have been  0x0C,0x0D,0x0E,0x0F,0x10

At the bottom of Table 37 the last entry shows a value of 0x20 for ''access'' instead of the R/W every other register uses.. Another typo?

Thanks

Eric

#um1052-foc-pmsm-sdk-documentatio
2 REPLIES 2
Posted on November 30, 2011 at 01:21

For each register type, for example u8 it lists a payload size of (2 bytes).  u32 shows a payload length of (5 bytes).  This looks to me like this is payload data + CRC for the payload size.

 

 

However, if we look at any of the Figures that shown frame data the payload size NEVER includes the CRC

It's not the CRC, for u8 registers it's 1+1, for u16 1+2, and for u32 1+4.

The first parameter is the register id (8-bits), and then a register dependent data width (ie 8, 16 or 32-bits).

So

Sending 0x02 0x01 0x1C CRC

Returns 0xF0 0x05 0x1C 0x11 0x22 0x33 0x44 CRC

GET[0x1C] = 0x44332211
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ericc
Associate II
Posted on November 30, 2011 at 19:23

 Thanks for clearing that up. I was reading that column in my head as register size not payload size.

Eric