Library to handle the X_NUCLEO_IHM02A1 Motor Control Expansion Board based on the L6470 component.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   HelloWorld_IHM02A1 ConcorsoFinal HelloWorld_IHM02A1_mbedOS HelloWorld_IHM02A1-Serialinterpreter ... more

Fork of X_NUCLEO_IHM02A1 by ST Expansion SW Team

Embed: (wiki syntax)

« Back to documentation index

L6470_AppCMDs_ToBePrepared

L6470_AppCMDs_ToBePrepared
[L6470_AppCMDs]

Functions

void L6470_PrepareSetParam (eL6470_RegId_t L6470_RegId, uint32_t Value)
 Prepare to send L6470_SetParam command.
void L6470_PrepareGetParam (eL6470_RegId_t L6470_RegId)
 Prepare to send L6470_GetParam command.
void L6470_PrepareRun (eL6470_DirId_t L6470_DirId, uint32_t Speed)
 Prepare to send L6470_Run command.
void L6470_PrepareStepClock (eL6470_DirId_t L6470_DirId)
 Prepare to send L6470_StepClock command.
void L6470_PrepareMove (eL6470_DirId_t L6470_DirId, uint32_t N_Step)
 Prepare to send L6470_Move command.
void L6470_PrepareGoTo (uint32_t AbsPos)
 Prepare to send L6470_GoTo command.
void L6470_PrepareGoToDir (eL6470_DirId_t L6470_DirId, uint32_t AbsPos)
 Prepare to send L6470_GoToDIR command.
void L6470_PrepareGoUntil (eL6470_ActId_t L6470_ActId, eL6470_DirId_t L6470_DirId, uint32_t Speed)
 Prepare to send L6470_GoUntil command.
void L6470_PrepareReleaseSW (eL6470_ActId_t L6470_ActId, eL6470_DirId_t L6470_DirId)
 Prepare to send L6470_ReleaseSW.
void L6470_PrepareGoHome (void)
 Prepare to send L6470_GoHome command.
void L6470_PrepareGoMark (void)
 Prepare to send L6470_GoMark command.
void L6470_PrepareResetPos (void)
 Prepare to send L6470_ResetPos command.
void L6470_PrepareResetDevice (void)
 Prepare to send L6470_ResetDevice command.
void L6470_PrepareSoftStop (void)
 Prepare to send L6470_SoftStop command.
void L6470_PrepareHardStop (void)
 Prepare to send L6470_HardStop command.
void L6470_PrepareSoftHiZ (void)
 Prepare to send L6470_SoftHiZ command.
void L6470_PrepareHardHiZ (void)
 Prepare to send L6470_HardHiZ command.
void L6470_PrepareGetStatus (void)
 Prepare to send L6470_GetStatus command.
uint8_t * L6470_PerformPreparedApplicationCommand (void)
 Send via SPI the command stored inside the L6470_AppCmdPkg to the L6470 daisy chain.
void L6470_DaisyChainCommand (uint8_t *pL6470_DaisyChainSpiTxStruct, uint8_t *pL6470_DaisyChainSpiRxStruct)
 Send command to the L6470 daisy chain via SPI.
uint32_t L6470_ExtractReturnedData (uint8_t *pL6470_DaisyChainSpiRxStruct, uint8_t LengthByte)
 Extracts the data returned by the L6470 from the matrix that contains the received SPI data.
uint8_t L6470_CheckStatusRegisterFlag (uint8_t L6470_StatusRegisterFlagId)
 Check the state of a flag inside the L6470 STATUS register.
uint8_t * L6470_GetRegisterName (uint8_t id)
 Return the mnemonic name for the L6470 register.
status_t L6470_Config (void *init)
 Configures the L6470 registers.

Function Documentation

uint8_t L6470_CheckStatusRegisterFlag ( uint8_t  L6470_StatusRegisterFlagId ) [protected, inherited]

Check the state of a flag inside the L6470 STATUS register.

Parameters:
L6470_IdThe identifier of the L6470 target inside the daisy chain.
L6470_StatusRegisterFlagIdThe identifier of the L6470 STATUS flag to be checked.
Return values:
stateThe flag state.

Definition at line 1313 of file L6470.cpp.

status_t L6470_Config ( void *  init ) [protected, inherited]

Configures the L6470 registers.

Parameters:
initThe pointer to the initialization structure.

Definition at line 1391 of file L6470.cpp.

void L6470_DaisyChainCommand ( uint8_t *  pL6470_DaisyChainSpiTxStruct,
uint8_t *  pL6470_DaisyChainSpiRxStruct 
) [protected, inherited]

Send command to the L6470 daisy chain via SPI.

Parameters:
pL6470_DaisyChainSpiTxStructPointer to the matrix array of bytes to be sent to the daisy chain L6470
pL6470_DaisyChainSpiRxStructPointer to the matrix array of bytes to be received from the daisy chain L6470

<Simply deselect time delay for SPI nCS

Definition at line 1264 of file L6470.cpp.

uint32_t L6470_ExtractReturnedData ( uint8_t *  pL6470_DaisyChainSpiRxStruct,
uint8_t  LengthByte 
) [protected, inherited]

Extracts the data returned by the L6470 from the matrix that contains the received SPI data.

Parameters:
L6470_IdThe identifier of the L6470 target inside the daisy chain.
pL6470_DaisyChainSpiRxStructuint8_t-pointer to the matrix that contains the received data by SPI from the L6470 daisy chain.
LengthByteThe number of bytes about the received value.

