/* 
 * File: ert_main.c 
 * 
 * Code generated for Simulink model 'mrcanhubk344_can_s32ct'. 
 * 
 * Model version                   : 8.1 
 * Simulink Coder version          : 24.2 (R2024b) 21-Jun-2024 
 * MBDT for S32K3xx Series Version :  Version 1.4.0 (R2021a-R2023a) 29-May-2023 
 * C/C++ source code generated on  : Thu Oct 24 17:39:20 2024 
 * 
 * Target selection: ert.tlc 
 * Embedded hardware selection: ARM Compatible->ARM Cortex 
 * Code generation objectives: Unspecified 
 * Validation result: Not run 
 */ 
  
 #include "mrcanhubk344_can_s32ct.h" 
 #include "rtwtypes.h" 
 #include "MW_target_hardware_resources.h" 
  
 volatile int IsrOverrun = 0; 
 static boolean_T OverrunFlag = 0; 
 void rt_OneStep(void) 
 { 
 /* Check for overrun. Protect OverrunFlag against preemption */ 
 if (OverrunFlag++) { 
 IsrOverrun = 1; 
 OverrunFlag--; 
 return; 
 } 
  
 mrcanhubk344_can_s32ct_step(); 
  
 /* Get model outputs here */ 
 OverrunFlag--; 
 } 
  
 volatile boolean_T stopRequested; 
 volatile boolean_T runModel; 
 int main(int argc, char **argv) 
 { 
 float modelBaseRate = 0.1; 
 float systemClock = 160; 
  
 /* Initialize variables */ 
 stopRequested = false; 
 runModel = false; 
 (void)argc; 
 (void)argv; 
 (void)systemClock; 
  
 /* Board init */ 
 board_init(); 
 ; 
 rtmSetErrorStatus(mrcanhubk344_can_s32ct_M, 0); 
 mrcanhubk344_can_s32ct_initialize(); 
 s32k3_trigger_config(modelBaseRate); 
 runModel = 
 rtmGetErrorStatus(mrcanhubk344_can_s32ct_M) == (NULL); 
 while (runModel) { 
 FMSTR_Poll(); 
 stopRequested = !( 
 rtmGetErrorStatus(mrcanhubk344_can_s32ct_M) == (NULL)); 
 runModel = !(stopRequested); 
 } 
  
 /* Terminate model */ 
 mrcanhubk344_can_s32ct_terminate(); 
 return 0; 
 } 
  
 /* 
 * File trailer for generated code. 
 * 
 * [EOF] 
 */ 
