@@ -1046,11 +1046,13 @@ void VirtualTimer_IRQHandler(void)
1046
1046
/* NOTE : In DEBUG_TIMER2 mode, a time deviation is added to write */
1047
1047
/* the corrected value in a readable variable. */
1048
1048
/***************************************************************************/
1049
+ #if (__CA_CMSIS_VERSION_MAIN >=(6U ))
1049
1050
#ifdef DEBUG_TIMER2
1050
1051
RELOAD_VAL2 = TimerPeriod + VL1_GetCurrentTimerValue ();
1051
1052
VL1_SetCurrentTimerValue (RELOAD_VAL2 );
1052
1053
#else
1053
1054
VL1_SetCurrentTimerValue (TimerPeriod + VL1_GetCurrentTimerValue ());
1055
+ #endif
1054
1056
#endif
1055
1057
/* Increment Tick value and call user CB */
1056
1058
HAL_IncTick ();
@@ -1341,13 +1343,16 @@ uint32_t SystemA35_SYSTICK_Config( uint32_t timer_priority )
1341
1343
1342
1344
/* Stop Timers */
1343
1345
PL1_SetControl (0x0 );
1346
+ #if (__CA_CMSIS_VERSION_MAIN >=(6U ))
1344
1347
VL1_SetControl (0x0 );
1345
-
1348
+ #endif
1346
1349
/* Reset Timers */
1347
1350
PL1_SetLoadValue (0 );
1348
1351
PL1_SetPhysicalCompareValue (0 );
1352
+ #if (__CA_CMSIS_VERSION_MAIN >=(6U ))
1349
1353
VL1_SetCurrentTimerValue (0 );
1350
1354
VL1_SetTimerCompareValue (0 );
1355
+ #endif
1351
1356
1352
1357
#ifdef DEBUG_PPI2x
1353
1358
FIQ_count = 0 ;
@@ -1407,8 +1412,10 @@ uint32_t SystemA35_SYSTICK_Config( uint32_t timer_priority )
1407
1412
}
1408
1413
else
1409
1414
{
1415
+ #if (__CA_CMSIS_VERSION_MAIN >=(6U ))
1410
1416
VL1_SetCurrentTimerValue (TimerPeriod );
1411
1417
VL1_SetControl (0x1 );
1418
+ #endif
1412
1419
}
1413
1420
return 0 ;
1414
1421
}
@@ -1457,7 +1464,9 @@ uint32_t SystemA35_ManageTick( uint32_t suspend_resume_stop_tick )
1457
1464
case A35_STOP_SYSTICK :
1458
1465
/* Stop Timers */
1459
1466
PL1_SetControl (0x0 );
1467
+ #if (__CA_CMSIS_VERSION_MAIN >=(6U ))
1460
1468
VL1_SetControl (0x0 );
1469
+ #endif
1461
1470
case A35_SUSPEND_SYSTICK :
1462
1471
/* Disable corresponding interrupt and clear it if pending */
1463
1472
IRQ_Disable (sourcetimer_irq );
0 commit comments