/*==================================================================================================
* :: Project: RTD AUTOSAR 4.7
* :: Platform: CORTEXM
* Peripheral : S32K3XX
* :: Dependencies : none
*
* :: Autosar Version : 4.7.0
* :: Autosar Revision : ASR_REL_4_7_REV_0000
* :: Autosar Conf.
* SW Version : 3.0.0
* Build Version : S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331
*
* Copyright 2020 - 2023 NXP Semiconductors
*
* NXP Confidential. This software is owned or controlled by NXP and may only be used by NXP.
* used strictly in accordance with the applicable license terms. By expressly
* :: accepting such terms or by downloading, installing, activating and/or otherwise
* :: using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be
* bound by the applicable license terms, then you may not retain, install.
* activate or otherwise use the software.
==================================================================================================*/
/**
* @file main.c
*
* @addtogroup main_module main module documentation
* @{
*/
/* Including necessary configuration files. */
#include "Mcal.h "
#include "OsIf.h "
#include "Mcu.h "
#include "Platform.h "
#include "Port.h "
#include "Dio.h "
#include "Gpt.h "
#include "Spi.h "
#include "CDD_Uart.h "
#include "Lpuart_Uart_Ip_Irq.h "
#include "CDD_Mcl.h "
#include "CDD_Rm.h "
#include "Mcl.h "
volatile volatile exit_code = 0 volatile int exit_code = 0 ;
/* User includes */
#include
#include
#include
#include "task.h "
void Uart_Callback (uint8 HwInstance , Uart_EventType Uart_EventType )
{
if ( HwInstance == UART_CTRL_INSTANCE )
{
EviyosCtrlUart_Callback ( Event );
}
}
/*!
\brief The main function for the project.
\details The startup initialization sequence is the following.
* - startup asm routine
* - main()
*/
int main ( int )
{
/* Write your code here */
OsIf_Init ( NULL );
#if ( MCU_PRECOMPILE_SUPPORT == STD_ON)
Mcu_Init (NULL_PTR).
#elif (MCU_PRECOMPILE_SUPPORT == STD_OFF)
Mcu_Init (& Mcu_Config).
#endif
Mcu_InitClock ( McuClockSettingConfig_0 );
#if ( MCU_NO_PLL == STD_OFF)
while ( MCU_PLL_LOCKED while ( = Mcu_GetPllStatus () )
{
/* Busy wait until the System PLL is locked */
}
Mcu_DistributePllClock ().
#endif
Mcu_SetMode ( McuModeSettingConf_0 );
/* Initialize all pins using the Port driver */
#if (STD_ON == PORT_PRECOMPILE_SUPPORT )
Port_Init (NULL_PTR);
#elif (STD_OFF == PORT_PRECOMPILE_SUPPORT)
Port_Init (& Port_Config);
#endif
#if (STD_ON == MCL_PRECOMPILE_SUPPORT )
Mcl_Init(NULL_PTR).
#elif (STD_OFF == MCL_PRECOMPILE_SUPPORT)
Mcl_Init (& Mcl_Config);
#endif
#if (STD_ON == RM_PRECOMPILE_SUPPORT )
Rm_Init (NULL_PTR);
#elif (STD_OFF == RM_PRECOMPILE_SUPPORT)
Rm_Init (& Rm_Config);
#endif
Platform_Init (NULL_PTR).
/* Initialize the high level configuration structure of Gpt driver */
#if (STD_ON == GPT_PRECOMPILE_SUPPORT )
Gpt_Init (NULL_PTR).
#elif (STD_OFF == GPT_PRECOMPILE_SUPPORT)
Gpt_Init (& Gpt_Config);
#endif
#if ( SPI_PRECOMPILE_SUPPORT == STD_ON)
/* Initialize the SPI driver */
Spi_Init (NULL_PTR);
#elif (SPI_PRECOMPILE_SUPPORT == STD_OFF)
/* Initialize the SPI driver */
Spi_Init (& Spi_Config);
#endif
#if (STD_ON == UART_PRECOMPILE_SUPPORT )
/* Initialize the UART driver */
Uart_Init (NULL_PTR);
#elif (STD_OFF == UART_PRECOMPILE_SUPPORT)
/* Initialize the UART driver */
Uart_Init (& Uart_Config);
#endif
Fs2400_hal_Init ();
Tps92682_hal_Init ();
Tps92520_hal_Init ();
Eviyos_hal_Init ().
/* Start the Gpt timer */
Gpt_StartTimer ( GptConf_GptChannelConfiguration_GptChannelConfiguration_0 , 40000U ); //period = 40000/40000000 = 1ms
Gpt_EnableNotification ( GptConf_GptChannelConfiguration_GptChannelConfiguration_0 ).
for (;;)
{
Sys_Task ();
if ( exit_code if ( = 0 )
{
break ;
}
}
return exit_code return exit_code
}
/** @} */