Definition at line 1290 of file L6470.cpp.

uint8_t * L6470_GetRegisterName ( uint8_t  id ) [protected, inherited]

Return the mnemonic name for the L6470 register.

Parameters:
idThe identifier of the L6470 register.

Definition at line 1375 of file L6470.cpp.

uint8_t * L6470_PerformPreparedApplicationCommand ( void   ) [protected, inherited]

Send via SPI the command stored inside the L6470_AppCmdPkg to the L6470 daisy chain.

Return values:
(uint8_t*)data->L6470_DaisyChainSpiRxStructThe pointer to the structure containing returned values from each L6470 of the daisy chain for each sent SPI data.

Definition at line 1251 of file L6470.cpp.

void L6470_PrepareGetParam ( eL6470_RegId_t  L6470_RegId ) [protected, inherited]

Prepare to send L6470_GetParam command.

Parameters:
L6470_IdThe L6470 identifier inside the daisy chain.
L6470_RegIdThe identifier of the L6470 register to be addressed.
Return values:
ReceivedValueThe register value.
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1031 of file L6470.cpp.

void L6470_PrepareGetStatus ( void   ) [protected, inherited]

Prepare to send L6470_GetStatus command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1236 of file L6470.cpp.

void L6470_PrepareGoHome ( void   ) [protected, inherited]

Prepare to send L6470_GoHome command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1140 of file L6470.cpp.

void L6470_PrepareGoMark ( void   ) [protected, inherited]

Prepare to send L6470_GoMark command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1152 of file L6470.cpp.

void L6470_PrepareGoTo ( uint32_t  AbsPos ) [protected, inherited]

Prepare to send L6470_GoTo command.

Parameters:
AbsPosThe target absolute position.
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1085 of file L6470.cpp.

void L6470_PrepareGoToDir ( eL6470_DirId_t  L6470_DirId,
uint32_t  AbsPos 
) [protected, inherited]

Prepare to send L6470_GoToDIR command.

Parameters:
L6470_DirIdThe identifier of the L6470 motion direction.
AbsPosThe target absolute position.
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1099 of file L6470.cpp.

void L6470_PrepareGoUntil ( eL6470_ActId_t  L6470_ActId,
eL6470_DirId_t  L6470_DirId,
uint32_t  Speed 
) [protected, inherited]

Prepare to send L6470_GoUntil command.

Parameters:
L6470_ActIdThe identifier of the L6470 action about the absolute position.
L6470_DirIdThe identifier of the L6470 motion direction.
SpeedThe speed value as (([step/s] * 250e-9) / 2^-28)
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1114 of file L6470.cpp.

void L6470_PrepareHardHiZ ( void   ) [protected, inherited]

Prepare to send L6470_HardHiZ command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1224 of file L6470.cpp.

void L6470_PrepareHardStop ( void   ) [protected, inherited]

Prepare to send L6470_HardStop command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1200 of file L6470.cpp.

void L6470_PrepareMove ( eL6470_DirId_t  L6470_DirId,
uint32_t  N_Step 
) [protected, inherited]

Prepare to send L6470_Move command.

Parameters:
L6470_DirIdThe identifier of the L6470 motion direction.
N_StepThe number of microsteps.
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1072 of file L6470.cpp.

void L6470_PrepareReleaseSW ( eL6470_ActId_t  L6470_ActId,
eL6470_DirId_t  L6470_DirId 
) [protected, inherited]

Prepare to send L6470_ReleaseSW.

Parameters:
L6470_ActIdThe identifier of the L6470 action about the absolute position.
L6470_DirIdThe identifier of the L6470 motion direction.
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1128 of file L6470.cpp.

void L6470_PrepareResetDevice ( void   ) [protected, inherited]

Prepare to send L6470_ResetDevice command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1176 of file L6470.cpp.

void L6470_PrepareResetPos ( void   ) [protected, inherited]

Prepare to send L6470_ResetPos command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1164 of file L6470.cpp.

void L6470_PrepareRun ( eL6470_DirId_t  L6470_DirId,
uint32_t  Speed 
) [protected, inherited]

Prepare to send L6470_Run command.

Parameters:
L6470_DirIdThe identifier of the L6470 motion direction.
SpeedThe speed value as (([step/s] * 250e-9) / 2^-28)
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1045 of file L6470.cpp.

void L6470_PrepareSetParam ( eL6470_RegId_t  L6470_RegId,
uint32_t  Value 
) [protected, inherited]

Prepare to send L6470_SetParam command.

Parameters:
L6470_RegIdThe identifier of the L6470 register to be addressed.
ValueThe new value.
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1015 of file L6470.cpp.

void L6470_PrepareSoftHiZ ( void   ) [protected, inherited]

Prepare to send L6470_SoftHiZ command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1212 of file L6470.cpp.

void L6470_PrepareSoftStop ( void   ) [protected, inherited]

Prepare to send L6470_SoftStop command.

Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1188 of file L6470.cpp.

void L6470_PrepareStepClock ( eL6470_DirId_t  L6470_DirId ) [protected, inherited]

Prepare to send L6470_StepClock command.

Parameters:
L6470_DirIdThe identifier of the L6470 motion direction.
Note:
This function will properly fill the right column of the L6470_AppCmdPkg.
The commad will be sent by L6470_PerformPreparedApplicationCommand.

Definition at line 1058 of file L6470.cpp.