Implement SystemcoreClock

We implemented SystemcoreClock which is defined in CMSIS.
pull/1848/head
tomoyuki yamanaka 2016-06-03 18:36:28 +09:00
parent bddce7ce7e
commit 1e2e14e11d
4 changed files with 34 additions and 0 deletions

View File

@ -51,6 +51,7 @@ void FPUEnable(void);
uint32_t IRQNestLevel;
unsigned char seen_id0_active = 0; // single byte to hold a flag used in the workaround for GIC errata 733075
uint32_t SystemCoreClock = CM0_RENESAS_RZ_A1_I_CLK; /*!< System Clock Frequency (Core Clock) */
/**
@ -198,6 +199,20 @@ uint32_t InterruptHandlerUnregister (IRQn_Type irq)
}
}
/**
* Update SystemCoreClock variable
*
* @param none
* @return none
*
* @brief Updates the SystemCoreClock with current core Clock.
*/
void SystemCoreClockUpdate (void)
{
SystemCoreClock = CM0_RENESAS_RZ_A1_I_CLK;
}
/**
* Initialize the system
*

View File

@ -43,6 +43,8 @@
extern "C" {
#endif
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
typedef void(*IRQHandler)();
uint32_t InterruptHandlerRegister(IRQn_Type, IRQHandler);
uint32_t InterruptHandlerUnregister(IRQn_Type);

View File

@ -51,6 +51,7 @@ void FPUEnable(void);
uint32_t IRQNestLevel;
unsigned char seen_id0_active = 0; // single byte to hold a flag used in the workaround for GIC errata 733075
uint32_t SystemCoreClock = CM0_RENESAS_RZ_A1_I_CLK; /*!< System Clock Frequency (Core Clock) */
/**
@ -198,6 +199,20 @@ uint32_t InterruptHandlerUnregister (IRQn_Type irq)
}
}
/**
* Update SystemCoreClock variable
*
* @param none
* @return none
*
* @brief Updates the SystemCoreClock with current core Clock.
*/
void SystemCoreClockUpdate (void)
{
SystemCoreClock = CM0_RENESAS_RZ_A1_I_CLK;
}
/**
* Initialize the system
*

View File

@ -43,6 +43,8 @@
extern "C" {
#endif
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
typedef void(*IRQHandler)();
uint32_t InterruptHandlerRegister(IRQn_Type, IRQHandler);
uint32_t InterruptHandlerUnregister(IRQn_Type);