Skip to content

Commit

Permalink
RT-Thread BSP v1.4.1 for HPM6800EVK
Browse files Browse the repository at this point in the history
- Fixed i2c driver issue while enabling DMA
- Fixed template project issue

Signed-off-by: Fan YANG <[email protected]>
  • Loading branch information
helloeagleyang committed Feb 6, 2024
1 parent ef3b30c commit f19e8cc
Show file tree
Hide file tree
Showing 26 changed files with 96 additions and 60 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 1.4.1
- Fixed:
- Transmission error while enabling DMA in I2C driver
- Failed to create template project

## v1.4.0

- Integrated hpm_sdk v1.4.0
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog_zh.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 更新

## v1.4.1
- 修复:
- I2C开启DMA后传输出错的问题
- 默认模板工程创建出错的问题

## v1.4.0

- 整合了 hpm_sdk v1.4.0
Expand Down
29 changes: 21 additions & 8 deletions HPMicro-HPM6800EVK.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ board:
buy_url_global: http://www.hpmicro.com
debug_interface: JTAG
debugger: FT2232
description_en: The HPM6800EVK is a dual-core flashless MCU running 600Mhz. It has a 1MB continuous on-chip ram. Also, it provides various memory interfaces, including SDRAM, Quad SPI NOR Flash, SD/eMMC. It integrates rich audio and video interfaces, including LCD, pixel DMA, camera, and I2S audio interfaces.
description_zh: HPM6800EVK 是一款主频达600MHz的双核微控制器。该芯片拥有最大1M字节的连续片上RAM,并集成了丰富的存储接口,如SDRAM,Quad SPI NOR flash, SD/eMMC卡。同时它也提供多种音视频接口包括LCD显示,像素DMA,摄像头以及I2S音频接口。
description_en: The HPM6800EVK is a single-core flashless MCU running 600Mhz. It has a 1MB continuous on-chip ram. Also, it provides various memory interfaces, including DDR2/DDR3/DDR3L, Quad SPI NOR Flash, SD/eMMC. It integrates rich audio and video interfaces, including LCD, pixel DMA, camera, and I2S audio interfaces.
description_zh: HPM6800EVK 是一款主频达600MHz的单核微控制器。该芯片拥有最大1M字节的连续片上RAM,并集成了丰富的存储接口,如DDR2/DDR3/DDR3L,Quad SPI NOR flash, SD/eMMC卡。同时它也提供多种音视频接口包括LCD显示,像素DMA,摄像头以及I2S音频接口。
emulator_machine: ''
large_image: documents/images/board_6800evk_large.png
name: HPM6800EVK
Expand Down Expand Up @@ -39,8 +39,8 @@ features:
- 'MCU: HPM6880 MCU (600MHz, 1MB SRAM)'
- 'On-Board 256MB SDRAM, 16MB Quad SPI NOR Flash, 8GB eMMC'
- 'Buttons: 3, RESET, WBUTN, PBUTN'
- 'Debug Interface: 10-PIN JTAG interface'
- 'On-board one Ethernets: 1000M'
- 'Debug Interface: 20-PIN JTAG interface'
- 'On-board Ethernet: 1000Mbps PHY x1'
- 'USB: USB type C (USB 2.0 OTG) connector x1'
- 'Audio: Line in, Mic, Speaker, DAO'
- 'Others: TF slot, RGB LED, CANFD'
Expand All @@ -50,23 +50,36 @@ features_zh:
- 'LCD-RGB接口, MIPI-DSI, MIPI-CSI, 摄像头(DVP)接口'
- '板载 256MB SDRAM, 16MB Quad SPI NOR Flash, 8GB eMMC'
- '调试接口: 20-PIN JTAG接口'
- '板载一路以太网: 1000 Mbits PHY'
- '板载以太网: 1000Mbps PHY x1'
- 'USB: USB type C (USB 2.0 OTG) connector x1'
- '音频: Line in, Mic, Speaker, DAO'
- '其他: TF卡槽, RGB LED, CANFD'

pkg_type: Board_Support_Packages
pkg_vendor: HPMicro
pkg_version: 1.4.0
pkg_version: 1.4.1

template_projects:
- project_name:
- project_name: blink_led
project_description: create this project if user choose rt-thread project
project_type: rt-thread|@full|@5.0.2
builtin_files:
- source_path_offset: projects/
- source_path_offset: projects/blink_led
target_path_offset: ''
files_and_folders:
- .config
- .config.old
- .cproject
- .project
- .settings
- applications
- Kconfig
- README.md
- rtconfig.h
- rtconfig.py
- rtconfig_preinc.h
- SConscript
- SConstruct
- source_path_offset: 'common'
target_path_offset: ''
files_and_folders:
Expand Down
36 changes: 24 additions & 12 deletions board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -290,22 +290,34 @@ menu "On-chip Peripheral Drivers"
default n
endif

menuconfig BSP_USING_CAN
bool "Enable CAN"
menuconfig BSP_USING_MCAN
bool "Enable MCAN"
default n
select RT_USING_CAN if BSP_USING_CAN
if BSP_USING_CAN
config BSP_USING_CAN0
bool "Enable CAN0"
select RT_USING_CAN if BSP_USING_MCAN
if BSP_USING_MCAN
config BSP_USING_MCAN0
bool "Enable MCAN0"
default n
config BSP_USING_CAN1
bool "Enable CAN1"
config BSP_USING_MCAN1
bool "Enable MCAN1"
default n
config BSP_USING_CAN2
bool "Enable CAN2"
config BSP_USING_MCAN2
bool "Enable MCAN2"
default n
config BSP_USING_CAN3
bool "Enable CAN3"
config BSP_USING_MCAN3
bool "Enable MCAN3"
default n
config BSP_USING_MCAN4
bool "Enable MCAN4"
default n
config BSP_USING_MCAN5
bool "Enable MCAN5"
default n
config BSP_USING_MCAN6
bool "Enable MCAN6"
default n
config BSP_USING_MCAN7
bool "Enable MCAN7"
default n
endif

Expand Down
2 changes: 1 addition & 1 deletion board/debug_scripts/openocd/boards/hpm6800evk.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ proc init_dram {} {

$_TARGET0 configure -event reset-end {
init_clock
init_ddr3
# init_ddr3
}

$_TARGET0 configure -event reset-init {
Expand Down
1 change: 1 addition & 0 deletions common/libraries/drivers/drv_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ static rt_ssize_t hpm_i2c_master_transfer(struct rt_i2c_bus_device *bus, struct
break;
}
i2c_info->is_read = true;
i2c_enable_irq(i2c_info->base, I2C_EVENT_TRANSACTION_COMPLETE);
dmamux_config(HPM_DMAMUX, i2c_info->dma.channel, i2c_info->dmamux, true);
i2c_stat = i2c_rx_trigger_dma(i2c_info->dma.base, i2c_info->dma.channel, i2c_info->base,
core_local_mem_to_sys_address(0, (uint32_t) dummy_buf), transfer_len);
Expand Down
4 changes: 2 additions & 2 deletions projects/audio_i2s_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=audio_i2s_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/audio_pdm_dao_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=audio_pdm_dao_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/blink_led/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=blink_led
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/ethernet_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=ethernet_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/ethernet_ptp_master_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=ethernet_ptp_master_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/ethernet_ptp_slave_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=ethernet_ptp_slave_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/flashdb_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=flashdb_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/i2c_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=i2c_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
2 changes: 1 addition & 1 deletion projects/i2c_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

```console
RT-Thread shell commands:
eeprom_i2c - "eeprom_i2c 0x50/0x51"
eeprom_i2c - "eeprom_i2c 0x50"
reset - reset the board
clear - clear the terminal screen
version - show RT-Thread version information
Expand Down
4 changes: 2 additions & 2 deletions projects/i2c_demo/applications/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static int eeprom_i2c(int argc, char *argv[])
{
rt_strncpy(i2c_name, argv[2], RT_NAME_MAX);
} else {
rt_kprintf("Please use correct cmd format: eeprom_i2c 0x51/0x50\n");
rt_kprintf("Please use correct cmd format: eeprom_i2c 0x50\n");
return -1;
}

Expand Down Expand Up @@ -119,7 +119,7 @@ static int eeprom_i2c(int argc, char *argv[])
}
rt_kprintf("\n");
}
MSH_CMD_EXPORT(eeprom_i2c, "eeprom_i2c 0x50/0x51");
MSH_CMD_EXPORT(eeprom_i2c, "eeprom_i2c 0x50");

int main(void)
{
Expand Down
4 changes: 2 additions & 2 deletions projects/lv_demo_widgets/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=lv_demo_widgets
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/mcan_example/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=mcan_example
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/sdcard_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=sdcard_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/timer_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=timer_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/uart_dma_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=uart_dma_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/uart_dma_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

| 功能       | 引脚 | 位置   |
| ---------- | ---- | ------ |
| UART3.TXD | PE14 | P2[10] |
| UART3.RXD | PE15 | P2[8] |
| UART3.RXD | PE14 | P2[10] |
| UART3.TXD | PE15 | P2[8] |

### RT-Thread命令

Expand Down
4 changes: 2 additions & 2 deletions projects/usb_device_generic_hid/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=usb_device_generic_hid
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/usb_host_msc_udisk/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=usb_host_msc_udisk
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/web_camera_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=web_camera_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/webnet_demo/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=webnet_demo
is_base_example_project=True
board_name=hpm6800evk
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6800EVK/1.4.1
bsp_version=1.4.1

0 comments on commit f19e8cc

Please sign in to comment.