Skip to content

Commit f0393c9

Browse files
committed
hpm sdk release v1.8.0
[1.8.0] - 2024-12-31: Main changes since 1.7.0 Tested Segger Embedded Studio Version: 8.20 Tested Zcc toolchain 3.2.4 - Changed: - soc: TRGMMUX: add description in hpm_trgmmux_src.h - soc: update hpm_core_clock when setting cpu clock - soc: update header files. - soc: unified clock name - soc: update header file from hpm_soc_info - soc: romapi add fencei to xpi nor apis. - drivers:sdxc add new API and optimize the transfer handling logic. - drivers: cam: remove the pack_dir assignments for CR register - drivers: lobs: update lobs driver - drivers: i2c: add status_i2c_bus_busy enumeration member - drivers: femc: update delay cell config - drivers: sei: update wait len for hpm5300 sei async communication - drivers: sei: update hpm5300 asynchronous mode - drivers: i2s: support different tx/rx channel in duplex mode - drivers: camera: pix format support yuv422 - drivers: uart: add new API uart_enable_rx_function. - drivers: pwm: Increased output 100 percent duty cycle with centre symmetry. - drivers: tsw: add APIs to support Qbu, CB, and Qci - components: spi: Optimize SPI clock division for hpm_spi_set_sclk_frequency API - components: debug_console: keep symbols used by ses library - boards: remove unused macro BOARD_USB - boards: enable only common clock in board_init_clock() - boards: add board_init_i2c_clock() API - boards: uart and spi use default clock frequency 80MHz - boards: change BOARD_APP_I2S_DATA_LINE to BOARD_APP_I2S_TX_DATA_LINE and BOARD_APP_I2S_RX_DATA_LINE - boards: hpm6800evk reduce ddr io leakage. - boards: HPM6E00evk: add pin setting for uart lin slave - boards: enet: replace with macro for clock setting APIs - middleware: hpm_mcl_v2: add pll filter - middleware: rtt: iar: rtt_risc_v_trap_handler align to 4 byte - middleware: freertos: new critical protection method - middleware: vglite: update to 4.0.87. - middleware: hpm_sdmmc switch to adma3 descriptor by default. - middleware: cherryusb: update video stack to use pingpang buffer - middleware: cherryusb: update to v1.4.2 - middleware: lvgl: change vglite mode to cacheable - middleware: lvgl: update lvgl library source. - middleware: wifi: mhd_wifi format the source code. - middleware: rtthread-nano rt_kprintf update to v4.1.1 . - middleware: wifi: mhd_wifi optimize lib including path. - middleware: wifi: mhd_wifi update wifi stack with BSD license. - middleware: add version or changelog - middleware: wifi: mhd_wifi add license and changelog. - middleware: hpm_sdmmc: mmc,sdio optimize cache-maintenance efficiency. - middleware: hpm_sdmmc: hpm_sdmmc_host add new API and optimize transfer logic. - samples: uart_tamagawa: update uart trigger. - samples: SDM: add console to test different function. - samples: dmav2: update dmav2 fixed burst transfer size - samples/components/middleware: use clock_get_core_clock_ticks_per_us() and clock_get_core_clock_ticks_per_ms() instead of hpm_core_clock - samples: lobs: use lobs_signal_group_t and lobs_trace_data_t - samples/middleware/components: add clock to group by applications - samples: i2c: use add board_init_i2c_clock() API - samples: audio sample dependency change - samples: dhrysone: update compile options - samples: i2s: use BOARD_APP_I2S_TX_DATA_LINE instead of BOARD_APP_I2S_DATA_LINE - samples: mcl: bldc_foc: modify clc to use the pid parameter - samples: audio: update codec I2S channel. - samples: lwip: common: single & multiple: eliminate two "Down" status at the first linkup - samples: tsn: all: samples: tsn: all: eliminate two Down status at the first linkup - samples: erpc: update button pressed - samples: cherryusb: use BOARD_BUTTON_PRESSED_VALUE instead of APP_BUTTON_PRESSED_VALUE - samples: spi_components: half duplex: add notice content for all readme - samples: spi_components: fixed compile waring on SES for half duplex slave dma sample - samples: drivers: tsw: add phy reset logic - samples: lwip: lwip_iperf_multi_ports: app.yaml: update excluded target list - samples: ecat_io: update DC setting in README - samples: tflm: optimized speed. - samples: i2s: change HDMA to XDMA - samples: plb: pulseoutput: rename init_plb_pins() to init_plb_pulse_pins() - samples: ecat: support initializing eeprom data. - samples: lwip: mhd_wifi_demo optimize TCP RX and UDP RX performance. - samples: lwip_tcpclient_freertos_socket: eliminate the use of the global variable gnetif - samples: ppi: sram: update as/ah stage time - samples: cherryusb: adapter to cherryusb v1.4.2 - samples: pwm: add pwm duty 0-100 output - samples: lwip: mhd_wifi_demo update limitation. - samples: lwip: mhd_wifi_demo add limitation for andes&zcc toolchain. - samples: tsn: tsn_psfp_egress: adjust some settings. - utils: hpm_swap: exclude bswapxx for segger_rtl - docs: add plb filter doc to index - docs: samples: drivers: mipi_csi: update the project setting configuration - cmake: toolchain: update RV_ABI for nds-gcc, when it's not set - Fixed: - isr: adjust SDK_DECLARE_EXT_ISR_x position to fix clang warning - soc: irq s mode: fix CONFIG_RTTHREAD lost - soc: hpm6e00: ip: tsw: fix the access attributes of TXDATA/TSYN_TXBUF_TQUE_AND_TX_LEN in BIN - soc: linker: add "*" to some sections - soc: modify register used by DSP in IRQ nesting, from s0 to s4 . - soc: modify interrupt handler under vector mode - soc: add section .isr_vector.* - soc: fix freertos vectormode build error - soc: hpm6e00: fix the register offset in cb frer module - soc: reset.c: weak __dso_handle - soc: HPM6700: HPM6750: acmp: fix missing a dependent clock setting. - soc: HPM6E00: fix TRGM register header file - drivers: pdgo: fix incorrect register accessing - drivers: sdm: remove useless function and add new API. - drivers: hpm_enc_pos_drv: fix build warning when -Werror=double-promotion - drivers: i2c: fixed data length assignment error for i2c_master_address_read API - drivers: sdxc enable adma3 support. - drivers: tsw: add the missing doxygen description for the return value from tsw_shap_set_cbs - drivers: tsw: fix no update trigger in tsw_get_rtc_offset - drivers: tsw: fix missing the higher part of second in tsw_set_rtc_offset - drivers: femc: update sram default config - drivers: femc: support sdram1 and sram1/2 config - drivers: vsc: fix sw only inject adc value don't trigger vd/vq calculation - drivers: plb: fix enum plb_type_a_lut_num - drivers: trgm: fix trgm_filter_mode_stable_high and trgm_filter_mode_stable_low - drivers: fix error status checking in esc_phy API - drivers: tsw: fix compile warning with andes toolchain - drivers: pla: fix pla comment. - drivers: pwmv2: fix pwmv2 driver code error. - drivers: pwmv2: disable pwm forced output by default. - drivers: sdm: fix API to avoid configuring wrong register value if multiple calls. - drivers: set ewdg window mode timeout to 101ms. - drivers: sdxc correct typo in sdxc status code. - drivers: canopen fix can related boards iar build error. - drivers: tsw: fix failing to control gate to close in static mode. - drivers: tsw: fix size filtering for psfp setting. - drivers: acmp: fix using a fixed acmp clock source name. - drivers: mcan fix typo in mcan driver. - components: serial_nor: fixed the issue of address and data phase assignment error when parsing the read instruction parameters of SFDP - components: plb_lin_clock: change variable types to avoid overflow. - components: enet_phy: jl1111: fix register address info. - components: spi: due to divide by 2, the SPI frequency division is allowed to be 0 for hpm_spi_set_sclk_frequency API - boards: fix core1 don't init hpm_core_clock - boards: hpm6800evk:: fixed the GPTMR COMP position error for readme - boards: hpm6750evkmini: fix touch reset timing. - boards: sdram: add and use macro BOARD_SDRAM_COLUMN_ADDR_BITS - boards: hpm6750evk2/hpm6300evk: change init_sdram_pins() to init_femc_pins() - boards: hpm6750evkmini: remove ETH0_EVTO_2/ETH0_EVTI_2 pin setting - boards: enet: fix missing clock source setting for RGMII port - boards: fix RGB pin pad setting. - boards: hpm6e00evk: correct uart_lin pin setting - boards: hpm5301evklite: pinmux: change the same of init_gptmr_pins API pin for init_gptmr_channel_pin API - boards: hpm6200evk: set cpu clock using pll1clk1, avoid impact pll1clk0 - boards: hpm6800evk: set dcdcm work mode to 1 - boards: board_sd_configure_clock fix clock unstable issue during transition. - boards: hpm6300/hpm6700/hpm6800: fix BOARD_BUTTON_PRESSED_VALUE error - boards: fix missing board-level acmp clock setting API. - boards:openocd: hpm6300evk.cfg: correct delay cell setting - boards: openocd: fix openocd access non-standard csr problem - boards: hpm6200evk: fix BOARD_CPU_FREQ value - middleware: add canopen v2.0 support. - middleware: improve freeRTOS vector mode isr efficiency - middleware: fix segger compile error - middleware: vglite: fix build error - middleware: optimize threadx related CMakeLists - middleware: optimize uC/OS-III related CMakeLists - middleware: optimize FreeRTOS related CMakeLists - middleware: fix ucos_iii core1 error - middleware: fix .align error in s files - middleware: hpm_mclv2: preventing divide-by-zero errors in alpha beta. - middleware: hpm_mclv2: Fixing the motor with many pole pairs at the wrong angle. - middleware: lwip: opt.h: recover LWIP_TCPIP_CORE_LOCKING setting to 1 - middleware: hpm_sdmmc: spi sdcard: fix spi sdcard log redirection definition error issue - middleware: rtthread-nano finsh rx add receiving buffer . - middleware: lvgl: fix large screen logo incorrect - middleware: put function into section isr_vector - middleware: hpm_mcl_v2: fix calls can lead to illegal pointer accesses. - middleware: rtthread-nano,delete print wrapper. - middleware: mbedtls: port: fix the logic of sourcing sdp files when there's no sdp on the specified soc - middleware: fix trace_recorder rtt error - middleware: rtthread-nano,fix thread detach not schedule. - middleware: rtthread-nano,modify console marco dependency. - middleware: rtthread-nano add declaration in interrupt.S. - middleware: fix trace recorder IAR build error - middleware: hpm_sdmmc fix errors reported by clang-tidy. - middleware: hpm_sdmmc: hpm_sdmmc_sd Fix logic issue for getting card flag and read last sector. - middleware: hpm_mcl_v2: Fix wrong sector number. - middleware: hpm_sdmmc ensure the ADMA3 table is 8-byte aligned. - samples: multicore_hello: change core1 demo from pwm to gptmr. - samples: rgb_led: use pwmv2 to support led control. - samples: rom_api: xpi_nor_api correct the read_status instruction seq. - samples: usb: fix segger compile error - samples: i2c_components: add initialize the i2c clock - samples: i2c_components: rename the cmakelists file to CMakeLists - samples: uart_lin_salve: add board lin transceiver control. - samples: drivers: gpio: Fixed the problem of not working properly on both edge trigger mode - samples: tinyusb/usbx: host: fix build warning - samples: tsn: tsn_time_aware_scheduling: fix comment error - samples: lwip: common: multiple: fix compiling error with zcc toolchain - samples: femc: sram: use macro BOARD_FEMC_ASYNC_SRAM_AD_MUX_MODE and BOARD_FEMC_ASYNC_SRAM_SIZE - samples: femc: sram: use macro BOARD_FEMC_ASYNC_SRAM_CS_INDEX - samples: update section .fast_ram to .fast_ram.non_init and .noncacheable to .noncacheable.non_init - samples: lwip: fix the comment for ICMP checksum - samples: lvgl_audio_player: fix build error for update lvgl v9.2 - samples: lvgl: rtos: fix compilation error for using RECURSIVE_MUTEXES in lvgl. - samples: spi_components: half_duplex: dma: for master, Need to determine SPI transmission completion when send - samples: pmbus: change SMBUS related macro definitions to PMBUS - samples: drivers: gptmr: timer_basic: fixed the issue the time information was not printed - samples: drivers: pllctlv2 Correct UART buadrate after preset switching. - samples: drivers: pllctl Avoid access to FLASH during clock transition. - samples: motor_ctrl: bldc_lvgl: fix compiler error - samples: lwip: ports: rtthread-nano: multiple: arch: sys_arch.c: fix that value stored to 'ret' is never read - samples: lwip_tcpecho_multi_ports_rtthread-nano: tcp_echo.c: fix that valued stored is never read - samples: motor_ctrl: use pwmv2_issue_shadow_register_lock_event. - samples: rdc: fix rdc desynchronization causing accuracy errors. - samples: lwip: mhd_wifi_demo fix zcc compiling error. - samples: drivers: pllctl force XTAL on in case RC24M is not trimmed. - samples: rtthread rvbacktrace tshell thread stack overflow under zcc. - samples: rvbacktrace, add volatile keyword to prevent optimization. - samples: opener/motor: set motor speed to zero at start - samples: fix multicore/erpc/motor project link error - samples: enable gptmr clock in OpENer/motor sample - samples: disable dhcp in sntp sample by default - samples: mbedtls: fix program exception blocking - samples: lwip_https_server: fix function error - samples: separate rev and pos data in 53xx soc - samples: rom_api: xpi_nor_api place flash API into RAM. - samples: modbus: tcp: fix lwip init warning for IAR build type - samples: add some info to trace recorder samples - samples: pwmv2: fix one clock cycle of pulses at startup. - samples: spi_sdcard: add SPI transfer completion judgment for DMA transmission - samples: enet: pps: fix no output - samples: jpeg_decode: fix extract jpeg head failed - samples: lwip_tcpecho_multi_ports_rtthread-nano: fix DHCP failure - samples: bldc_foc: fix speed loop parameters. - samples: image: fix udisk build failure - samples: tsn: tsn_credit_based_shaper: fix getting phy link status logic - samples: qeo_dac: add dac clock enable in sample. - samples: uart lin slave buadrate adaptive fix readme. - samples: drivers: dma: dma_use_gptmr_event_transfer: adjust the clock_add_to_group API call order for gptmr - samples: plb doc: index change to glob - samples: ecat_foe/ecat_cia402 add missing macro. - samples: ecat: rename eeprom_update image file - samples: fix canopen release type PDO block. - samples: canopen add to sample list. - samples: exclude OpENer motor sample from hpm6750evk2 and hpm6300evk - samples: motor_ctrl: motor running noise. - samples: i2s_emulation: fixed the abnormal playback issue if there is no recorded content - samples: rom_api: xpi_nor_api Fix crashing when using zcc toolchain. - samples: usbx: msc: fix doc description error - samples: cdc_acm_uart_com: fix readme max baudrate description - samples: tsn: fix log format for RX-Time. - samples: tsn: tsn_frame_preemption_egress: fix FPE indication value error. - samples: tsn: frame_preemption_ingress: fix that eth smac doesn't match with arp smac. - samples: tsn: tsn_frame_preemption_ingress: fix that the preemption logic is not expected with flash_sdram_xip in release configuration. - samples: lwip_tcpecho_multi_ports_rtthread-nano: fix the main thread stack overflow with the zcc toolchain - samples: plic button sometimes does not work. - samples: fix trace recorder doc - samples: exclude unsupported sample - samples: image: encoder: fix encoder flow - samples: uart_tamagawa: change hardware trig way - samples: fix compilation error related to struct timeval with andesight toolchain - samples: motor_ctrl: bldc_offline_param: Fixing Printing Information Errors. - samples: motor_ctrl: Fixing speed switching causing motor stalling - samples: SEI: add missing clear interrupt flag code - docs: readme: fix plb pin descriptor - docs: get_started: replace hpm6750evk with hpm6750evkmini - docs: rvbacktrace, add rvbacktrace docstree to the sample docstree. - docs: add motor related information in readme - docs: rdc: Add description of initial position. - docs: hpm6e00evk: fix plb filter pins descriptor - Added: - soc: add clock_get_core_clock_ticks_per_us() and clock_get_core_clock_ticks_per_ms() APIs - soc: clock driver add clock_wait_source_stable API. - drivers: i2c: add i2c_set_direction API - drivers: i2c: add enable and disable stop phase APIs for master - drivers: i2c: add enable and disable data phase APIs for master - drivers: i2c: add enable and disable address phase APIs for master - drivers: i2c: add enable and disable start phase APIs for master - drivers: i2c: add i2c_master_set_slave_address API - drivers: i2c: add i2c_master_issue_data_transmission API - drivers: i2c: add i2c_set_data_count API - drivers: i2s: add i2s_config_multiline_transfer() API - drivers: sdxc add api for interrupt_signal retrieval. - drivers: adc12: fix using a wrong calibration value - drivers: ffa: add long data support. - drivers: qeiv2: add qeiv2_config_phmax() and qeiv2_config_phparam() APIs - drivers: sdm: add new feature GATE/Timestamp API. - components: add i2c component - components: enet_phy: add enum enet_phy_link_unknown in enet_phy_link_status_t - components: spi: add the spi slave is not support QSPI and DSPI judgment - components: add plb filter component - components: add plb lin clock detection. - boards: add macro BOARD_BUTTON_PRESSED_VALUE - boards: hpm6750evk2: pinmux: fix build warning in init_sdxc_clk_data_pins() with zcc toolchain - middleware: hpm_sdmmc add sdio support. - middleware: modify rvbacktrace resources file. - middleware: add RvBacktrace resources. - middleware: add trace recorder rtthread support - middleware: add trace recorder support - middleware: add uC/OS-III gptmr support - middleware: usb: add macro CONFIG_USB_DEVICE_FORCE_FULL_SPEED instead of CONFIG_USB_DEVICE_FS - middleware: usb: add macro CONFIG_USB_HOST_FORCE_FULL_SPEED to force usb host working in full speed - middleware: add OpENer support - middleware: fatfs: sdxc add support for interrupt-driven mode. - middleware: hpm_sdmmc add support for interrupt-driven mode and osal. - middleware: hpm_mcl: add 3p3z convert pid function. - middleware: wifi add the MHD wifi stack. - samples: add rtthread rvbacktrace under using fp register. - samples: add baremetal rvbacktrace under no using fp. - samples: add baremetal rvbacktrace using fp. - samples: add info to OpENer samples's doc - samples: add rtthread trace recorder sample - samples: add trace recorder freertos sample - samples: add uC/OS-III hello world using gptmr as systick source - samples: add master and slave samples for i2c dma components - samples: add master and slave samples for i2c polling components - samples: add OpEner multicore motor control - samples: add OpEner motor control - samples: add OpENer blinky - samples: spi_components: slave: add notice content for all slave samples readme doc - samples: drivers: spi: add notice content for all spi slave readme doc - samples: sdxc add support for interrupt-driven mode. - samples: lwip: add conditional compilation for application macros - samples: lwip: add a lwip_udpecho_freertos_socket sample - samples: lwip: add a lwip_udpecho_rtthread-nano - samples: lwip: add a lwip_udpecho_freertos sample - samples: lwip: add a lwip_udpecho - samples: lwip: lwip_tcpclient_freertos_socket: add a macro name of task priority for netif_update_link_status - samples: lwip: lwip_tcpecho_freertos_socket: add a macro name of task priority for netif_update_link_status - samples: cherryusb: add cdc acm host sample - samples: motor_ctrl: bldc_xxx & step_motor_foc: add missing diff_sel passed into adc12_init - samples: ethercat: ecat_cia402: motor: bldc_foc: add missing diff_sel passed into adc12_init - samples: drivers: adc: adc12: add missing diff_sel passed into adc12_int - samples: tsn: tsn_ethernet: lwip_tcpecho: add interrupt usage - samples: plb: add plb filter sample - samples: optimize demo current loop time. - samples: lwip: mhd_wifi_demo add wifi demo for ap6256. - samples: add uart lin slave buadrate adaptive samples. - samples: cherryusb: add uvc demo - samples: lwip: common: single: add an API for getting the DHCP ready staus when enabling DHCP - samples: lwip: add a lwip_ping_freertos_socket sample - samples: tsn: add tsn_psfp_egress - samples: tsn: add tsn_stmid_frer_ingress - samples: tsn: add tsn_stmid_frer_egress - samples: tsn: add tsn_frame_preeemption_ingress - samples: tsn: add tsn_frame_preemption_egress Signed-off-by: Ryan QIAN <[email protected]>
1 parent 276af93 commit f0393c9

