Skip to content

Commit 8d2af74

Browse files
committed
hpm sdk release v1.10.0
[1.10.0] - 2025-06-30: - Main changes since 1.9.0 - Tested Segger Embedded Studio Version: 8.24 - Tested Zcc toolchain 4.0.0 - Changed: - soc: HPM5300/HPM6E00/HPM6P00: update soc files. - soc: toolchain/bootheader: rename XPI0 to FLASH. - linker: ld: add ALIGN(8) into 'start section' and before symbol '__etext'. - drivers: pllctl: add spread spectrum setup api. - drivers: pllctlv2: add api to setup spread spectrum. - drivers: qeiv2: add some config apis. - drivers: qei: add some config apis. - drivers: usb: add delay in usb phy de-init. - drivers: eui: rename eui_get_time() to eui_get_time_us(). - drivers: sei: update sei driver based on sei.csv update. - drivers: sei: add macro SEI_DAT_CMD. - drivers: sei: add synchronous slave rx tx point macros. - drivers: pmp add api to configure and lock pmp and pmp entry separately. - drivers: pdm add configure sample rate API. - drivers: tsw: add an API tsw_cb_frer_set_msec_cycles(). - drivers: tsw: add struct rx_hdr_dest_t definition. - drivers: spi: add spi_master_enable_cs_select API. - drivers: mcan add mcan_is_tx_buf_cancellation_finished. - drivers: gptmr: fix assignment and spelling errors in burst mode API. - boards: hpm5301evklite: use XTAL as pll ref clock. - boards: add clk_ref pin information. - boards: hpm6p00evk: add spi0 clock for board_init_spi_clock API. - components: usb: components: add attached_buffer and attached_qtd in dcd_qhd_t. - components: plb components: config all input trig pins for each channel. - components: usb: components: format hpm_usb_device.c file. - components: usb: components: avoid to use qtd buffer addr to calculation. - components: serial_nor: add hpm_serial_nor_get_tx_dma_mgr_resource and hpm_serial_nor_get_rx_dma_mgr_resource APIs. - components: serial_nor: add dma_mgr to implement internal DMA management. - middleware: cherryusb: middleware: fix build warning. - middleware: lvgl: add lv_app_conf.h. - middleware: cherryusb: update to v1.5.0. - middleware: cherryusb: update isr organization for otg. - middleware: cherryusb: fix ehci_qtd_alloc() not init qtd alt_next_qtd and token. - middleware: cherryusb: implement usb_hc_low_level_deinit(). - middleware: cherryusb: middleware: add qtd pool to qh usage. - middleware: usb: update _dcd_data aligned settings. - middleware: fatfs: update sdmmc port, don't need cache maintain here. - middleware: fatfs: update spi_sd port, don't need cache maintain here. - middleware: fatfs: support cacheable buffer read and write. - middleware: add CONFIG_XXX_CUSTOM_PORTABLE to exclude port layer. - middleware/components: usb device: add usb_qtd_alloc() to ep usage, enabled by macro USB_DEVICE_DTD_POOL_SHARED. - middleware: cherryusb: sync to cherryusb v1.5.0 release. - middleware: canopen: update canopen module to master branch. - middleware: ucos_iii: replace CONFIG_UCOS_III_TIMER_RESOURCE_NOT_MCHTMR with CONFIG_UCOS_III_TIMER_RESOURCE_GPTMR. - middleware: freertos: support for using pwm as FreeRTOS's tick source. - middleware: fatfs: add break when disk_read/write failure. - samples: coremark/dhrystone: adjust options for zcc. - samples: drivers: samples: split sample to separate examples. - samples: drivers: samples: split to two separate examples. - samples: qei/qeiv2: use qei_config_mode()/qeiv2_config_mode() APIs. - samples: usb: device samples: decrease msc_disk size from 32KB to 8KB. - samples: cherryusb: update usb_config.h file to adapter to v1.5.0. - samples: cherryusb: samples: delete USBH_USE_CUSTOM_ISR and USBD_USE_CUSTOM_ISR. - samples: cherryusb: samples: rndis: optimize linkoutput API, wait for current frame to complete. - samples: cherryusb: samples: rndis: samples: set NO_SYS=0 to enable OS support in lwip. - samples: cherryusb: samples: msc: delete the limitation about the cluster size. - samples: tsn: samples: simply ip, gw, netmask and mac. - samples: sei: samples: add disable_instr_ptr_check init in latch2. - samples: rgb_led: samples: add some descriptions. - samples: rgb_led: samples: add implementation description. - samples: rgb_led: remove redundant code. - samples: rgb_led: add code comments in detail. - samples: drivers: samples: update endat rewind cmd register config. - samples: sei: use macro SEI_DAT_CMD. - samples: sei: samples: use SEI_SYNC_SLAVE_RX_TX_POINT_ON_xxxx_EDGE macros. - samples: drivers: samples: update irq flag processing. - samples: sei: samples: bissc/endat: support auto adjust rx point. - samples: imgae: samples: align file_buffer to cache line size. - samples: image: delete cache maintain in file_store() and file_restore(). - samples: audio: update audio related buffer aligned size. - samples: sd_fatfs: align buffer address to cache line size. - samples: spi_sdcard: remove ATTR_PLACE_AT_NONCACHEABLE for FATFS and FIL variable. - samples: usb: samples: use FATFS_ONLY_NONCACHEABLE_BUF macro. - samples: plb samples: support filter mode change. - samples: tsn_free_preemption_ingress: update log for readme_en.rst. - samples: bgpr: update readme doc. - samples: motor_ctrl: refactor QEI/QEIV2 and PWM initialization. - samples: cherryusb: cdc samples: change readbuf to ping-pang buffer. - samples: pllctlv2: samples: change debug uart clock src. - samples: pllctl/pllctlv2: exclude all flash and sdram targets. - samples: cherryusb: update uvc yuyv sample. - samples: drivers: samples: add screenshots of spread spectrum. - samples: qeov2: add code comments and update README. - samples: qeo: add code comments and update README. - samples: sdm: add code comments and update README. - samples: drivers: samples: change GPTMR clock source enabling to board_init_gptmr_clock API. - samples: uart_lin: add code comments and update README. - samples: lin: add more comments and update README. - samples: i2s_master/slave: add more comments and update README. - samples: i2s_dma: add more comments and update README. - samples: i2s_interrupt: add more comments and update README. - samples: i2s_dao_pdm: add comments and update README. - samples: coremark/dhrystone: adjust options for zcc. - samples: add hpm_pdmlite_drv.h. - samples: i2s: update pdm and dao sample. - samples: canopen: split the sample of canopen into master role and slave role. - samples: ucos_iii: merge ucos_iii hello and ucos_iii hello mchtmr samples. - samples: threadx: merge threadx hello and threadx hello mchtmr samples. - samples: freertos: update freertos hello to support pwm as tick source. - samples: tsn: samples: add broadcast frame and unknown frame action settings. - samples: tsn: samples: enhance the ability to resist network stroms. - samples: tsn: samples: update some configurations parameters to improve throughput. - samples: tsn: samples: common: remove a redundant function call netif_set_link_up(netif). - samples: dhrystone: clear compile options for non zcc compiler. - samples: drivers:mcan add demo for txbuf cancellation. - samples: coremark: using set RV_ABI and RV_ARCH instead of sdk_ses_compile_options(). - samples: update pwmv2 sync, add note for restore pwmv2 state. - samples: sei: update lacth-state config flow to enhance readability, and move irq enable after engine enable. - samples: drivers: samples: dma_use_gptmr_event_transfer: change GPTMR clock source enabling to board_init_gptmr_clock API. - samples: i2s: add i2s_config_multiline_transfer APi description. - samples: fft_perf_test: improve README documentation clarity. - docs: samples: docs: gpio: update the description for readme. - docs: samples: docs: gpiom: update the description for readme. - docs: samples: docs: gptmr: add readme doc for index.rst. - docs: samples: docs: update FIFO threshold description for readme. - docs: samples: docs: spi: add readme doc. - docs: samples: docs: add readme doc for index.rst. - docs: samples: update cherryrb and cherryusb usbnet samples readme. - docs: update cmake_intro file. - docs: add separate target for en/zh. - docs: samples: add mm_align readme to index. - docs: update sdk schedule. - docs: samples: docs: uart: add hardware flow control description for index.rst. - docs: update some samples titles and board readme. - docs: add i2s peripheral README. - docs: samples: docs: update the description for hardware CS. - docs: samples: docs: uart: add interrupt description. - docs: samples: docs: gptmr: add burst mode description. - cmake: segger: add HPM_SES_USE_SEGGER_LD definition. - cmake: zcc: show memory usage after build. - cmake: add comments in detail for all functions. - cmake: ses: process -Ox for ses_cflags. - cmake: normalize heap/stack size. - cmake: add human readable size string parsing. - Fixed: - soc: hpm6800: fix incorrect dram size in linker files. - soc: uart: add uart tx idle feature. - soc: clock clarify the behavior of clock_wait_source_stable. - soc: update soc hpm_gpiom_regs.h. - soc: update HPM6E00 and HPM6P00 header files. - soc: toolchains:iar fix __fw_size__ value. - soc: toolchain: soc: correct fw_size. - soc: enet: fix buff address alignment. - drivers: uart: prescaler calculation changed from floating-point to integer for uart_calculate_baudrate API. - drivers: qei: rename QEI_EVENT_POSITIVE_COMPARE_FLAG_MASK to QEI_EVENT_POSITION_COMPARE_FLAG_MASK. - drivers: pmp correct the value for PMP_ADDR and PMA_ADDR. - drivers: uart: enhance divider calculation by adding rounding for uart_calculate_baudrate API. - drivers: eui: fix filter length settings. - drivers: sdm: fix output 16bit data. - drivers: uart: add missing tx idle configuration in uart_init function. - drivers: uart: change uart_enable_9bit_transmit_mode function macro condition. - drivers: uart: change tx idle function macro condition. - drivers: pmp fix calculation of PMPADDR and PMAADDR. - drivers: tsw: fix bitfield IRQEN in register MM2S_DMA_CR setting error. - drivers: pllctl: fix pll stable judgement and wait pll stable after change pll frequency. - drivers: pllctlv2: fix pll stable judgement and wait pll stable after change pll frequency. - drivers: qeiv2: fix iar build warning. - drivers: pwmv2 modify function note. - drivers: synt channel 4-15 can not use. - drivers: pllctlv2: fix calculation overflow issue. - drivers: tsw: update some register names. - boards: hpm6p00evk: fixed incorrect SPI2 clock value return in board_init_spi_clock API. - boards: hpm6p00evk: remove LIN info in README. - boards: hpm6p00evk: fix uart pin position. - boards: hpm5300evk: fix link of drv_lv50a_mp1907 in zh doc. - boards: add sdram card detect function. - boards: hpm6e00evk fix typo in board_init_can_clock. - components: usb: components: enable ios interrupt when open ep0. - components: plb: resolve sign comparison warning in LIN clock detection. - components: usb: components: fix dtd buffer address setting. - components: hpm_jpeg: fix build warning. - middleware: tflm: Fix const qualifier in flatbuffers stl_emulation.h. - middleware: fix freertos bug when using gptmr and enable preempt. - middleware: usb: middleware: fix control transfer processing. - middleware: fatfs: fix disk_ioctl data type. - middleware: lvgl: fix stride mismatch. - middleware: tinyusb: middleware: delete vTaskDelay from isr. - middleware: hpm_sdmmc support disabling the sdmmc xfer callback. - middleware: ucos_iii: fix preemption problem. - middleware: decoder_wav: fix wav header decode problem. - middleware: uCOS-III: add check for vector mode in port.c. - middleware: enhance motor angle alignment support. - middleware: segger_rtt fix compiling issue when using ses with andes toolchian. - samples: delete disable trig function in qei init. - samples: delete disable oneshot mode function in qei init. - samples: sei: samples: fix crc configuration. - samples: sdm: update data to voltage convert function. - samples: fix 'enable' spelling errors. - samples: image: samples: add cache invalidate before encode. - samples: image: samples: add cache invalidate before encode. - samples: image: samples: fix pdma src buffer don't have cache maintain. - samples: mhd_wifi_demo: exclude lwip for clang. - samples: lwip:mhd_wifi_demo add missing lwip portable layers. - samples: lwip:mhd_wifi_demo avoid using the common lwip config. - samples: lwip_iperf: fix compiling error. - samples: bgpr: add default build type. - samples: lwip: samples: eliminate clang-tidy check errors. - samples: sent: samples: add the -lm option to link the math library. - samples: fix netx build error. - samples: netxduo: add support for specifying port in cmd line. - samples: pllctlv2: remove ss type. - samples: cherryusb: audio samples: fix feedback ep no data. - samples: cherryusb: samples: http_server_freertos: exclude ram_release build type. - samples: fix OpENer samples restart error when link down. - samples: rom_api:sdp_api correct wrong ROM API call. - samples: fix the bug that the lsb of POS is covered to zero. - samples: dhrystone: correct compile options. - samples: i2s: remove unnecessary included drivers. - samples: tsn: samples: fix missing flow meter configurations. - samples: tsn: samples: lwip_tcpecho: fix the issue that port number cant not be redefined. - samples: tsn: samples: common: fix extreme low throughput with interrupt usage. - samples: rom_api:xpi_nor_api avoid inlining ram function into function at FLASH. - samples: spi_sdcard: samples: fix large file write test failed with IAR release build. - samples: fix iar relocation issue for the software library in flash_sdram_xip build. - samples: drivers: samples: dma_use_gptmr_event_transfer: fix no led blimk for hpm5e00evk. - samples: sent: samples: align pwm_meas_table to 8-byte boundary when transfer size is 8 bytes in XDMA. - samples: drivers: samples: fix documentation description errors and duplicates. - samples: lwip:mhd_wifi_demo fix demo crashing due to enabling xfer callback. - samples: iperf: fix the tcp receive speed problem of iperf on NetX Duo. - samples: image: samples: fix create new file incorrect. - samples: cherryusb: samples: add volatile to isr variable 'rndis_tx_done'. - samples: tsn: samples: master / samples: remove a redundant function call of vTaskStartSchedule(). - samples: bgpr: re-init bgpr data when cmp failure. - samples: lwip/modbus/multicore/opener/tsn: samples: fix the spelling error. - samples: pllctlv2: change debug uart source clock to osc24m. - samples: retry connect to server if connect error. - samples: put var dhcp_client to zero init section. - samples: jpeg_encode: fix cache incorrect. - samples: lvgl_audio_player: filter music files which can't decode. - samples: move nonvector definition to middleware from ucos samples. - samples: lwip_ping_freertos_socket: fix compilation error. - samples: i2s_emulation: fix exception caused by input 4 with no recording. - samples: audio: fix pdmlite dependency. - samples: lwip: samples: ethernetif: fix rx task stack overflow when FPU is enabled. - docs: add note info abort enabling dhcp in udp sample readme. - docs: drivers: docs: fix some description errors. - docs: samples: docs: i2c: fix spelling errors. - docs: samples: docs: uart: fix incorrect links issue. - docs: samples: docs: i2c: fix incorrect descriptions for index.rst. - docs: samples: docs: fix incorrect spi_component link. - docs: remove not-needed symbols from sample index file. - docs: get_started: group-tab should be used for OS. - docs: samples: docs: gptmr: fix documentation description errors. - docs: samples: docs: uart: fix documentation description errors. - docs: components: docs: remove duplicate information. - docs: add more information for opener samples. - docs: get_started: fix indent issue. - docs: components: docs: fix RST formatting. - cmake: ses: only convert -flto to ses when using segger compiler. - cmake: iar: correct ld option processing. - cmake: compare_target_sdk_version: correct compare. - scripts: ses: fix windows path issue. - Added: - soc: add hpm5e00 support - drivers: i2c: add i2c_get_fifo_size API. - drivers: sei: add some APIs. - drivers: add pdmlite driver. - drivers: gptmr: add APIs for burst mode. - boards: add hpm5e00evk support - boards: add board_init_gptmr_clock API. - components: hpm_log: add hpm_log. - components: i2s_over_spi: add hpm_i2s_master_over_spi_tx_buffer_blocking API. - components: add mm_align component. - components: add capacity related param to sd_card_t. - components: add hpm_sdmmc non-blocking read/write api. - components: dma_mgr: add APIs to request dma resource from specified DMA. - middleware: motor_ctrl: add step motor close loop. - middleware: add middleware doc. - middleware: motor_ctrl: add hardware hybrid loop support for MCL. - samples: motor_ctrl: add step_motor_closed_loop demo. - samples: lvgl: add lvgl_indev_usb_keyboard_mouse sample. - samples: add mm_align sample. - samples: motor_ctrl: update bldc foc demo. - samples: cherryusb: add uvc mjpeg sample. - samples: tsn: samples: add an lwip_iperf samples. Signed-off-by: Ryan QIAN <[email protected]>
1 parent d64c133 commit 8d2af74

File tree

1,388 files changed

+170845
-918594
lines changed

Some content is hidden

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

1,388 files changed

+170845
-918594
lines changed

CHANGELOG.md

Lines changed: 287 additions & 2 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ gantt
33
title HPM SDK Release Plan
44
dateFormat YYYY-MM-DD
55
section Mainline Release
6-
v1.8.0 :a1, 2024-10-01, 2024-12-31
7-
v1.9.0 :a2, 2025-01-01, 2025-03-31
8-
v1.10.0 LTS :a3, 2025-04-01, 2025-06-30
6+
v1.9.0 :a1, 2025-01-01, 2025-03-31
7+
v1.10.0 :a2, 2025-04-01, 2025-06-30
8+
v1.11.0 :a3, 2025-07-01, 2025-12-31
99
```
1010

1111
[中文](README_zh.md)

README_zh.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ gantt
33
title HPM SDK Release Plan
44
dateFormat YYYY-MM-DD
55
section Mainline Release
6-
v1.8.0 :a1, 2024-10-01, 2024-12-31
7-
v1.9.0 :a2, 2025-01-01, 2025-03-31
8-
v1.10.0 :a3, 2025-04-01, 2025-06-30
9-
v1.11.0 :a4, 2025-07-01, 2025-09-30
10-
v1.12.0 :a5, 2025-10-01, 2025-12-31
6+
v1.9.0 :a1, 2025-01-01, 2025-03-31
7+
v1.10.0 :a2, 2025-04-01, 2025-06-30
8+
v1.11.0 :a3, 2025-07-01, 2025-12-31
119
```
1210

