54 #include "sw/modules/math/src/32b/math.h"
68 #define LED_BLINK_FREQ_Hz 5
76 #pragma DATA_SECTION(halHandle,"rom_accessed_data");
81 #pragma DATA_SECTION(gUserParams,"rom_accessed_data");
93 extern uint16_t *RamfuncsLoadStart, *RamfuncsLoadEnd, *RamfuncsRunStart;
96 extern uint16_t *econst_start, *econst_end, *econst_ram_load;
97 extern uint16_t *switch_start, *switch_end, *switch_ram_load;
124 memCopy((uint16_t *)&RamfuncsLoadStart,(uint16_t *)&RamfuncsLoadEnd,(uint16_t *)&RamfuncsRunStart);
128 if(*econst_end - *econst_start)
130 memCopy((uint16_t *)&econst_start,(uint16_t *)&econst_end,(uint16_t *)&econst_ram_load);
134 if(*switch_end - *switch_start)
136 memCopy((uint16_t *)&switch_start,(uint16_t *)&switch_end,(uint16_t *)&switch_ram_load);
void HAL_enableGlobalInts(HAL_Handle handle)
void HAL_enableAdcInts(HAL_Handle handle)
USER_ErrorCode_e UserErrorCode
void HAL_setupLaunchPadGpio0and1(HAL_Handle handle)
static void HAL_writePwmData(HAL_Handle handle, HAL_PwmData_t *pPwmData)
static void HAL_acqAdcInt(HAL_Handle handle, const ADC_IntNumber_e intNumber)
HAL_Handle halHandle
The hal handle.
void memCopy(uint16_t *srcStartAddr, uint16_t *srcEndAddr, uint16_t *dstAddr)
volatile MOTOR_Vars_t gMotorVars
interrupt void mainISR(void)
The main interrupt service (ISR) routine.
void USER_setParams(USER_Params *pUserParams)
Sets the user parameter values.
Defines the structures, global initialization, and functions used in MAIN.
HAL_AdcData_t gAdcData
Defines the ADC data.
void HAL_setupFaults(HAL_Handle handle)
USER_ErrorCode_e USER_getErrorCode(USER_Params *pUserParams)
Gets the error code in the user parameters.
void HAL_enableDrv(HAL_Handle handle)
void HAL_setupDrvSpi(HAL_Handle handle, DRV_SPI_8301_Vars_t *Spi_8301_Vars)
void HAL_enableDebugInt(HAL_Handle handle)
HAL_PwmData_t gPwmData
Defines the PWM data.
#define MOTOR_Vars_INIT
Initialization values of global variables.
#define USER_ISR_FREQ_Hz
Defines the Interrupt Service Routine (ISR) frequency, Hz.
static void HAL_disablePwm(HAL_Handle handle)
HAL_Handle HAL_init(void *pMemory, const size_t numBytes)
static void HAL_readAdcData(HAL_Handle handle, HAL_AdcData_t *pAdcData)
static void HAL_initIntVectorTable(HAL_Handle handle)
void HAL_setParams(HAL_Handle handle, const USER_Params *pUserParams)
USER_Params gUserParams
The user parameters.
#define LED_BLINK_FREQ_Hz
void USER_checkForErrors(USER_Params *pUserParams)
Checks for errors in the user parameter values.