| Electronic Components Datasheet Search |
|
AN4290 Datasheet(PDF) 6 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4290 Datasheet(HTML) 6 Page - STMicroelectronics |
|
6 / 16 page ![]() SPI communication interface AN4290 6/16 DocID024501 Rev 2 Reading and writing registers (GetParam and SetParam commands) All the device registers can be read using the GetParam and written using the SetParam command. While the reading is always available, the writing of the registers is bound to the state of driving of the motor. In particular: – Some registers are read only. – Critical configuration registers can be modified only when the power stage is disabled. – Some parameters related to the speed profile and the positioning can be modified when the motor is stopped (L6470, L6472, L648x and powerSTEP01 only). The SetParam command byte is described in Table 2. It includes the address of the target registers in five low significant bits (ADDR[4] to ADDR[0]). The command byte has to be followed by an argument providing the new register value (most significant byte first) and does not generate any response byte (standard response bytes are returned if no previous response is pending). The byte length of the argument depends on the dimension of the target register. For example a 12-bit register requires a 2-byte argument and a 4-bit register requires a single byte argument. Some bits of the argument could be ignored according to the structure of the target register. As a consequence, the SetParam is the only command composed of a variable number of bytes (command byte + 1, 2 or 3 argument bytes according to the target register). The Table 4 lists the number of argument bytes for each device register. Some registers of the device are read only or can be only written in particular conditions (see Table 4). If the host microcontroller sends a SetParam command targeting a read only or a not existing register (the address value does not match any register) the command byte is ignored and the wrong command failure flag in the STATUS register is latched (in the L648x and powerSTEP01 devices the wrong command and the not performable command failure flags correspond to the same bit). In this case the failure occurs as soon as the command byte is received, so no argument byte must be sent as shown in Figure 3. Table 2. SetParam byte command Bit # 7 654 321 0 0 0 0 ADDR[4] ADDR[3] ADDR[2] ADDR[1] ADDR[0] |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |