Skip to content

Commit 1744494

Browse files
committed
stm32cube: stm32mp2xx: Removed VL1_* calls
Removed VL1_* calls as it is not yet supported in the Zephyr CMSIS version for cortex A Signed-off-by: Julien Racki <[email protected]>
1 parent ede14b3 commit 1744494

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

stm32cube/stm32mp2xx/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,9 @@ Patch List:
6363
- The stm32cube/stm32mp2xx/drivers/src/stm32mp2xx_ll_rcc.c file was modified
6464
for retrieving the clock configuration of the I2C8 peripheral.
6565

66+
* Fix the use of virtual timer call
67+
- The stm32cube/stm32mp2xx/soc/system_stm32mp2xx_a35.c file use VL1_*
68+
functions which are not yet supported in the CMSIS version for Cortex A.
69+
These calls have been removed if the used CMSIS version is older than 6.x.
70+
6671
See release_note.html from STM32Cube

stm32cube/stm32mp2xx/soc/system_stm32mp2xx_a35.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,13 @@ void VirtualTimer_IRQHandler(void)
10461046
/* NOTE : In DEBUG_TIMER2 mode, a time deviation is added to write */
10471047
/* the corrected value in a readable variable. */
10481048
/***************************************************************************/
1049+
#if (__CA_CMSIS_VERSION_MAIN>=(6U))
10491050
#ifdef DEBUG_TIMER2
10501051
RELOAD_VAL2 = TimerPeriod + VL1_GetCurrentTimerValue();
10511052
VL1_SetCurrentTimerValue(RELOAD_VAL2);
10521053
#else
10531054
VL1_SetCurrentTimerValue(TimerPeriod + VL1_GetCurrentTimerValue());
1055+
#endif
10541056
#endif
10551057
/* Increment Tick value and call user CB */
10561058
HAL_IncTick();
@@ -1341,13 +1343,16 @@ uint32_t SystemA35_SYSTICK_Config( uint32_t timer_priority )
13411343

13421344
/* Stop Timers */
13431345
PL1_SetControl(0x0);
1346+
#if (__CA_CMSIS_VERSION_MAIN>=(6U))
13441347
VL1_SetControl(0x0);
1345-
1348+
#endif
13461349
/* Reset Timers */
13471350
PL1_SetLoadValue(0);
13481351
PL1_SetPhysicalCompareValue(0);
1352+
#if (__CA_CMSIS_VERSION_MAIN>=(6U))
13491353
VL1_SetCurrentTimerValue(0);
13501354
VL1_SetTimerCompareValue(0);
1355+
#endif
13511356

13521357
#ifdef DEBUG_PPI2x
13531358
FIQ_count = 0;
@@ -1407,8 +1412,10 @@ uint32_t SystemA35_SYSTICK_Config( uint32_t timer_priority )
14071412
}
14081413
else
14091414
{
1415+
#if(__CA_CMSIS_VERSION_MAIN>=(6U))
14101416
VL1_SetCurrentTimerValue(TimerPeriod);
14111417
VL1_SetControl(0x1);
1418+
#endif
14121419
}
14131420
return 0;
14141421
}
@@ -1457,7 +1464,9 @@ uint32_t SystemA35_ManageTick( uint32_t suspend_resume_stop_tick )
14571464
case A35_STOP_SYSTICK :
14581465
/* Stop Timers */
14591466
PL1_SetControl(0x0);
1467+
#if (__CA_CMSIS_VERSION_MAIN>=(6U))
14601468
VL1_SetControl(0x0);
1469+
#endif
14611470
case A35_SUSPEND_SYSTICK :
14621471
/* Disable corresponding interrupt and clear it if pending */
14631472
IRQ_Disable(sourcetimer_irq);

0 commit comments

Comments
 (0)