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:
Erwan Gouriou 2017-02-17 17:07:09 +01:00 committed by Kumar Gala
commit d39eedbad1
4 changed files with 44 additions and 0 deletions

View file

@ -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.
*

View file

@ -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.
*

View file

@ -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.
*

View file

@ -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.
*