Skip to content

Commit 2d5e67a

Browse files
committed
hpm sdk release v1.2.0
Main changes since 1.1.0 Tested Segger Embedded Studio Version: 7.22 - Changed: - boards: hpm6750evk*: decrease core frequency from 816MHz to 648MHz - openocd: soc: hpm6280: simplify dual core release core1 approach. - cmake: segger: configure optimization level according to gcc level. - soc: dmamux: move it from ip to soc - soc: interrupt: adjust irq api. #659 - soc: improve svd file - soc: hpm_soc_feature.h: remove ADC16_SOC_TEMP_CH_EN for some specified Socs - components: enet_phy: update the common enet phy header file - components: sgtl5000 and wm8960: update clock setting - drivers: uart: update uart driver - drivers: pdma: improve quality of scale - drivers: adc: adjust wait_dis type in adc16_config_t struct - drivers: enet: update rmii reference clock setting API for ENET - utils: hpm_swap: escape for andes toolchain. - middleware: hpm_sdmmc: add spi sdcard - middleware: motor_ctrl: change the file organization - middleware: motor_ctrl: remove slide control content from foc - middleware: lvgl: upgrade to v8.3.5 (with pdma) - middleware: lvgl: Add direct mode - middleware: cherryusb: update version to v0.8.0 - samples: I2S_DMA and I2S Interrupt: update sample behavior - samples: cherryusb: hid host: separate mouse and keyboard urb - samples: cherryusb: increase max interface and endpoint number Configuration - samples: cherryusb: uac2: move setting sampling freq to isr - samples: cherryusb: audio: update descriptor for identification - samples: audio_codec: set codec voice to max and increase irq priority - samples: multicore: lvgl_coremark: delete custom linker files and using andes toolchain - samples: lvgl_audio_player: update CMakeLists.txt to using noncacheable framebuffer - samples: spi: clean the redundant code - samples: i2c: improve the processing of FIFO in ISR - samples: drivers: uart: update uart_rx_timeout demo - samples: drivers: gptmr: split sample into multiple function samples - samples: drivers: adc: optimization for all macro definitions in applications - samples: drivers: adc: update struct member names - samples: update clock divider setting for ADC-related examples - samples: cherryusb: move vid/pid etc definition to usb_config.h - samples: cherryusb: device: update vid to hpmicro 0x34B7 - samples: cherryusb: change API update for v0.8 - samples: cherryusb: device: audiov1: change to full speed mode - samples: tinyusb: uac2: update descriptor and sample - samples: lwip: disable mmc interrupt settings - samples: lwip: lwip_ptp: v1: sync precision improvement - Added: - cmake: toolchains: add isa spec 20191213 support. - cmake: ses: support set ses raw option in CMakeLists.txt - cmake: add option to specify board search path. - cmake: generate compile_commands.json file - soc: hpm_soc_feature: add a common macro for ADC12 and ADC16 - drivers: cam: add new APIs - drivers: spi: add new APIs - drivers: i2c: add new APIs - drivers: I2S: add i2s_check_data_line_status API - drivers: dma: add dma_set_transfer_src_width_byte_size() API - drivers: gptmr: add output capture APIs - drivers: gptmr: add gptmr_channel_get_dma_request_event api - drivers: adc: add adc16_trigger_pmt_by_sw API - drivers: enet: add some APIs related to interrupt settings - drivers: enet: add a new API for transmisstion - drivers: usb: add macro CONFIG_USB_DEVICE_FS to set full speed mode - components: uart_lin: add uart lin component - components: add smbus - components: add sccb - middleware: lvgl: add macro HPM_LVGL_FRAMEBUFFER_NONCACHEABLE - middleware: add AzureRTOS (threadx/usbx/netx/guix) - middleware: hpm_mcl: sensorless over-zero - middleware: add smc - middleware: hpm_sdmmc Add eMMC support - middleware: hpm_math: add bit conversion function - middleware: add uC/OS-III - middleware: cherryusb: audio: add feedback descriptor - middleware: cherryusb: audio: add param to set endpoint bmAttributes - middleware: microros: add microros foxy sources - samples: drivers: spi: add spi_sdcard_fatfs sample - samples: drivers: spi: add sd sample - samples: add uart_lin - samples: motor_ctrl: sensorless: over-zero demo - samples: cherryusb: add rndis host dhcp samples - samples: drivers: sdxc :emmc Added eMMC sample - samples: drivers: adc12: update irq pattern for sequence usage - samples: drivers: pla: add pla tamagawa demo - samples: drivers: gptmr: add counter_sync sample - samples: drivers: gptmr: add timer_basic sample - samples: drivers: gptmr: add t_shape_accel_decel sample - samples: drivers: dma/gptmr: add trigger dma transfer using gptmr event sample - samples: drivers: uart add uart_rx_timeout sample - samples: i2c: add smbus samples - samples: lwip: lwip_tcpecho_freertos: add self-adaption - samples: cherryusb: hid host: move usbh_submit_urb() out of condition - samples: cherryusb: add composite freertos sample - samples: cherryusb: add rndis freertos sample - samples: cherryusb: add msc freertos sample - samples: cherryusb: add audio v2 mic speaker freertos sample - samples: cherryusb: add hid mouse freertos sample - samples: cherryusb: add hid keyboard freertos sample - samples: cherryusb: add cdc acm freertos sample - samples: cherryusb: add rndis tcp server sample - samples: cherryusb: add rndis device udp_echo sample - samples: cherryusb: add rndis device http_server sample - samples: cherryusb: device: add audio_v2_speaker_sync sample - samples: add several uC/OS-III samples - samples: smc: add smc demo - samples: microros: add subscriber, sevice and publisher - samples: uC/OS-III: mutex - Fixed: - cmake: ses: fix __SEGGER_RTL_vfprintf issue with nds tool in SES 7.20. - soc: hpm6280: Modify the number of PWM cmps. - soc: reset.c: __dso_handle needs to be declared for nds toolchain. - soc: fix max buffer length in sequence mode for ADC - soc: HPM6750: enet soc drv: fix set clock delay settings - soc:hpm6360:sdxc Correct clock divider settting issue - drivers: pla: missing Union Field - drivers: spi: fix the problem of CMD and ADDR configuration order - drivers: i2c: fix clock frequency error rate problem - drivers: i2c: clear CMPL bit in API to avoid blocking the trans - drivers: i2c: fix i2c slave device read and write fail - drivers: i2c: fix read data unexpected multi transition. - drivers: i2c: fix w1c clear status error - driver: usb: fix w1c clear flag error - drivers: gptmr: fix dma request enum definition - drivers: adc: fix logics for judging the validity of arguments - component: uart_lin: fix break signal problem - middleware: cherryusb: fix buffer size error - middleware: lvgl: fix fbbuffer option - samples: gptmr: fix pwm_measure sample compile waring - samples: jpeg: fix interchange format of exif support - samples: jpeg: fix jpeg decode - samples: drivers: spi: fix the problem of CMD and ADDR configuration order - samples: drivers: mcan: can_fd loopback test setting is incorrect - samples: cherryusb: http_server_freertos: fix printf content error - samples: cherryusb: audio: change endpoint attributes for support MACBOOK - samples: tinyusb: msc: increase block numbers for windows format - samples: lwip: lwip_httpsrv: fix reload or refresh error Signed-off-by: Ryan QIAN <[email protected]>
1 parent 0d007e1 commit 2d5e67a

File tree

7,536 files changed

+1666569
-374790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,536 files changed

+1666569
-374790
lines changed

CHANGELOG.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,147 @@
11
# Change Log
22

3+
## [1.2.0] - 2023-06-30:
4+
5+
Main changes since 1.1.0
6+
7+
Tested Segger Embedded Studio Version: 7.22
8+
9+
### Changed:
10+
- boards: hpm6750evk*: decrease core frequency from 816MHz to 648MHz
11+
- openocd: soc: hpm6280: simplify dual core release core1 approach.
12+
- cmake: segger: configure optimization level according to gcc level.
13+
- soc: dmamux: move it from ip to soc
14+
- soc: interrupt: adjust irq api. #659
15+
- soc: improve svd file
16+
- soc: hpm_soc_feature.h: remove ADC16_SOC_TEMP_CH_EN for some specified Socs
17+
- components: enet_phy: update the common enet phy header file
18+
- components: sgtl5000 and wm8960: update clock setting
19+
- drivers: uart: update uart driver
20+
- drivers: pdma: improve quality of scale
21+
- drivers: adc: adjust wait_dis type in adc16_config_t struct
22+
- drivers: enet: update rmii reference clock setting API for ENET
23+
- utils: hpm_swap: escape for andes toolchain.
24+
- middleware: hpm_sdmmc: add spi sdcard
25+
- middleware: motor_ctrl: change the file organization
26+
- middleware: motor_ctrl: remove slide control content from foc
27+
- middleware: lvgl: upgrade to v8.3.5 (with pdma)
28+
- middleware: lvgl: Add direct mode
29+
- middleware: cherryusb: update version to v0.8.0
30+
- samples: I2S_DMA and I2S Interrupt: update sample behavior
31+
- samples: cherryusb: hid host: separate mouse and keyboard urb
32+
- samples: cherryusb: increase max interface and endpoint number Configuration
33+
- samples: cherryusb: uac2: move setting sampling freq to isr
34+
- samples: cherryusb: audio: update descriptor for identification
35+
- samples: audio_codec: set codec voice to max and increase irq priority
36+
- samples: multicore: lvgl_coremark: delete custom linker files and using andes toolchain
37+
- samples: lvgl_audio_player: update CMakeLists.txt to using noncacheable framebuffer
38+
- samples: spi: clean the redundant code
39+
- samples: i2c: improve the processing of FIFO in ISR
40+
- samples: drivers: uart: update uart_rx_timeout demo
41+
- samples: drivers: gptmr: split sample into multiple function samples
42+
- samples: drivers: adc: optimization for all macro definitions in applications
43+
- samples: drivers: adc: update struct member names
44+
- samples: update clock divider setting for ADC-related examples
45+
- samples: cherryusb: move vid/pid etc definition to usb_config.h
46+
- samples: cherryusb: device: update vid to hpmicro 0x34B7
47+
- samples: cherryusb: change API update for v0.8
48+
- samples: cherryusb: device: audiov1: change to full speed mode
49+
- samples: tinyusb: uac2: update descriptor and sample
50+
- samples: lwip: disable mmc interrupt settings
51+
- samples: lwip: lwip_ptp: v1: sync precision improvement
52+
53+
### Added:
54+
- cmake: toolchains: add isa spec 20191213 support.
55+
- cmake: ses: support set ses raw option in CMakeLists.txt
56+
- cmake: add option to specify board search path.
57+
- cmake: generate compile_commands.json file
58+
- soc: hpm_soc_feature: add a common macro for ADC12 and ADC16
59+
- drivers: cam: add new APIs
60+
- drivers: spi: add new APIs
61+
- drivers: i2c: add new APIs
62+
- drivers: I2S: add i2s_check_data_line_status API
63+
- drivers: dma: add dma_set_transfer_src_width_byte_size() API
64+
- drivers: gptmr: add output capture APIs
65+
- drivers: gptmr: add gptmr_channel_get_dma_request_event api
66+
- drivers: adc: add adc16_trigger_pmt_by_sw API
67+
- drivers: enet: add some APIs related to interrupt settings
68+
- drivers: enet: add a new API for transmisstion
69+
- drivers: usb: add macro CONFIG_USB_DEVICE_FS to set full speed mode
70+
- components: uart_lin: add uart lin component
71+
- components: add smbus
72+
- components: add sccb
73+
- middleware: lvgl: add macro HPM_LVGL_FRAMEBUFFER_NONCACHEABLE
74+
- middleware: add AzureRTOS (threadx/usbx/netx/guix)
75+
- middleware: hpm_mcl: sensorless over-zero
76+
- middleware: add smc
77+
- middleware: hpm_sdmmc Add eMMC support
78+
- middleware: hpm_math: add bit conversion function
79+
- middleware: add uC/OS-III
80+
- middleware: cherryusb: audio: add feedback descriptor
81+
- middleware: cherryusb: audio: add param to set endpoint bmAttributes
82+
- middleware: microros: add microros foxy sources
83+
- samples: drivers: spi: add spi_sdcard_fatfs sample
84+
- samples: drivers: spi: add sd sample
85+
- samples: add uart_lin
86+
- samples: motor_ctrl: sensorless: over-zero demo
87+
- samples: cherryusb: add rndis host dhcp samples
88+
- samples: drivers: sdxc :emmc Added eMMC sample
89+
- samples: drivers: adc12: update irq pattern for sequence usage
90+
- samples: drivers: pla: add pla tamagawa demo
91+
- samples: drivers: gptmr: add counter_sync sample
92+
- samples: drivers: gptmr: add timer_basic sample
93+
- samples: drivers: gptmr: add t_shape_accel_decel sample
94+
- samples: drivers: dma/gptmr: add trigger dma transfer using gptmr event sample
95+
- samples: drivers: uart add uart_rx_timeout sample
96+
- samples: i2c: add smbus samples
97+
- samples: lwip: lwip_tcpecho_freertos: add self-adaption
98+
- samples: cherryusb: hid host: move usbh_submit_urb() out of condition
99+
- samples: cherryusb: add composite freertos sample
100+
- samples: cherryusb: add rndis freertos sample
101+
- samples: cherryusb: add msc freertos sample
102+
- samples: cherryusb: add audio v2 mic speaker freertos sample
103+
- samples: cherryusb: add hid mouse freertos sample
104+
- samples: cherryusb: add hid keyboard freertos sample
105+
- samples: cherryusb: add cdc acm freertos sample
106+
- samples: cherryusb: add rndis tcp server sample
107+
- samples: cherryusb: add rndis device udp_echo sample
108+
- samples: cherryusb: add rndis device http_server sample
109+
- samples: cherryusb: device: add audio_v2_speaker_sync sample
110+
- samples: add several uC/OS-III samples
111+
- samples: smc: add smc demo
112+
- samples: microros: add subscriber, sevice and publisher
113+
- samples: uC/OS-III: mutex
114+
115+
### Fixed:
116+
- cmake: ses: fix __SEGGER_RTL_vfprintf issue with nds tool in SES 7.20.
117+
- soc: hpm6280: Modify the number of PWM cmps.
118+
- soc: reset.c: __dso_handle needs to be declared for nds toolchain.
119+
- soc: fix max buffer length in sequence mode for ADC
120+
- soc: HPM6750: enet soc drv: fix set clock delay settings
121+
- soc:hpm6360:sdxc Correct clock divider settting issue
122+
- drivers: pla: missing Union Field
123+
- drivers: spi: fix the problem of CMD and ADDR configuration order
124+
- drivers: i2c: fix clock frequency error rate problem
125+
- drivers: i2c: clear CMPL bit in API to avoid blocking the trans
126+
- drivers: i2c: fix i2c slave device read and write fail
127+
- drivers: i2c: fix read data unexpected multi transition.
128+
- drivers: i2c: fix w1c clear status error
129+
- driver: usb: fix w1c clear flag error
130+
- drivers: gptmr: fix dma request enum definition
131+
- drivers: adc: fix logics for judging the validity of arguments
132+
- component: uart_lin: fix break signal problem
133+
- middleware: cherryusb: fix buffer size error
134+
- middleware: lvgl: fix fbbuffer option
135+
- samples: gptmr: fix pwm_measure sample compile waring
136+
- samples: jpeg: fix interchange format of exif support
137+
- samples: jpeg: fix jpeg decode
138+
- samples: drivers: spi: fix the problem of CMD and ADDR configuration order
139+
- samples: drivers: mcan: can_fd loopback test setting is incorrect
140+
- samples: cherryusb: http_server_freertos: fix printf content error
141+
- samples: cherryusb: audio: change endpoint attributes for support MACBOOK
142+
- samples: tinyusb: msc: increase block numbers for windows format
143+
- samples: lwip: lwip_httpsrv: fix reload or refresh error
144+
3145
## [1.1.0] - 2023-03-31:
4146

5147
Main changes since 1.0.0

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,27 @@ sdk_inc(${generated_file_path}/include)
172172

173173
set_target_properties(${APP_ELF_NAME} PROPERTIES LINK_DEPENDS ${LINKER_SCRIPT})
174174

175+
if(NOT DEFINED HPM_SDK_LD_NO_WHOLE_SDK)
176+
set(HPM_SDK_LD_NO_WHOLE_SDK 0)
177+
endif()
178+
179+
set(HPM_SDK_WHOLE_ARCHIVE_OPT "-Wl,--whole-archive")
180+
if(${HPM_SDK_LD_NO_WHOLE_SDK})
181+
set(HPM_SDK_WHOLE_ARCHIVE_OPT "")
182+
endif()
183+
175184
if("${TOOLCHAIN_VARIANT}" STREQUAL "nds-gcc")
176185
target_link_libraries(${APP_ELF_NAME}
177186
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
178-
"-Wl,--whole-archive"
187+
${HPM_SDK_WHOLE_ARCHIVE_OPT}
179188
${HPM_SDK_NDSGCC_LIB_ITF}
180189
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
181190
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
182191
"-Wl,--no-whole-archive")
183192
else()
184193
target_link_libraries(${APP_ELF_NAME}
185194
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
186-
"-Wl,--whole-archive"
195+
${HPM_SDK_WHOLE_ARCHIVE_OPT}
187196
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
188197
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
189198
"-Wl,--no-whole-archive")

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ The HPM SDK Project is a software development kit based on HPMicro's MCUs, which
238238
239239
Open zadig, click Options-> List All Devices.
240240
241-
![List All Devices](doc/images/readme/zadig_list_all_devices.png)
241+
![List All Devices](docs/assets/zadig_list_all_devices.png)
242242
243243
Select Dual RS232-HS (Interface 0).
244244
245-
![Select Dual RS232-HS (Interface 0)](doc/images/readme/zadig_select_dual_rs232-hs.png)
245+
![Select Dual RS232-HS (Interface 0)](docs/assets/zadig_select_dual_rs232-hs.png)
246246
247247
Then click Install Driver or Replace Driver.
248248
249-
![Replace Driver](doc/images/readme/zadig_replace_driver.png)
249+
![Replace Driver](docs/assets/zadig_replace_driver.png)
250250
251251
7. Go to hello_world directory
252252
@@ -270,7 +270,7 @@ The HPM SDK Project is a software development kit based on HPMicro's MCUs, which
270270
9. connect gdb client to the gdbserver started by openocd, (by default, gdbserver port is 3333)
271271

272272
```GDB
273-
gdb> file build/output/hello_world.elf
273+
gdb> file build/output/demo.elf
274274
gdb> target remote localhost:3333
275275
gdb> load
276276
gdb> b main

README_zh.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,15 @@ HPM SDK项目是基于HPMicro 公司的MCU编写的软件开发包,支持多
247247
248248
打开zadig,点击 Options->List All Devices.
249249
250-
![List All Devices](doc/images/readme/zadig_list_all_devices.png)
250+
![List All Devices](docs/assets/zadig_list_all_devices.png)
251251
252252
选择 Dual RS232-HS (Interface 0).
253253
254-
![Select Dual RS232-HS (Interface 0)](doc/images/readme/zadig_select_dual_rs232-hs.png)
254+
![Select Dual RS232-HS (Interface 0)](docs/assets/zadig_select_dual_rs232-hs.png)
255255
256256
然后点击 Install Driver 或 Replace Driver.
257257
258-
![Replace Driver](doc/images/readme/zadig_replace_driver.png)
258+
![Replace Driver](docs/assets/zadig_replace_driver.png)
259259
260260
7. 切换到hello_world目录
261261
@@ -279,7 +279,7 @@ HPM SDK项目是基于HPMicro 公司的MCU编写的软件开发包,支持多
279279
9. 连接GDB client到openocd GDB server (缺省状态下, openocd gdbserver 端口为 3333)
280280

281281
```GDB
282-
gdb> file build/output/hello_world.elf
282+
gdb> file build/output/demo.elf
283283
gdb> target remote localhost:3333
284284
gdb> load
285285
gdb> b main

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION_MAJOR = 1
2-
VERSION_MINOR = 1
2+
VERSION_MINOR = 2
33
PATCHLEVEL = 0
44
VERSION_TWEAK = 0
55
EXTRAVERSION = 0

