Skip to content

Commit

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

Signed-off-by: Fan YANG <[email protected]>
  • Loading branch information
helloeagleyang committed Feb 6, 2024
1 parent 46c4290 commit 9d4b2f8
Show file tree
Hide file tree
Showing 23 changed files with 94 additions and 70 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
19 changes: 16 additions & 3 deletions HPMicro-HPM6750EVK2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,29 @@ features_zh:

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
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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.1
bsp_version=1.4.1
4 changes: 2 additions & 2 deletions projects/can_example/.settings/projcfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ project_name=can_example
is_base_example_project=True
board_name=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.1
bsp_version=1.4.1
62 changes: 31 additions & 31 deletions projects/i2c_demo/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# 简介

本例程演示基于RT-Thread I2C驱动框架对板载EEPROM器件进行读写。

## 支持的命令

```console
RT-Thread shell commands:
eeprom_i2c - "eeprom_i2c 0x50/0x51"
reset - reset the board
clear - clear the terminal screen
version - show RT-Thread version information
list - list objects
help - RT-Thread shell help.
ps - List threads in the system.
free - Show the memory usage in the system.
pin - pin [option]
date - get date and time or set (local timezone) [year month day hour min sec]
```

## 运行现象
使用`eeprom_i2c 0x50`命令, '0x50'是EEPROM的器件地址
```console
msh >eeprom_i2c 0x50
eeprom device address: 0x50
eeprom write and read succes
write 8 bytes from address 0x00:
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
read 8 bytes from address 0x00:
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
```
# 简介

本例程演示基于RT-Thread I2C驱动框架对板载EEPROM器件进行读写。

## 支持的命令

```console
RT-Thread shell commands:
eeprom_i2c - "eeprom_i2c 0x50"
reset - reset the board
clear - clear the terminal screen
version - show RT-Thread version information
list - list objects
help - RT-Thread shell help.
ps - List threads in the system.
free - Show the memory usage in the system.
pin - pin [option]
date - get date and time or set (local timezone) [year month day hour min sec]
```

## 运行现象
使用`eeprom_i2c 0x50`命令, '0x50'是EEPROM的器件地址
```console
msh >eeprom_i2c 0x50
eeprom device address: 0x50
eeprom write and read succes
write 8 bytes from address 0x00:
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
read 8 bytes from address 0x00:
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
```
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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.1
bsp_version=1.4.1
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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/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=hpm6750evk2
device_vendor=HPMicro
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.0
bsp_version=1.4.0
bsp_path=repo/Extract/Board_Support_Packages/HPMicro/HPMicro-HPM6750EVK2/1.4.1
bsp_version=1.4.1

0 comments on commit 9d4b2f8

Please sign in to comment.