File tree

2,649 files changed

+255677
-37840
lines changed

Some content is hidden

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

2,649 files changed

+255677
-37840
lines changed

CHANGELOG.md

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

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_LIB_ITF})
1212
add_library(${HPM_SDK_GCC_LIB} STATIC "")
1313
target_link_libraries(${HPM_SDK_GCC_LIB} PUBLIC ${HPM_SDK_GCC_LIB_ITF} ${HPM_SDK_LIB_ITF})
1414

15+
add_library(${HPM_SDK_GCC_STARTUP_LIB} STATIC "")
16+
target_link_libraries(${HPM_SDK_GCC_STARTUP_LIB} PUBLIC ${HPM_SDK_GCC_LIB_ITF} ${HPM_SDK_LIB_ITF})
17+
1518
target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_GCC_LIB_ITF})
1619
if("${TOOLCHAIN_VARIANT}" STREQUAL "nds-gcc")
1720
target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_NDSGCC_LIB_ITF})
1821
elseif("${TOOLCHAIN_VARIANT}" STREQUAL "zcc")
1922
target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_ZCC_LIB_ITF})
2023
target_link_libraries(${HPM_SDK_GCC_LIB} PUBLIC ${HPM_SDK_ZCC_LIB_ITF})
24+
target_link_libraries(${HPM_SDK_GCC_STARTUP_LIB} PUBLIC ${HPM_SDK_ZCC_LIB_ITF})
2125
endif()
2226