boards/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Copyright (c) 2021 HPMicro
22
# SPDX-License-Identifier: BSD-3-Clause
33

4-
add_subdirectory(${HPM_BOARD_DIR})
4+
if(BOARD_SEARCH_DIR)
5+
add_subdirectory(${BOARD_SEARCH_DIR} ${BOARD})
6+
else()
7+
add_subdirectory(${HPM_BOARD_DIR})
8+
endif()

boards/hpm6200evk/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022 hpmicro
1+
# Copyright (c) 2022 HPMicro
22
# SPDX-License-Identifier: BSD-3-Clause
33

44
sdk_compile_definitions_ifdef(BUILD_FOR_SECONDARY_CORE BOARD_RUNNING_CORE=HPM_CORE1)

boards/hpm6200evk/board.c

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "hpm_gpio_drv.h"
1414
#include "pinmux.h"
1515
#include "hpm_pmp_drv.h"
16-
#include "assert.h"
1716
#include "hpm_clock_drv.h"
1817
#include "hpm_sysctl_drv.h"
1918
#include "hpm_pwm_drv.h"
@@ -22,7 +21,6 @@
2221
#include "hpm_pcfg_drv.h"
2322

2423
static board_timer_cb timer_cb;
25-
ATTR_PLACE_AT_NONCACHEABLE_BSS static bool init_delay_flag;
2624