1311
[English](README.md)

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 = 9
2+
VERSION_MINOR = 10
33
PATCHLEVEL = 0
44
VERSION_TWEAK = 0
55
EXTRAVERSION = 0
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _24v_step_none_2a_revb:
2+
3+
24V Stepper Motor Development Board
4+
=======================================
5+
6+
Overview
7+
--------
8+
9+
The 24V stepper motor development board is an expansion board for controlling stepper motors, supporting both open-loop and closed-loop control modes.
10+
11+
Hardware Connection
12+
-------------------
13+
14+
1. Power Connection
15+
- Connect J6 to 24V power supply
16+
- Use jumper caps to connect J2 and J4
17+
18+
2. Motor Connection
19+
- Connect stepper motor driver wires to M1 interface
20+
- Wire sequence correspondence:
21+
22+
* VB1 -> B+
23+
* VA1 -> A+
24+
* VB2 -> B-
25+
* VA2 -> A-
26+
27+
3. Control Mode
28+
- Closed-loop control: requires sensor wire connection
29+
- Open-loop control: no sensor wire connection required
30+
31+
4. Motor Interface
32+
- Use J8 interface for motor connection
33+
34+
.. figure:: ../doc/24v_step_none_2a_revb.jpg
35+
:alt: 24V Stepper Motor Development Board
36+
:align: center
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _24v_step_none_2a_revb:
2+
3+
24V步进电机开发板
4+
==================
5+
6+
概述
7+
----
8+
9+
24V步进电机开发板是一个用于控制步进电机的扩展板,支持开环和闭环控制模式。
10+
11+
硬件连接
12+
--------
13+
14+
1. 电源连接
15+
- 将J6连接到24V电源
16+
- 使用跳帽连接J2和J4
17+
18+
2. 电机连接
19+
- M1接口连接步进电机驱动线
20+
- 线序对应关系:
21+
22+
* VB1 -> B+
23+
* VA1 -> A+
24+
* VB2 -> B-
25+
* VA2 -> A-
26+
27+
3. 控制模式
28+
- 闭环控制:需要连接传感器线
29+
- 开环控制:不需要连接传感器线
30+
31+
4. 电机接口
32+
- 使用J8接口连接电机
33+
34+
.. figure:: ../doc/24v_step_none_2a_revb.jpg
35+
:alt: 24V步进电机开发板
36+
:align: center

