arch: stm32: provide tick to Cube HAL
Cube HAL implements timeout based on 1ms tick. This commit allows Cube HAL to get Zephyr system clock. Change-Id: I9a59edcf6fa8e0ebfd5040348db537dadd9fcdfa Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
ddfce25f17
commit
d39eedbad1
4 changed files with 44 additions and 0 deletions
|
@ -16,6 +16,17 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <cortex_m/exc.h>
|
||||
|
||||
/**
|
||||
* @brief This function configures the source of stm32cube time base.
|
||||
* Cube HAL expects a 1ms tick which matches with k_uptime_get_32.
|
||||
* Tick interrupt priority is not used
|
||||
* @return HAL status
|
||||
*/
|
||||
uint32_t HAL_GetTick(void)
|
||||
{
|
||||
return k_uptime_get_32();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Perform basic hardware initialization at boot.
|
||||
*
|
||||
|
|
|
@ -16,6 +16,17 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <cortex_m/exc.h>
|
||||
|
||||
/**
|
||||
* @brief This function configures the source of stm32cube time base.
|
||||
* Cube HAL expects a 1ms tick which matches with k_uptime_get_32.
|
||||
* Tick interrupt priority is not used
|
||||
* @return HAL status
|
||||
*/
|
||||
uint32_t HAL_GetTick(void)
|
||||
{
|
||||
return k_uptime_get_32();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Perform basic hardware initialization at boot.
|
||||
*
|
||||
|
|
|
@ -17,6 +17,17 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <cortex_m/exc.h>
|
||||
|
||||
/**
|
||||
* @brief This function configures the source of stm32cube time base.
|
||||
* Cube HAL expects a 1ms tick which matches with k_uptime_get_32.
|
||||
* Tick interrupt priority is not used
|
||||
* @return HAL status
|
||||
*/
|
||||
uint32_t HAL_GetTick(void)
|
||||
{
|
||||
return k_uptime_get_32();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Perform basic hardware initialization at boot.
|
||||
*
|
||||
|
|
|
@ -17,6 +17,17 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <cortex_m/exc.h>
|
||||
|
||||
/**
|
||||
* @brief This function configures the source of stm32cube time base.
|
||||
* Cube HAL expects a 1ms tick which matches with k_uptime_get_32.
|
||||
* Tick interrupt priority is not used
|
||||
* @return HAL status
|
||||
*/
|
||||
uint32_t HAL_GetTick(void)
|
||||
{
|
||||
return k_uptime_get_32();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Perform basic hardware initialization at boot.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue