Skip to content

Commit

Permalink
hpm sdk release v1.8.0
Browse files Browse the repository at this point in the history
[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 <jianghao.qian@hpmicro.com>
  • Loading branch information
jhqian committed Dec 30, 2024
1 parent 276af93 commit f0393c9
Show file tree
Hide file tree
Showing 2,649 changed files with 255,677 additions and 37,840 deletions.
345 changes: 343 additions & 2 deletions CHANGELOG.md

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_LIB_ITF})
add_library(${HPM_SDK_GCC_LIB} STATIC "")
target_link_libraries(${HPM_SDK_GCC_LIB} PUBLIC ${HPM_SDK_GCC_LIB_ITF} ${HPM_SDK_LIB_ITF})

add_library(${HPM_SDK_GCC_STARTUP_LIB} STATIC "")
target_link_libraries(${HPM_SDK_GCC_STARTUP_LIB} PUBLIC ${HPM_SDK_GCC_LIB_ITF} ${HPM_SDK_LIB_ITF})

target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_GCC_LIB_ITF})
if("${TOOLCHAIN_VARIANT}" STREQUAL "nds-gcc")
target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_NDSGCC_LIB_ITF})
elseif("${TOOLCHAIN_VARIANT}" STREQUAL "zcc")
target_link_libraries(${HPM_SDK_LIB} PUBLIC ${HPM_SDK_ZCC_LIB_ITF})
target_link_libraries(${HPM_SDK_GCC_LIB} PUBLIC ${HPM_SDK_ZCC_LIB_ITF})
target_link_libraries(${HPM_SDK_GCC_STARTUP_LIB} PUBLIC ${HPM_SDK_ZCC_LIB_ITF})
endif()

if(flash_size)
Expand Down Expand Up @@ -116,7 +120,7 @@ endif()

if(DEFINED CUSTOM_GCC_STARTUP_FILE)
set(USE_CUSTOM_STARTUP 1)
sdk_gcc_src(${CUSTOM_GCC_STARTUP_FILE})
sdk_gcc_startup_src(${CUSTOM_GCC_STARTUP_FILE})
endif()

if(DEFINED CUSTOM_SES_STARTUP_FILE)
Expand All @@ -129,8 +133,6 @@ if(DEFINED CUSTOM_IAR_STARTUP_FILE)
sdk_iar_src(${CUSTOM_IAR_STARTUP_FILE})
endif()

sdk_sys_inc(${SYSROOT_DIR}/include)

# parse module list file provided in soc folder, it will decide which modules to be enabled under drivers folder
import_soc_modules(soc/${HPM_SOC_SERIES}/${HPM_SOC}/soc_modules.list)

Expand Down Expand Up @@ -208,6 +210,7 @@ if("${TOOLCHAIN_VARIANT}" STREQUAL "nds-gcc")
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
${HPM_SDK_WHOLE_ARCHIVE_OPT}
${HPM_SDK_NDSGCC_LIB_ITF}
${HPM_SDK_GCC_STARTUP_LIB}
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
"-Wl,--no-whole-archive")
Expand All @@ -217,13 +220,15 @@ elseif("${TOOLCHAIN_VARIANT}" STREQUAL "zcc")
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
${HPM_SDK_WHOLE_ARCHIVE_OPT}
${HPM_SDK_ZCC_LIB_ITF}
${HPM_SDK_GCC_STARTUP_LIB}
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
"-Wl,--no-whole-archive")
else()
target_link_libraries(${APP_ELF_NAME}
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
${HPM_SDK_WHOLE_ARCHIVE_OPT}
${HPM_SDK_GCC_STARTUP_LIB}
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
"-Wl,--no-whole-archive")
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ gantt
title HPM SDK Release Plan
dateFormat YYYY-MM-DD
section Mainline Release
v1.5.0 :a1, 2024-01-01, 2024-03-31
v1.6.0 :a2, 2024-04-01, 2024-06-30
v1.7.0 :a3, 2024-07-01, 2024-09-30
v1.8.0 :a4, 2024-10-01, 2024-12-31
v1.8.0 :a1, 2024-10-01, 2024-12-31
v1.9.0 :a2, 2025-01-01, 2025-03-31
v1.10.0 :a3, 2025-04-01, 2025-06-30
v1.11.0 :a4, 2025-07-01, 2025-09-30
v1.12.0 :a5, 2025-10-01, 2025-12-31
```

[中文](README_zh.md)
Expand Down
9 changes: 5 additions & 4 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ gantt
title HPM SDK Release Plan
dateFormat YYYY-MM-DD
section Mainline Release
v1.5.0 :a1, 2024-01-01, 2024-03-31
v1.6.0 :a2, 2024-04-01, 2024-06-30
v1.7.0 :a3, 2024-07-01, 2024-09-30
v1.8.0 :a4, 2024-10-01, 2024-12-31
v1.8.0 :a1, 2024-10-01, 2024-12-31
v1.9.0 :a2, 2025-01-01, 2025-03-31
v1.10.0 :a3, 2025-04-01, 2025-06-30
v1.11.0 :a4, 2025-07-01, 2025-09-30
v1.12.0 :a5, 2025-10-01, 2025-12-31
```

