2011-11-29 02:48 PM
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-documentatio2011-11-29 04:21 PM
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
2011-11-30 10:23 AM