2327
if(flash_size)
@@ -116,7 +120,7 @@ endif()
116120

117121
if(DEFINED CUSTOM_GCC_STARTUP_FILE)
118122
set(USE_CUSTOM_STARTUP 1)
119-
sdk_gcc_src(${CUSTOM_GCC_STARTUP_FILE})
123+
sdk_gcc_startup_src(${CUSTOM_GCC_STARTUP_FILE})
120124
endif()
121125

122126
if(DEFINED CUSTOM_SES_STARTUP_FILE)
@@ -129,8 +133,6 @@ if(DEFINED CUSTOM_IAR_STARTUP_FILE)
129133
sdk_iar_src(${CUSTOM_IAR_STARTUP_FILE})
130134
endif()
131135

132-
sdk_sys_inc(${SYSROOT_DIR}/include)
133-
134136
# parse module list file provided in soc folder, it will decide which modules to be enabled under drivers folder
135137
import_soc_modules(soc/${HPM_SOC_SERIES}/${HPM_SOC}/soc_modules.list)
136138

@@ -208,6 +210,7 @@ if("${TOOLCHAIN_VARIANT}" STREQUAL "nds-gcc")
208210
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
209211
${HPM_SDK_WHOLE_ARCHIVE_OPT}
210212
${HPM_SDK_NDSGCC_LIB_ITF}
213+
${HPM_SDK_GCC_STARTUP_LIB}
211214
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
212215
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
213216
"-Wl,--no-whole-archive")
@@ -217,13 +220,15 @@ elseif("${TOOLCHAIN_VARIANT}" STREQUAL "zcc")
217220
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
218221
${HPM_SDK_WHOLE_ARCHIVE_OPT}
219222
${HPM_SDK_ZCC_LIB_ITF}
223+
${HPM_SDK_GCC_STARTUP_LIB}
220224
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
221225
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
222226
"-Wl,--no-whole-archive")
223227
else()
224228
target_link_libraries(${APP_ELF_NAME}
225229
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
226230
${HPM_SDK_WHOLE_ARCHIVE_OPT}
231+
${HPM_SDK_GCC_STARTUP_LIB}
227232
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
228233
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
229234
"-Wl,--no-whole-archive")

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ gantt
33
title HPM SDK Release Plan
44
dateFormat YYYY-MM-DD
55
section Mainline Release
6-
v1.5.0 :a1, 2024-01-01, 2024-03-31
7-
v1.6.0 :a2, 2024-04-01, 2024-06-30
8-
v1.7.0 :a3, 2024-07-01, 2024-09-30
9-
v1.8.0 :a4, 2024-10-01, 2024-12-31
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
1011
```
1112

1213
[中文](README_zh.md)

README_zh.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ gantt
33
title HPM SDK Release Plan
44
dateFormat YYYY-MM-DD
55
section Mainline Release
6-
v1.5.0 :a1, 2024-01-01, 2024-03-31
7-
v1.6.0 :a2, 2024-04-01, 2024-06-30
8-
v1.7.0 :a3, 2024-07-01, 2024-09-30
9-
v1.8.0 :a4, 2024-10-01, 2024-12-31
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
1011
```
1112

1213
[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 = 7
2+
VERSION_MINOR = 8
33
PATCHLEVEL = 0
44
VERSION_TWEAK = 0
55
EXTRAVERSION = 0

boards/hpm5300evk/README_en.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,18 @@ The HPM5300EVK provides a series of interfaces for the characteristic peripheral
9999
| PWM0.P2 | J7[11] |
100100
| PWM0.P3 | J7[12] |
101101

102-
- PLB Output Pin:
102+
- PLB Pulse Output Pin:
103103

104104
| Function | Position |
105105
| -------- | -------- |
106-
| PLB.OUT | P1[24] |
106+
| PLB.PLUSE_OUT | P1[24] |
107+
108+
- PLB Filter Output Pin
109+
110+
| Function | Position |
111+
| ------- | ------ |
112+
| PLB.FILTER_IN | J7[9] |
113+
| PLB.FILTER_OUT | J7[11] |
107114

108115
- CAN Pin:
109116

boards/hpm5300evk/README_zh.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,19 @@ HPM5300EVK提供了一系列HPM5300系列微控制器特色外设的接口,包
106106
| CAN_L | J9[1] |
107107
| CAN_H | J9[3] |
108108

109-
- PLB输出引脚
109+
- PLB Pusle输出引脚
110110

111111
| 功能 | 位置 |
112112
| ------- | ------ |
113-
| PLB.OUT | P1[24] |
113+
| PLB.PULSE_OUT | P1[24] |
114+
115+
116+
- PLB Filter输出引脚
117+
118+
| 功能 | 位置 |
119+
| ------- | ------ |
120+
| PLB.FILTER_IN | J7[9] |
121+
| PLB.FILTER_OUT | J7[11] |
114122

115123
- OPAMP引脚
116124

boards/hpm5300evk/board.c

Lines changed: 49 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ void board_init_console(void)
9090
*/
9191
init_uart_pins((UART_Type *) BOARD_CONSOLE_UART_BASE);
9292

93-
/* Configure the UART clock to 24MHz */
94-
clock_set_source_divider(BOARD_CONSOLE_UART_CLK_NAME, clk_src_osc24m, 1U);
9593
clock_add_to_group(BOARD_CONSOLE_UART_CLK_NAME, 0);
9694

9795
cfg.type = BOARD_CONSOLE_TYPE;
@@ -176,7 +174,7 @@ void board_init_usb_dp_dm_pins(void)
176174
} else {
177175
uint8_t tmp;
178176
tmp = sysctl_resource_target_get_mode(HPM_SYSCTL, sysctl_resource_xtal);
179-
sysctl_resource_target_set_mode(HPM_SYSCTL, sysctl_resource_xtal, 0x03);
177+
sysctl_resource_target_set_mode(HPM_SYSCTL, sysctl_resource_xtal, 0x03); /* NOLINT */
180178
clock_add_to_group(clock_usb0, 0);
181179
usb_phy_disable_dp_dm_pulldown(HPM_USB0);
182180
clock_remove_from_group(clock_usb0, 0);
@@ -205,52 +203,11 @@ void board_init_clock(void)
205203
clock_add_to_group(clock_lmm0, 0);
206204
clock_add_to_group(clock_mchtmr0, 0);
207205
clock_add_to_group(clock_rom, 0);
208-
clock_add_to_group(clock_can0, 0);
209-
clock_add_to_group(clock_can1, 0);
210-
clock_add_to_group(clock_can2, 0);
211-
clock_add_to_group(clock_can3, 0);
212-
clock_add_to_group(clock_ptpc, 0);
213-
clock_add_to_group(clock_gptmr0, 0);
214-
clock_add_to_group(clock_gptmr1, 0);
215-
clock_add_to_group(clock_gptmr2, 0);
216-
clock_add_to_group(clock_gptmr3, 0);
217-
clock_add_to_group(clock_i2c0, 0);
218-
clock_add_to_group(clock_i2c1, 0);
219-
clock_add_to_group(clock_i2c2, 0);
220-
clock_add_to_group(clock_i2c3, 0);
221-
clock_add_to_group(clock_spi0, 0);
222-
clock_add_to_group(clock_spi1, 0);
223-
clock_add_to_group(clock_spi2, 0);
224-
clock_add_to_group(clock_spi3, 0);
225-
clock_add_to_group(clock_uart0, 0);
226-
clock_add_to_group(clock_uart1, 0);
227-
clock_add_to_group(clock_uart2, 0);
228-
clock_add_to_group(clock_uart3, 0);
229-
clock_add_to_group(clock_uart4, 0);
230-
clock_add_to_group(clock_uart5, 0);
231-
clock_add_to_group(clock_uart6, 0);
232-
/* group0[1] */
233-
clock_add_to_group(clock_uart7, 0);
234-
clock_add_to_group(clock_watchdog0, 0);
235-
clock_add_to_group(clock_watchdog1, 0);
236-
clock_add_to_group(clock_mbx0, 0);
237-
clock_add_to_group(clock_tsns, 0);
238-
clock_add_to_group(clock_crc0, 0);
239-
clock_add_to_group(clock_adc0, 0);
240-
clock_add_to_group(clock_adc1, 0);
241-
clock_add_to_group(clock_dac0, 0);
242-
clock_add_to_group(clock_dac1, 0);
243-
clock_add_to_group(clock_acmp, 0);
244-
clock_add_to_group(clock_opa0, 0);
245-
clock_add_to_group(clock_opa1, 0);
246206
clock_add_to_group(clock_mot0, 0);
247-
clock_add_to_group(clock_rng, 0);
248-
clock_add_to_group(clock_sdp, 0);
249-
clock_add_to_group(clock_kman, 0);
250207
clock_add_to_group(clock_gpio, 0);
251208
clock_add_to_group(clock_hdma, 0);
252209
clock_add_to_group(clock_xpi0, 0);
253-
clock_add_to_group(clock_usb0, 0);
210+
clock_add_to_group(clock_ptpc, 0);
254211

255212
/* Connect Group0 to CPU0 */
256213
clock_connect_group_to_cpu(0, 0);
@@ -283,14 +240,14 @@ void board_delay_ms(uint32_t ms)
283240
clock_cpu_delay_ms(ms);
284241
}
285242