[English](README.md)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_MAJOR = 1
VERSION_MINOR = 7
VERSION_MINOR = 8
PATCHLEVEL = 0
VERSION_TWEAK = 0
EXTRAVERSION = 0
11 changes: 9 additions & 2 deletions boards/hpm5300evk/README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,18 @@ The HPM5300EVK provides a series of interfaces for the characteristic peripheral
| PWM0.P2 | J7[11] |
| PWM0.P3 | J7[12] |

- PLB Output Pin:
- PLB Pulse Output Pin:

| Function | Position |
| -------- | -------- |
| PLB.OUT | P1[24] |
| PLB.PLUSE_OUT | P1[24] |

- PLB Filter Output Pin

| Function | Position |
| ------- | ------ |
| PLB.FILTER_IN | J7[9] |
| PLB.FILTER_OUT | J7[11] |

- CAN Pin:

Expand Down
12 changes: 10 additions & 2 deletions boards/hpm5300evk/README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,19 @@ HPM5300EVK提供了一系列HPM5300系列微控制器特色外设的接口,包
| CAN_L | J9[1] |
| CAN_H | J9[3] |

- PLB输出引脚
- PLB Pusle输出引脚

| 功能 | 位置 |
| ------- | ------ |
| PLB.OUT | P1[24] |
| PLB.PULSE_OUT | P1[24] |


- PLB Filter输出引脚

| 功能 | 位置 |
| ------- | ------ |
| PLB.FILTER_IN | J7[9] |
| PLB.FILTER_OUT | J7[11] |

- OPAMP引脚

Expand Down
130 changes: 49 additions & 81 deletions boards/hpm5300evk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ void board_init_console(void)
*/
init_uart_pins((UART_Type *) BOARD_CONSOLE_UART_BASE);

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

cfg.type = BOARD_CONSOLE_TYPE;
Expand Down Expand Up @@ -176,7 +174,7 @@ void board_init_usb_dp_dm_pins(void)
} else {
uint8_t tmp;
tmp = sysctl_resource_target_get_mode(HPM_SYSCTL, sysctl_resource_xtal);
sysctl_resource_target_set_mode(HPM_SYSCTL, sysctl_resource_xtal, 0x03);
sysctl_resource_target_set_mode(HPM_SYSCTL, sysctl_resource_xtal, 0x03); /* NOLINT */
clock_add_to_group(clock_usb0, 0);
usb_phy_disable_dp_dm_pulldown(HPM_USB0);
clock_remove_from_group(clock_usb0, 0);
Expand Down Expand Up @@ -205,52 +203,11 @@ void board_init_clock(void)
clock_add_to_group(clock_lmm0, 0);
clock_add_to_group(clock_mchtmr0, 0);
clock_add_to_group(clock_rom, 0);
clock_add_to_group(clock_can0, 0);
clock_add_to_group(clock_can1, 0);
clock_add_to_group(clock_can2, 0);
clock_add_to_group(clock_can3, 0);
clock_add_to_group(clock_ptpc, 0);
clock_add_to_group(clock_gptmr0, 0);
clock_add_to_group(clock_gptmr1, 0);
clock_add_to_group(clock_gptmr2, 0);
clock_add_to_group(clock_gptmr3, 0);
clock_add_to_group(clock_i2c0, 0);
clock_add_to_group(clock_i2c1, 0);
clock_add_to_group(clock_i2c2, 0);
clock_add_to_group(clock_i2c3, 0);
clock_add_to_group(clock_spi0, 0);
clock_add_to_group(clock_spi1, 0);
clock_add_to_group(clock_spi2, 0);
clock_add_to_group(clock_spi3, 0);
clock_add_to_group(clock_uart0, 0);
clock_add_to_group(clock_uart1, 0);
clock_add_to_group(clock_uart2, 0);
clock_add_to_group(clock_uart3, 0);
clock_add_to_group(clock_uart4, 0);
clock_add_to_group(clock_uart5, 0);
clock_add_to_group(clock_uart6, 0);
/* group0[1] */
clock_add_to_group(clock_uart7, 0);
clock_add_to_group(clock_watchdog0, 0);
clock_add_to_group(clock_watchdog1, 0);
clock_add_to_group(clock_mbx0, 0);
clock_add_to_group(clock_tsns, 0);
clock_add_to_group(clock_crc0, 0);
clock_add_to_group(clock_adc0, 0);
clock_add_to_group(clock_adc1, 0);
clock_add_to_group(clock_dac0, 0);
clock_add_to_group(clock_dac1, 0);
clock_add_to_group(clock_acmp, 0);
clock_add_to_group(clock_opa0, 0);
clock_add_to_group(clock_opa1, 0);
clock_add_to_group(clock_mot0, 0);
clock_add_to_group(clock_rng, 0);
clock_add_to_group(clock_sdp, 0);
clock_add_to_group(clock_kman, 0);
clock_add_to_group(clock_gpio, 0);
clock_add_to_group(clock_hdma, 0);
clock_add_to_group(clock_xpi0, 0);
clock_add_to_group(clock_usb0, 0);
clock_add_to_group(clock_ptpc, 0);

/* Connect Group0 to CPU0 */
clock_connect_group_to_cpu(0, 0);
Expand Down Expand Up @@ -283,14 +240,14 @@ void board_delay_ms(uint32_t ms)
clock_cpu_delay_ms(ms);
}

SDK_DECLARE_EXT_ISR_M(BOARD_CALLBACK_TIMER_IRQ, board_timer_isr)
void board_timer_isr(void)
{
if (gptmr_check_status(BOARD_CALLBACK_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_CALLBACK_TIMER_CH))) {
gptmr_clear_status(BOARD_CALLBACK_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_CALLBACK_TIMER_CH));
timer_cb();
}
}
SDK_DECLARE_EXT_ISR_M(BOARD_CALLBACK_TIMER_IRQ, board_timer_isr);

void board_timer_create(uint32_t ms, board_timer_cb cb)
{
Expand Down Expand Up @@ -323,15 +280,19 @@ void board_init_led_pins(void)
gpio_set_pin_output_with_initial(BOARD_LED_GPIO_CTRL, BOARD_LED_GPIO_INDEX, BOARD_LED_GPIO_PIN, board_get_led_gpio_off_level());
}

void board_init_usb_pins(void)
void board_init_usb(USB_Type *ptr)
{
init_usb_pins();
usb_hcd_set_power_ctrl_polarity(BOARD_USB, true);
/* Wait USB_PWR pin control vbus power stable. Time depend on decoupling capacitor, you can decrease or increase this time */
board_delay_ms(100);
if (ptr == HPM_USB0) {
init_usb_pins(ptr);
clock_add_to_group(clock_usb0, 0);

usb_hcd_set_power_ctrl_polarity(ptr, true);
/* Wait USB_PWR pin control vbus power stable. Time depend on decoupling capacitor, you can decrease or increase this time */
board_delay_ms(100);

/* As QFN48 and LQFP64 has no vbus pin, so should be call usb_phy_using_internal_vbus() API to use internal vbus. */
/* usb_phy_using_internal_vbus(BOARD_USB); */
/* As QFN48 and LQFP64 has no vbus pin, so should be call usb_phy_using_internal_vbus() API to use internal vbus. */
/* usb_phy_using_internal_vbus(ptr); */
}
}

void board_led_write(uint8_t state)
Expand Down Expand Up @@ -383,12 +344,6 @@ void board_init_spi_pins_with_gpio_as_cs(SPI_Type *ptr)
GPIO_GET_PIN_INDEX(BOARD_SPI_CS_PIN), !BOARD_SPI_CS_ACTIVE_LEVEL);
}

void board_usb_vbus_ctrl(uint8_t usb_index, uint8_t level)
{
(void) usb_index;
(void) level;
}

uint32_t board_init_adc_clock(void *ptr, bool clk_src_bus)
{
uint32_t freq = 0;
Expand All @@ -402,7 +357,7 @@ uint32_t board_init_adc_clock(void *ptr, bool clk_src_bus)
clock_set_adc_source(clock_adc0, clk_adc_src_ana0);
clock_set_source_divider(clock_ana0, clk_src_pll0_clk2, 2U);
}

clock_add_to_group(clock_adc0, 0);
freq = clock_get_frequency(clock_adc0);
} else if (ptr == (void *)HPM_ADC1) {
if (clk_src_bus) {
Expand All @@ -413,7 +368,7 @@ uint32_t board_init_adc_clock(void *ptr, bool clk_src_bus)
clock_set_adc_source(clock_adc1, clk_adc_src_ana1);
clock_set_source_divider(clock_ana1, clk_src_pll0_clk2, 2U);
}

clock_add_to_group(clock_adc1, 0);
freq = clock_get_frequency(clock_adc1);
}

Expand All @@ -429,6 +384,13 @@ void board_init_acmp_pins(void)
{
init_acmp_pins();
}

void board_init_acmp_clock(ACMP_Type *ptr)
{
(void)ptr;
clock_add_to_group(BOARD_ACMP_CLK, BOARD_RUNNING_CORE & 0x1);
}

uint32_t board_init_dac_clock(DAC_Type *ptr, bool clk_src_ahb)
{
uint32_t freq = 0;
Expand All @@ -442,7 +404,7 @@ uint32_t board_init_dac_clock(DAC_Type *ptr, bool clk_src_ahb)
clock_set_dac_source(clock_dac0, clk_dac_src_ana2);
clock_set_source_divider(clock_ana2, clk_src_pll0_clk1, 2);
}

clock_add_to_group(clock_dac0, 0);
freq = clock_get_frequency(clock_dac0);
} else if (ptr == HPM_DAC1) {
if (clk_src_ahb == true) {
Expand All @@ -453,7 +415,7 @@ uint32_t board_init_dac_clock(DAC_Type *ptr, bool clk_src_ahb)
clock_set_dac_source(clock_dac1, clk_dac_src_ana3);
clock_set_source_divider(clock_ana3, clk_src_pll0_clk1, 2);
}

clock_add_to_group(clock_dac1, 0);
freq = clock_get_frequency(clock_dac1);
}

Expand Down Expand Up @@ -529,19 +491,15 @@ uint32_t board_init_uart_clock(UART_Type *ptr)
{
uint32_t freq = 0U;
if (ptr == HPM_UART0) {
clock_set_source_divider(clock_uart0, clk_src_osc24m, 1);
clock_add_to_group(clock_uart0, 0);
freq = clock_get_frequency(clock_uart0);
} else if (ptr == HPM_UART1) {
clock_set_source_divider(clock_uart1, clk_src_osc24m, 1);
clock_add_to_group(clock_uart1, 0);
freq = clock_get_frequency(clock_uart1);
} else if (ptr == HPM_UART2) {
clock_set_source_divider(clock_uart2, clk_src_pll0_clk2, 8);
clock_add_to_group(clock_uart2, 0);
freq = clock_get_frequency(clock_uart2);
} else if (ptr == HPM_UART3) {
clock_set_source_divider(clock_uart3, clk_src_pll0_clk2, 8);
clock_add_to_group(clock_uart3, 0);
freq = clock_get_frequency(clock_uart3);
}
Expand Down Expand Up @@ -572,36 +530,46 @@ void board_i2c_bus_clear(I2C_Type *ptr)
printf("I2C bus is cleared\n");
}

uint32_t board_init_i2c_clock(I2C_Type *ptr)
{
uint32_t freq = 0;

if (ptr == HPM_I2C0) {
clock_add_to_group(clock_i2c0, 0);
freq = clock_get_frequency(clock_i2c0);
} else if (ptr == HPM_I2C1) {
clock_add_to_group(clock_i2c1, 0);
freq = clock_get_frequency(clock_i2c1);
} else if (ptr == HPM_I2C2) {
clock_add_to_group(clock_i2c2, 0);
freq = clock_get_frequency(clock_i2c2);
} else if (ptr == HPM_I2C3) {
clock_add_to_group(clock_i2c3, 0);
freq = clock_get_frequency(clock_i2c3);
} else {
;
}

return freq;
}

void board_init_i2c(I2C_Type *ptr)
{
i2c_config_t config;
hpm_stat_t stat;
uint32_t freq;
if (ptr == NULL) {
return;
}

clock_add_to_group(clock_i2c0, 0);
clock_add_to_group(clock_i2c1, 0);
clock_add_to_group(clock_i2c2, 0);
clock_add_to_group(clock_i2c3, 0);

freq = board_init_i2c_clock(ptr);
init_i2c_pins(ptr);
board_i2c_bus_clear(ptr);

/* Configure the I2C clock to 24MHz */
clock_set_source_divider(BOARD_APP_I2C_CLK_NAME, clk_src_osc24m, 1U);

config.i2c_mode = i2c_mode_normal;
config.is_10bit_addressing = false;
freq = clock_get_frequency(BOARD_APP_I2C_CLK_NAME);
stat = i2c_init_master(ptr, freq, &config);
if (stat != status_success) {
printf("failed to initialize i2c 0x%lx\n", (uint32_t) ptr);
while (1) {
}
}

}

void board_init_adc_qeiv2_pins(void)
Expand Down
Loading

0 comments on commit f0393c9

Please sign in to comment.