boards/hpm5300evk/README_en.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ Pin Description
349349
- P1[16]
350350
- the pin that controls SPI slave CS
351351

352+
- CLOCK REF Pin
353+
354+
.. list-table::
355+
:header-rows: 1
356+
357+
* - Function
358+
- Position
359+
* - PA30
360+
- P1[15]
361+
352362
.. _hpm5300evk_known_issues:
353363

354364
Board Know Issue

boards/hpm5300evk/README_zh.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ HPM5300EVK提供了一系列HPM5300系列微控制器特色外设的接口,包
332332

333333
- 电机引脚
334334

335-
参考 `DRV-LV50A-MP1907 电机驱动板章节 <lab_drv_lv50a_mp1907>`_ 进行连接
335+
参考 :ref:`drv_lv50a_mp1907` 进行连接
336336

337337
- SPI模拟I2S CS引脚
338338

@@ -346,6 +346,16 @@ HPM5300EVK提供了一系列HPM5300系列微控制器特色外设的接口,包
346346
- P1[16]
347347
- 控制SPI从机CS的引脚
348348

349+
- CLOCK REF引脚
350+
351+
.. list-table::
352+
:header-rows: 1
353+
354+
* - 功能
355+
- 位置
356+
* - PA30
357+
- P1[15]
358+
349359
.. _hpm5300evk_known_issues:
350360

351361
开发板已知问题
@@ -366,4 +376,4 @@ HPM5300EVK提供了一系列HPM5300系列微控制器特色外设的接口,包
366376

367377
- 修正情况
368378

369-
- `HPM5300EVKRevD` 已修正,`HPM5300EVKRevC` 及之前的版本有这个问题。
379+
- `HPM5300EVKRevD` 已修正,`HPM5300EVKRevC` 及之前的版本有这个问题。

boards/hpm5300evk/board.c

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 HPMicro
2+
* Copyright (c) 2023-2025 HPMicro
33
* SPDX-License-Identifier: BSD-3-Clause
44
*
55
*/
@@ -596,3 +596,32 @@ void board_init_gptmr_channel_pin(GPTMR_Type *ptr, uint32_t channel, bool as_com
596596
init_gptmr_channel_pin(ptr, channel, as_comp);
597597
}
598598

599+
void board_init_clk_ref_pin(void)
600+
{
601+
init_clk_ref_pin();
602+
}
603+
604+
uint32_t board_init_gptmr_clock(GPTMR_Type *ptr)
605+
{
606+
uint32_t freq = 0U;
607+
if (ptr == HPM_GPTMR0) {
608+
clock_add_to_group(clock_gptmr0, BOARD_RUNNING_CORE & 0x1);
609+
freq = clock_get_frequency(clock_gptmr0);
610+
} else if (ptr == HPM_GPTMR1) {
611+
clock_add_to_group(clock_gptmr1, BOARD_RUNNING_CORE & 0x1);
612+
freq = clock_get_frequency(clock_gptmr1);
613+
} else if (ptr == HPM_GPTMR2) {
614+
clock_add_to_group(clock_gptmr2, BOARD_RUNNING_CORE & 0x1);
615+
freq = clock_get_frequency(clock_gptmr2);
616+
} else if (ptr == HPM_GPTMR3) {
617+
clock_add_to_group(clock_gptmr3, BOARD_RUNNING_CORE & 0x1);
618+
freq = clock_get_frequency(clock_gptmr3);
619+
} else if (ptr == HPM_PTMR) {
620+
clock_add_to_group(clock_ptmr, BOARD_RUNNING_CORE & 0x1);
621+
freq = clock_get_frequency(clock_ptmr);
622+
} else {
623+
/* Not supported */
624+
}
625+
return freq;
626+
}
627+

boards/hpm5300evk/board.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 HPMicro
2+
* Copyright (c) 2023-2025 HPMicro
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*
@@ -381,6 +381,10 @@
381381
#define BOARD_FREERTOS_TIMER_IRQ IRQn_GPTMR2
382382
#define BOARD_FREERTOS_TIMER_CLK_NAME clock_gptmr2
383383

384+
#define BOARD_FREERTOS_TICK_SRC_PWM HPM_PWM0
385+
#define BOARD_FREERTOS_TICK_SRC_PWM_IRQ IRQn_PWM0
386+
#define BOARD_FREERTOS_TICK_SRC_PWM_CLK_NAME clock_mot0
387+
384388
#define BOARD_FREERTOS_LOWPOWER_TIMER HPM_PTMR
385389
#define BOARD_FREERTOS_LOWPOWER_TIMER_CHANNEL 1
386390
#define BOARD_FREERTOS_LOWPOWER_TIMER_IRQ IRQn_PTMR
@@ -426,6 +430,13 @@
426430
#define BOARD_GPTMR_I2S_FINSH_CHANNEL 2
427431
#define BOARD_GPTMR_I2S_FINSH_CLK_NAME clock_gptmr0
428432

433+
#define BOARD_APP_CLK_REF_PIN_NAME "P1[15] (PA30)"
434+
#define BOARD_APP_CLK_REF_CLK_NAME clock_ref0
435+
#define BOARD_APP_CLK_REF_SRC_NAME clk_src_pll1_clk1
436+
#define BOARD_APP_PLLCTLV2_TEST_PLL pllctlv2_pll1
437+
#define BOARD_APP_PLLCTLV2_TEST_PLL_CLK pllctlv2_clk1
438+
#define BOARD_APP_PLLCTLV2_TEST_PLL_NAME clk_pll1clk1
439+
429440
#if defined(__cplusplus)
430441
extern "C" {
431442
#endif /* __cplusplus */
@@ -479,6 +490,8 @@ void board_init_adc_qeiv2_pins(void);
479490
void board_lin_transceiver_control(bool enable);
480491

481492
void board_init_gptmr_channel_pin(GPTMR_Type *ptr, uint32_t channel, bool as_comp);
493+
void board_init_clk_ref_pin(void);
494+
uint32_t board_init_gptmr_clock(GPTMR_Type *ptr);
482495

483496
#if defined(__cplusplus)
484497
}

0 commit comments

Comments
 (0)