/* @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 "ti_msp_dl_config.h" #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 "string.h" #include "ivec_rte.h" //extern McalUartHandle_s g_xUartHandle; static void vApp_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) { __enable_irq(); volatile DL_SYSCTL_RESET_CAUSE l_xResetCause = DL_SYSCTL_getResetCause(); vMCAL_mcuInit(); xMCAL_sysctlInit(IVEC_HFXT,IVEC_STANDBY0); xMCAL_systickInit(IVEC_SYSTICK_PERIOD_1MS); vApp_TimerConfig(); vRTE_AppInit(); // Uncomment for UART-to-CAN transmission, if required // vECU_InitiateUartToCanTransmit(&g_xUartHandle, 0x6, NULL, 0); while(1) { vRTE_AppRunInit(); } }