Files
萌新源 005d291492 [bsp/Infineon] Fix PWM macro mismatches left by the CHx_PORTy rename (#11802)
* [bsp/Infineon] Fix PWM macro mismatches left by the CHx_PORTy rename

Commit e5382cb733 renamed the PWM table guards in drv_pwm.c to the
CHx_PORTy convention but only adapted the psoc6-evk Kconfig, leaving
several mismatches behind:

- The psoc6-evaluationkit-062S2 slider sample still tested the old
  flat name BSP_USING_PWM0_PORT0 while the board Kconfig defines
  BSP_USING_PWM0_CH0_PORT0, so the PWM init was compiled out.
- The PORT13 entry was renamed to BSP_USING_PWM0_CH7_PORT13, a macro
  that no Kconfig defines, and the channel is wrong anyway:
  PWM0_CH3_PORT13_CONFIG carries .channel = 3, PORT13 sits under the
  PWM0 CH3 menu, and the slider demo selects CH3 + PORT13.
- The PSOC62 template and five psoc6 boards (cy8ckit-062-BLE,
  cy8ckit-062-WIFI-BT, cy8ckit-062S2-43012, cy8ckit-062s4,
  cy8cproto-062S3-4343W) still define the old flat names.

Fix all of them by migrating the evaluationkit sample to
BSP_USING_PWM0_CH0_PORT0 and renaming the PORT13 group to
BSP_USING_PWM0_CH3_PORT13 across drv_pwm.c, the PSOC62 template and
the five boards' Kconfigs/slider samples, so Kconfig, driver table
and samples match again.

Note: the sibling guards BSP_USING_PWM0_CH7_PORT2/5/7/9/10/12 are
still not generated by these boards' Kconfigs; left untouched for a
separate discussion.

* style: format code with clang-format [skip ci]
2026-09-21 15:44:01 +08:00
..
…
…
…
…
…
…

Infineon Psoc6-cy8cproto-062S3-4343W 说明

简介

本文档为 RT-Thread 为 Psoc6-cy8cproto-062S3-4343W开发板提供的 BSP (板级支持包) 说明。

主要内容如下:

  • 开发板资源介绍
  • BSP 快速上手
  • 进阶使用方法

通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。

开发板介绍

Psoc6-cy8cproto-062S3-4343W 是英飞凌推出的一款32位双核CPU子系统( ARM Cortex-M4 和 ARM Cortex-M0)的开发板,具有单周期乘法的150-MHz Arm Cortex-M4F CPU (浮点和存储器保护单元),100-MHz Cortex M0+ CPU,带单周期乘法和MPU,可以充分发挥 PSoC6 双核芯片性能。

开发板外观详细信息:CY8CPROTO-062S3-4343W - Infineon Technologies

该开发板核心 板载资源 如下:

外设支持

本 BSP 目前对外设的支持情况如下:

片上外设 支持情况 备注
USB 转串口 支持 UART5
GPIO 支持 —
UART 支持 UART0-5

快速上手

本 BSP 是以 MDK V5 和 RT-Thread Studio 为开发环境(编译器:ARMClang / GCC),接下来介绍如何将系统运行起来。

使用 MDK V5 开发

硬件连接

使用数据线连接开发板到 PC。

编译下载

1、下载软件包:在ENV环境下输入pkgs --update命令,将所需要的HAL库软件包下载下来,文件会存放在Packages目录下。

2、生成MDK工程:在ENV环境下输入SCons --target==MDK5命令,ENV会自动生成MDK5工程

3、配置工程:

首先打开 MDK ,若没有安装 Infineon-PSoC6 的芯片支持包会提示在线安装,根据提示安装即可。若受网络问题,可以进入 keil 官网下载安装包,离线安装。

mdk_package

4、 编译此工程:在安装好芯片支持包后,在 MDK工程中进行编译。

5、下载此工程:

工程默认配置使用板载 DAP-LINK 使用 SWD 方式下载程序,使用数据线连接开发板,编译之后直接点击下载按钮即可。

使用 RT-Thread Studio 开发

导入工程

  • 首先打开 RT-Thread Studio 开发工具,点加左上角文件—>导入—> RT-Thread Studio项目到工作空间中。

  • 接着选择 psoc6-cy8cproto-062S3-4343W 开发板支持包的目录,进行导入。

编译下载

  • 点击 IDE 左上角的构建选项进行工程的编译。

  • 当编译无错误警告时,点击 Debug 或 Download 选项进行调试/下载。

    注:若点击下载并下载成功后串口终端无显示信息,请手动按下复位按键进行重启运行。

运行结果

下载程序成功之后,系统会自动运行。打开终端工具串口助手,选择波特率为 115200。复位设备后,LED 将会以 500HZ 的频率闪烁,而且在终端上可以看到 RT-Thread 的输出信息:

注:推荐使用串口调试助手如:MobaXterm

 \ | /
- RT -     Thread Operating System
 / | \     4.1.1 build Jul 25 2022 18:03:35
 2006 - 2022 Copyright by RT-Thread team
msh >

联系人

维护人: