Skip to content

Commit c6edb2f

Browse files
author
ganghe
committed
soc: sifli: sf32lb52x: Overwrite SiFli HAL delay function with Zephyr k_sleep
SiFli HAL is using HAL_Delay_us to delay for certain microseconds. This is a weak function. I overwrites this function with Zephyr k_sleep. Signed-off-by: ganghe <[email protected]>
1 parent 82ad298 commit c6edb2f

File tree

1 file changed

+11
-1
lines changed
  • soc/sifli/sf32/sf32lb52x

1 file changed

+11
-1
lines changed

soc/sifli/sf32/sf32lb52x/soc.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@
44
*/
55

66
#include <zephyr/cache.h>
7+
#include <bf0_hal.h>
78

89
void soc_early_init_hook(void)
910
{
1011
sys_cache_instr_enable();
11-
sys_cache_data_enable();
12+
sys_cache_data_enable();
13+
14+
}
15+
16+
void HAL_Delay_us(uint32_t us)
17+
{
18+
k_sleep (K_USEC(us));
1219
}
20+
21+
22+

0 commit comments

Comments
 (0)