chg-stn-motherboard-ti-mcu/main.c

56 lines
1.5 KiB
C

/* @Created by VECMOCON Technology
* @Date - 26 feb 2024
* TODO - To enable the not define function please go through the project properties --> under the arm complier --> predefine symbols
* @ add (_N) at the end of definition to not define
* @ Remove (_N) from the end of definition to define
* @ Content added by AS - MCAL function for ADC, ADC with DMA, Periodic Timer, PWM, SysTick and Input Capture
*/
#include "../utils/utils.h"
#include "../Core/Include/gpio.h"
#include "../Core/Include/ivec_mcal_adc_dma.h"
#include "../Core/Include/ivec_mcal_timer.h"
#include "../Core/Include/ivec_mcal_mcan.h"
#include "../Core/Include/ivec_mcal_spi.h"
#include "../Core/Include/ivec_mcal_i2c.h"
#include "../Core/Include/ivec_mcal_uart.h"
#include "ti_msp_dl_config.h"
#include "string.h"
#include "ivec_rte.h"
void vMCAL_TimerCallback(void)
{
//vRTE_MatlabRun();
DL_TimerA_clearInterruptStatus(TIMER_1_INST, GPTIMER_CPU_INT_IMASK_Z_SET);
}
static void __prv_TimerConfig(void)
{
SYSCFG_DL_TIMER_1_init();
DL_TimerA_startCounter(TIMER_1_INST);
DL_TimerA_enableInterrupt(TIMER_1_INST , GPTIMER_CPU_INT_IMASK_Z_SET);
NVIC_ClearPendingIRQ(TIMA0_INT_IRQn);
NVIC_EnableIRQ(TIMA0_INT_IRQn);
}
int main(void)
{
xMCAL_McuInit();
xMCAL_SYSCTL_INIT(HFXT,SLEEP0);
xMCAL_SYSTICK_INIT(Period_1ms);
__prv_TimerConfig();
//vRTE_MatlabInit();
vRTE_InitUARTCANEcho();
while(1)
{
vRTE_UARTDataProcess();
vRTE_CANDataProcess();
}
}