243+
SDK_DECLARE_EXT_ISR_M(BOARD_CALLBACK_TIMER_IRQ, board_timer_isr)
286244
void board_timer_isr(void)
287245
{
288246
if (gptmr_check_status(BOARD_CALLBACK_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_CALLBACK_TIMER_CH))) {
289247
gptmr_clear_status(BOARD_CALLBACK_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_CALLBACK_TIMER_CH));
290248
timer_cb();
291249
}
292250
}
293-
SDK_DECLARE_EXT_ISR_M(BOARD_CALLBACK_TIMER_IRQ, board_timer_isr);
294251

295252
void board_timer_create(uint32_t ms, board_timer_cb cb)
296253
{
@@ -323,15 +280,19 @@ void board_init_led_pins(void)
323280
gpio_set_pin_output_with_initial(BOARD_LED_GPIO_CTRL, BOARD_LED_GPIO_INDEX, BOARD_LED_GPIO_PIN, board_get_led_gpio_off_level());
324281
}
325282

326-
void board_init_usb_pins(void)
283+
void board_init_usb(USB_Type *ptr)
327284
{
328-
init_usb_pins();
329-
usb_hcd_set_power_ctrl_polarity(BOARD_USB, true);
330-
/* Wait USB_PWR pin control vbus power stable. Time depend on decoupling capacitor, you can decrease or increase this time */
331-
board_delay_ms(100);
285+
if (ptr == HPM_USB0) {
286+
init_usb_pins(ptr);
287+
clock_add_to_group(clock_usb0, 0);
288+
289+
usb_hcd_set_power_ctrl_polarity(ptr, true);
290+
/* Wait USB_PWR pin control vbus power stable. Time depend on decoupling capacitor, you can decrease or increase this time */
291+
board_delay_ms(100);
332292

333-
/* As QFN48 and LQFP64 has no vbus pin, so should be call usb_phy_using_internal_vbus() API to use internal vbus. */
334-
/* usb_phy_using_internal_vbus(BOARD_USB); */
293+
/* As QFN48 and LQFP64 has no vbus pin, so should be call usb_phy_using_internal_vbus() API to use internal vbus. */
294+
/* usb_phy_using_internal_vbus(ptr); */
295+
}
335296
}
336297

337298
void board_led_write(uint8_t state)
@@ -383,12 +344,6 @@ void board_init_spi_pins_with_gpio_as_cs(SPI_Type *ptr)
383344
GPIO_GET_PIN_INDEX(BOARD_SPI_CS_PIN), !BOARD_SPI_CS_ACTIVE_LEVEL);
384345
}
385346

386-
void board_usb_vbus_ctrl(uint8_t usb_index, uint8_t level)
387-
{
388-
(void) usb_index;
389-
(void) level;
390-
}
391-
392347
uint32_t board_init_adc_clock(void *ptr, bool clk_src_bus)
393348
{
394349
uint32_t freq = 0;
@@ -402,7 +357,7 @@ uint32_t board_init_adc_clock(void *ptr, bool clk_src_bus)
402357
clock_set_adc_source(clock_adc0, clk_adc_src_ana0);
403358
clock_set_source_divider(clock_ana0, clk_src_pll0_clk2, 2U);
404359
}
405-
360+
clock_add_to_group(clock_adc0, 0);
406361
freq = clock_get_frequency(clock_adc0);
407362
} else if (ptr == (void *)HPM_ADC1) {
408363
if (clk_src_bus) {
@@ -413,7 +368,7 @@ uint32_t board_init_adc_clock(void *ptr, bool clk_src_bus)
413368
clock_set_adc_source(clock_adc1, clk_adc_src_ana1);
414369
clock_set_source_divider(clock_ana1, clk_src_pll0_clk2, 2U);
415370
}
416-
371+
clock_add_to_group(clock_adc1, 0);
417372
freq = clock_get_frequency(clock_adc1);
418373
}
419374

@@ -429,6 +384,13 @@ void board_init_acmp_pins(void)
429384
{
430385
init_acmp_pins();
431386
}
387+
388+
void board_init_acmp_clock(ACMP_Type *ptr)
389+
{
390+
(void)ptr;
391+
clock_add_to_group(BOARD_ACMP_CLK, BOARD_RUNNING_CORE & 0x1);
392+
}
393+
432394
uint32_t board_init_dac_clock(DAC_Type *ptr, bool clk_src_ahb)
433395
{
434396
uint32_t freq = 0;
@@ -442,7 +404,7 @@ uint32_t board_init_dac_clock(DAC_Type *ptr, bool clk_src_ahb)
442404
clock_set_dac_source(clock_dac0, clk_dac_src_ana2);
443405
clock_set_source_divider(clock_ana2, clk_src_pll0_clk1, 2);
444406
}
445-
407+
clock_add_to_group(clock_dac0, 0);
446408
freq = clock_get_frequency(clock_dac0);
447409
} else if (ptr == HPM_DAC1) {
448410
if (clk_src_ahb == true) {
@@ -453,7 +415,7 @@ uint32_t board_init_dac_clock(DAC_Type *ptr, bool clk_src_ahb)
453415
clock_set_dac_source(clock_dac1, clk_dac_src_ana3);
454416
clock_set_source_divider(clock_ana3, clk_src_pll0_clk1, 2);
455417
}
456-
418+
clock_add_to_group(clock_dac1, 0);
457419
freq = clock_get_frequency(clock_dac1);
458420
}
459421

