Other Parts Discussed in Thread: HALCOGEN
#include "sys_common.h"
/* USER CODE BEGIN (1) */
#include "eqep.h"
#include "sys_core.h"
/* USER CODE END */
/* USER CODE BEGIN (2) */
#define UNIT_POSITION_X 60U
/* USER CODE END */
{
/* USER CODE BEGIN (3) */
uint16 deltaT = 0U;
float velocity = 0U;
/* EQEP initialization based on GUI Configuration. */
/* Enable Position Counter */
/* Enable Unit Timer. */
/* Enable capture timer and capture period latch. */
while(1)
{
/* Status flag is set to indicate that a new value is latched in the QCPRD register. */
if((eqepREG1->QEPSTS & 0x80U) !=0U)
{
/* Elapsed time between unit position events */
deltaT = eqepREG1->QCPRD;
/* Calculate Velocity from deltaT and the value of the unit position. */
/* The value of Unit Position is a sample value and should be changed by the User as per the actual value in the UNIT_POSITION_X macro above. */
/* Clear the Status flag. */
eqepREG1->QEPSTS |= 0x80U;
}
}
/* USER CODE END */
}
this example code of quadrature encoder but for this i need to provide pulses using PWM will it be possible then what is code and holcogen , iam using controller TMS570LS4357 , can u provide me soon as possible