2725
/**
2826
* @brief FLASH configuration option definitions:
@@ -189,29 +187,12 @@ void board_init(void)
189187

190188
void board_delay_us(uint32_t us)
191189
{
192-
static uint32_t gptmr_freq;
193-
gptmr_channel_config_t config;
194-
195-
if (init_delay_flag == false) {
196-
init_delay_flag = true;
197-
clock_add_to_group(BOARD_DELAY_TIMER_CLK_NAME, 0);
198-
gptmr_freq = clock_get_frequency(BOARD_DELAY_TIMER_CLK_NAME);
199-
gptmr_channel_get_default_config(BOARD_DELAY_TIMER, &config);
200-
gptmr_channel_config(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH, &config, false);
201-
}
202-
203-
gptmr_channel_config_update_reload(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH, gptmr_freq / 1000000 * us);
204-
gptmr_start_counter(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH);
205-
while (!gptmr_check_status(BOARD_DELAY_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_DELAY_TIMER_CH))) {
206-
__asm("nop");
207-
}
208-
gptmr_stop_counter(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH);
209-
gptmr_clear_status(BOARD_DELAY_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_DELAY_TIMER_CH));
190+
clock_cpu_delay_us(us);
210191
}
211192

212193
void board_delay_ms(uint32_t ms)
213194
{
214-
board_delay_us(1000 * ms);
195+
clock_cpu_delay_ms(ms);
215196
}
216197

217198
void board_timer_isr(void)
@@ -259,6 +240,12 @@ uint32_t board_init_spi_clock(SPI_Type *ptr)
259240
clock_set_source_divider(clock_spi1, clk_src_pll0_clk0, 5U); /* 80MHz */
260241

261242
return clock_get_frequency(clock_spi1);
243+
} else if (ptr == HPM_SPI2) {
244+
/* SPI2 clock configure */
245+
clock_add_to_group(clock_spi2, 0);
246+
clock_set_source_divider(clock_spi2, clk_src_pll0_clk0, 5U); /* 80MHz */
247+
248+
return clock_get_frequency(clock_spi2);
262249
} else if (ptr == HPM_SPI3) {
263250
/* SPI3 clock configure */
264251
clock_add_to_group(clock_spi3, 0);

0 commit comments

Comments
 (0)