@@ -529,19 +491,15 @@ uint32_t board_init_uart_clock(UART_Type *ptr)
529491
{
530492
uint32_t freq = 0U;
531493
if (ptr == HPM_UART0) {
532-
clock_set_source_divider(clock_uart0, clk_src_osc24m, 1);
533494
clock_add_to_group(clock_uart0, 0);
534495
freq = clock_get_frequency(clock_uart0);
535496
} else if (ptr == HPM_UART1) {
536-
clock_set_source_divider(clock_uart1, clk_src_osc24m, 1);
537497
clock_add_to_group(clock_uart1, 0);
538498
freq = clock_get_frequency(clock_uart1);
539499
} else if (ptr == HPM_UART2) {
540-
clock_set_source_divider(clock_uart2, clk_src_pll0_clk2, 8);
541500
clock_add_to_group(clock_uart2, 0);
542501
freq = clock_get_frequency(clock_uart2);
543502
} else if (ptr == HPM_UART3) {
544-
clock_set_source_divider(clock_uart3, clk_src_pll0_clk2, 8);
545503
clock_add_to_group(clock_uart3, 0);
546504
freq = clock_get_frequency(clock_uart3);
547505
}
@@ -572,36 +530,46 @@ void board_i2c_bus_clear(I2C_Type *ptr)
572530
printf("I2C bus is cleared\n");
573531
}
574532

533+
uint32_t board_init_i2c_clock(I2C_Type *ptr)
534+
{
535+
uint32_t freq = 0;
536+
537+
if (ptr == HPM_I2C0) {
538+
clock_add_to_group(clock_i2c0, 0);
539+
freq = clock_get_frequency(clock_i2c0);
540+
} else if (ptr == HPM_I2C1) {
541+
clock_add_to_group(clock_i2c1, 0);
542+
freq = clock_get_frequency(clock_i2c1);
543+
} else if (ptr == HPM_I2C2) {
544+
clock_add_to_group(clock_i2c2, 0);
545+
freq = clock_get_frequency(clock_i2c2);
546+
} else if (ptr == HPM_I2C3) {
547+
clock_add_to_group(clock_i2c3, 0);
548+
freq = clock_get_frequency(clock_i2c3);
549+
} else {
550+
;
551+
}
552+
553+
return freq;
554+
}
555+
575556
void board_init_i2c(I2C_Type *ptr)
576557
{
577558
i2c_config_t config;
578559
hpm_stat_t stat;
579560
uint32_t freq;
580-
if (ptr == NULL) {
581-
return;
582-
}
583-
584-
clock_add_to_group(clock_i2c0, 0);
585-
clock_add_to_group(clock_i2c1, 0);
586-
clock_add_to_group(clock_i2c2, 0);
587-
clock_add_to_group(clock_i2c3, 0);
588561

562+
freq = board_init_i2c_clock(ptr);
589563
init_i2c_pins(ptr);
590564
board_i2c_bus_clear(ptr);
591-
592-
/* Configure the I2C clock to 24MHz */
593-
clock_set_source_divider(BOARD_APP_I2C_CLK_NAME, clk_src_osc24m, 1U);
594-
595565
config.i2c_mode = i2c_mode_normal;
596566
config.is_10bit_addressing = false;
597-
freq = clock_get_frequency(BOARD_APP_I2C_CLK_NAME);
598567
stat = i2c_init_master(ptr, freq, &config);
599568
if (stat != status_success) {
600569
printf("failed to initialize i2c 0x%lx\n", (uint32_t) ptr);
601570
while (1) {
602571
}
603572
}
604-
605573
}
606574

607575
void board_init_adc_qeiv2_pins(void)

0 commit comments

Comments
 (0)