Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[BSP] xmc7100外设适配和RTDuino适配 #10824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hydevcode wants to merge 1 commit into RT-Thread:master
base: master
Choose a base branch
Loading
from hydevcode:xmc7100

Conversation

Copy link
Contributor

@hydevcode hydevcode commented Oct 16, 2025

拉取/合并请求描述:(PR description)

[

为什么提交这份PR (why to submit this PR)

适配XMC7100的I2C和SPI,以及RTDuino,RW007,修复GPIO中断问题

你的解决方案是什么 (what is your solution)

请提供验证的bsp和config (provide the config and bsp)

  • BSP:xmc7100d-f144k4160aa
  • .config:
  • action:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

Copy link

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  • 将目标分支设置为 \ Set the target branch to:xmc7100
  • 设置PR number为 \ Set the PR number to:10824
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将自动推送至你的分支。
    The formatted code will be automatically pushed to your branch.

完成后,提交将自动更新至 xmc7100 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the xmc7100 branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

@Rbb666 Rbb666 requested a review from Copilot October 17, 2025 13:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adapts the XMC7100 BSP to support I2C and SPI peripherals, integrates RTduino (Arduino compatibility layer), adds RW007 Wi-Fi support, and fixes GPIO interrupt handling. It also updates configuration defaults (system workqueue, serial ring buffer) and adds Arduino pinout files and example.

  • Add RTduino support and Arduino pin mapping with example sketch
  • Integrate RW007 Wi-Fi over SPI and adjust SPI bus/pin mappings for XMC7100
  • Fix and extend GPIO interrupt mappings; enable system workqueue and enlarge serial RX buffer

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
bsp/Infineon/xmc7100d-f144k4160aa/rtconfig.h Enable system workqueue, enlarge serial RB, enable I2C/SPI; adjust RT_NAME_MAX; toggle UART2
bsp/Infineon/xmc7100d-f144k4160aa/board/ports/spi_flash_init.c Attach SPI device to spi0 when RW007 enabled; select CS pin accordingly
bsp/Infineon/xmc7100d-f144k4160aa/board/ports/drv_rw007.c Add RW007 Wi-Fi initialization, GPIO init, and IRQ hook
bsp/Infineon/xmc7100d-f144k4160aa/board/ports/SConscript Build RW007 driver conditionally
bsp/Infineon/xmc7100d-f144k4160aa/board/Kconfig Add RTduino and RW007 menus and options; add I2C2 and SPI0 toggles
bsp/Infineon/xmc7100d-f144k4160aa/applications/arduino_pinout/pins_arduino.h Define Arduino digital pin macros, default I2C/SPI bus names
bsp/Infineon/xmc7100d-f144k4160aa/applications/arduino_pinout/pins_arduino.c Map Arduino pins to RT-Thread pins and devices
bsp/Infineon/xmc7100d-f144k4160aa/applications/arduino_pinout/SConscript Add RTduino pinout sources to build when RTduino enabled
bsp/Infineon/xmc7100d-f144k4160aa/applications/arduino_pinout/README.md Add Arduino compatibility README (needs board-specific content)
bsp/Infineon/xmc7100d-f144k4160aa/applications/arduino_main.cpp Add simple RTduino sketch using Serial
bsp/Infineon/xmc7100d-f144k4160aa/applications/SConscript Auto-add Arduino example when RTduino is enabled
bsp/Infineon/xmc7100d-f144k4160aa/README.md Update supported peripherals and usage instructions
bsp/Infineon/xmc7100d-f144k4160aa/.config Sync with new config options (workqueue, SPI/I2C, etc.)
bsp/Infineon/libraries/HAL_Drivers/drv_spi.c Add XMC7100-specific SPI0 pin mapping
bsp/Infineon/libraries/HAL_Drivers/drv_gpio.c Add XMC7100 GPIO IRQ map and adjust IRQ enable path

Comment on lines +83 to +84
{CYHAL_PORT_22, ioss_interrupts_gpio_23_IRQn},
{CYHAL_PORT_24, ioss_interrupts_gpio_24_IRQn},
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: CYHAL_PORT_22 is mapped to ioss_interrupts_gpio_23_IRQn, which is off-by-one. This will route interrupts for port 22 to the wrong IRQ and break GPIO IRQs on that port. Map 22->22, and also add a mapping entry for CYHAL_PORT_23 if required on this SoC. Example fix: {CYHAL_PORT_22, ioss_interrupts_gpio_22_IRQn} and insert {CYHAL_PORT_23, ioss_interrupts_gpio_23_IRQn} before line 84. 中文:CYHAL_PORT_22 被映射到 ioss_interrupts_gpio_23_IRQn(偏移一位),这会导致 22 号端口的中断被路由到错误的中断号,导致该端口的 GPIO 中断异常。应改为 22->22,并补充 CYHAL_PORT_23 的映射。例如修复:{CYHAL_PORT_22, ioss_interrupts_gpio_22_IRQn},并在第84行前插入 {CYHAL_PORT_23, ioss_interrupts_gpio_23_IRQn}。

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hydevcode 关注下,看起来确实写错了

void spi_wifi_hw_init(void)
{
rt_pin_attach_irq(IFX_RW007_INT_BUSY_PIN, PIN_IRQ_MODE_FALLING, int_wifi_irq, 0);
rt_pin_irq_enable(IFX_RW007_INT_BUSY_PIN, RT_TRUE);
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: rt_pin_irq_enable expects PIN_IRQ_ENABLE/PIN_IRQ_DISABLE, not a boolean. Using RT_TRUE will not match the driver's switch-case and likely fails to enable the IRQ. Replace RT_TRUE with PIN_IRQ_ENABLE. 中文:rt_pin_irq_enable 需要传入 PIN_IRQ_ENABLE/PIN_IRQ_DISABLE,而不是布尔值。使用 RT_TRUE 可能导致驱动中的 switch-case 不匹配,从而无法真正使能中断。请将 RT_TRUE 替换为 PIN_IRQ_ENABLE。

Suggested change
rt_pin_irq_enable(IFX_RW007_INT_BUSY_PIN, RT_TRUE);
rt_pin_irq_enable(IFX_RW007_INT_BUSY_PIN, PIN_IRQ_ENABLE);

Copilot uses AI. Check for mistakes.

rt_pin_mode(IFX_RW007_INT_BUSY_PIN, PIN_MODE_INPUT_PULLUP);
}

static struct rt_spi_device rw007_dev;
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: rw007_dev is defined but never used in this file, which adds confusion and maintenance overhead. Remove this unused variable. 中文:rw007_dev 在该文件中未被使用,会增加困惑和维护成本。建议删除该未使用的变量。

Suggested change
static struct rt_spi_device rw007_dev;

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

select PKG_USING_RTDUINO
select BSP_USING_UART2
select BSP_USING_GPIO
select BSP_USING_HW_I2C
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: The symbol BSP_USING_HW_I2C is not defined in this Kconfig; the existing symbol appears to be BSP_USING_I2C. Selecting a non-existent symbol has no effect and may confuse users. Replace with select BSP_USING_I2C. 中文:Kconfig 中未定义 BSP_USING_HW_I2C,现有符号应为 BSP_USING_I2C。选择一个不存在的符号不会生效且会误导用户。请改为 select BSP_USING_I2C。

Suggested change
select BSP_USING_HW_I2C
select BSP_USING_I2C

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

src = Glob('*.c') + Glob('*.cpp')
inc = [cwd]

print(cwd)
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: Avoid printing from SConscript during normal builds; it clutters the build log and CI output. Remove this line or guard it behind a verbose/debug flag. 中文:请避免在正常构建时从 SConscript 打印信息,这会污染构建和 CI 日志。建议删除该行或加调试开关控制。

Suggested change
print(cwd)

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +15 to +18
#define D00 (0)
#define D01 (1)
#define D2 (2)
#define D3 (3)
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: Pin macro names are inconsistent with Arduino conventions (D0/D1 vs D00/D01), which can confuse users and libraries. Define D0 and D1 (and keep D00/D01 as aliases if needed) for consistency. Example: #define D0 0; #define D1 1; #define D00 D0; #define D01 D1. 中文:引脚宏命名与 Arduino 约定不一致(D0/D1 被命名为 D00/D01),容易误导用户与库。为保持一致性请定义 D0、D1(可保留 D00/D01 作为别名)。示例:#define D0 0; #define D1 1; #define D00 D0; #define D01 D1。

Copilot generated this review using guidance from repository custom instructions.

Comment on lines +24 to +25
{D00, GET_PIN(19, 0), "uart2"}, /* Serial6-RX */
{D01, GET_PIN(19, 1), "uart2"}, /* Serial6-TX */
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: The comments reference 'Serial6' while the device string is 'uart2'; this is misleading for Arduino users (where default is Serial, or explicitly Serial2). Update comments to reflect the actual UART (e.g., 'Serial2-RX/TX' or 'Serial-RX/TX' per your default). 中文:注释写的是 'Serial6',但设备名为 'uart2',对 Arduino 用户有误导(通常为 Serial 或显式 Serial2)。请将注释改为与实际 UART 一致(如 'Serial2-RX/TX' 或根据默认设置改为 'Serial-RX/TX')。

Suggested change
{D00, GET_PIN(19, 0), "uart2"}, /* Serial6-RX */
{D01, GET_PIN(19, 1), "uart2"}, /* Serial6-TX */
{D00, GET_PIN(19, 0), "uart2"}, /* Serial2-RX */
{D01, GET_PIN(19, 1), "uart2"}, /* Serial2-TX */

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +21 to +43
| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
| ------------------- | --------- | ---- | ------------------------------------------------------------------------- |
| 0 (D0) | BSP_IO_PORT_06_PIN_04 || Serial-RX,默认被RT-Thread的UART设备框架uart6接管 |
| 1 (D1) | BSP_IO_PORT_06_PIN_05 || Serial-TX,默认被RT-Thread的UART设备框架uart6接管 |
| 2 (D2) | BSP_IO_PORT_05_PIN_00 || |
| 3 (D3) | BSP_IO_PORT_05_PIN_01 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 4 (D4) | BSP_IO_PORT_11_PIN_02 || |
| 5 (D5) | BSP_IO_PORT_11_PIN_03 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 6 (D6) | BSP_IO_PORT_11_PIN_04 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 7 (D7) | BSP_IO_PORT_11_PIN_05 || |
| 8 (D8) | BSP_IO_PORT_11_PIN_06 || |
| 9 (D9) | BSP_IO_PORT_05_PIN_07 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 10 (D10) | BSP_IO_PORT_00_PIN_05 || |
| 11 (D11) | BSP_IO_PORT_00_PIN_02 || SPI0-MOSI,默认被RT-Thread的SPI设备框架spi0接管 |
| 12 (D12) | BSP_IO_PORT_00_PIN_03 || SPI0-MISO,默认被RT-Thread的SPI设备框架spi0接管 |
| 13 (D13) | BSP_IO_PORT_00_PIN_04 || SPI0-SCK,默认被RT-Thread的SPI设备框架spi0接管 |
| 14 (D14) | BSP_IO_PORT_08_PIN_01 || I2C0-SDA,默认被RT-Thread的I2C设备框架i2c0接管 |
| 15 (D15) | BSP_IO_PORT_08_PIN_00 || I2C0-SCL,默认被RT-Thread的I2C设备框架i2c0接管 |

> 注意:
>
> 1. xxxxxxxxx
> 2. xxxxxxxxx
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: This README content appears copied from another BSP (mentions STM32 and uart6) and does not match the XMC7100 configuration/pinout added in this PR. Please replace the table with the actual XMC7100 pin mapping consistent with pins_arduino.{c,h}, and remove placeholder notes. 中文:该 README 似乎从其他 BSP 复制(出现 STM32、uart6),与本 PR 中的 XMC7100 配置/引脚映射不一致。请用与 pins_arduino.{c,h} 一致的 XMC7100 引脚表替换,并删除占位说明。

Suggested change
| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
| ------------------- | ---------|---- | ------------------------------------------------------------------------- |
| 0 (D0) | BSP_IO_PORT_06_PIN_04 || Serial-RX,默认被RT-Thread的UART设备框架uart6接管 |
| 1 (D1) | BSP_IO_PORT_06_PIN_05 || Serial-TX,默认被RT-Thread的UART设备框架uart6接管 |
| 2 (D2) | BSP_IO_PORT_05_PIN_00 || |
| 3 (D3) | BSP_IO_PORT_05_PIN_01 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 4 (D4) | BSP_IO_PORT_11_PIN_02 || |
| 5 (D5) | BSP_IO_PORT_11_PIN_03 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 6 (D6) | BSP_IO_PORT_11_PIN_04 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 7 (D7) | BSP_IO_PORT_11_PIN_05 || |
| 8 (D8) | BSP_IO_PORT_11_PIN_06 || |
| 9 (D9) | BSP_IO_PORT_05_PIN_07 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 10 (D10)| BSP_IO_PORT_00_PIN_05 || |
| 11 (D11)| BSP_IO_PORT_00_PIN_02 || SPI0-MOSI,默认被RT-Thread的SPI设备框架spi0接管 |
| 12 (D12)| BSP_IO_PORT_00_PIN_03 || SPI0-MISO,默认被RT-Thread的SPI设备框架spi0接管 |
| 13 (D13)| BSP_IO_PORT_00_PIN_04 || SPI0-SCK,默认被RT-Thread的SPI设备框架spi0接管 |
| 14 (D14)| BSP_IO_PORT_08_PIN_01 || I2C0-SDA,默认被RT-Thread的I2C设备框架i2c0接管 |
| 15 (D15)| BSP_IO_PORT_08_PIN_00 || I2C0-SCL,默认被RT-Thread的I2C设备框架i2c0接管 |
> 注意:
>
> 1. xxxxxxxxx
> 2. xxxxxxxxx
| Arduino引脚编号 | XMC7100引脚编号 | 5V容忍 | 备注 |
| ------------------- | -------------- | ----|------------------------------------------------------------- |
| 0 (D0) | P6_4 || UART0_RX, 默认被RT-Thread的UART设备框架接管 |
| 1 (D1) | P6_5 || UART0_TX, 默认被RT-Thread的UART设备框架接管 |
| 2 (D2) | P5_0 || |
| 3 (D3) | P5_1 || PWM0_CH0, 默认被RT-Thread的PWM设备框架接管 |
| 4 (D4) | P11_2 || |
| 5 (D5) | P11_3 || PWM0_CH1, 默认被RT-Thread的PWM设备框架接管 |
| 6 (D6) | P11_4 || PWM0_CH2, 默认被RT-Thread的PWM设备框架接管 |
| 7 (D7) | P11_5 || |
| 8 (D8) | P11_6 || |
| 9 (D9) | P5_7 || PWM0_CH3, 默认被RT-Thread的PWM设备框架接管 |
| 10 (D10)| P0_5 || |
| 11 (D11)| P0_2 || SPI0_MOSI, 默认被RT-Thread的SPI设备框架接管 |
| 12 (D12)| P0_3 || SPI0_MISO, 默认被RT-Thread的SPI设备框架接管 |
| 13 (D13)| P0_4 || SPI0_SCK, 默认被RT-Thread的SPI设备框架接管 |
| 14 (D14)| P8_1 || I2C0_SDA, 默认被RT-Thread的I2C设备框架接管 |
| 15 (D15)| P8_0 || I2C0_SCL, 默认被RT-Thread的I2C设备框架接管 |
> 注意:
>
> 1. 以上引脚映射请以 pins_arduino.c 和 pins_arduino.h 文件为准。
> 2. 部分引脚可能被RT-Thread设备框架默认占用,如串口、PWM、SPI、I2C等,使用时请注意资源冲突。

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +21 to +43
| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
| ------------------- | --------- | ---- | ------------------------------------------------------------------------- |
| 0 (D0) | BSP_IO_PORT_06_PIN_04 || Serial-RX,默认被RT-Thread的UART设备框架uart6接管 |
| 1 (D1) | BSP_IO_PORT_06_PIN_05 || Serial-TX,默认被RT-Thread的UART设备框架uart6接管 |
| 2 (D2) | BSP_IO_PORT_05_PIN_00 || |
| 3 (D3) | BSP_IO_PORT_05_PIN_01 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 4 (D4) | BSP_IO_PORT_11_PIN_02 || |
| 5 (D5) | BSP_IO_PORT_11_PIN_03 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 6 (D6) | BSP_IO_PORT_11_PIN_04 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 7 (D7) | BSP_IO_PORT_11_PIN_05 || |
| 8 (D8) | BSP_IO_PORT_11_PIN_06 || |
| 9 (D9) | BSP_IO_PORT_05_PIN_07 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 10 (D10) | BSP_IO_PORT_00_PIN_05 || |
| 11 (D11) | BSP_IO_PORT_00_PIN_02 || SPI0-MOSI,默认被RT-Thread的SPI设备框架spi0接管 |
| 12 (D12) | BSP_IO_PORT_00_PIN_03 || SPI0-MISO,默认被RT-Thread的SPI设备框架spi0接管 |
| 13 (D13) | BSP_IO_PORT_00_PIN_04 || SPI0-SCK,默认被RT-Thread的SPI设备框架spi0接管 |
| 14 (D14) | BSP_IO_PORT_08_PIN_01 || I2C0-SDA,默认被RT-Thread的I2C设备框架i2c0接管 |
| 15 (D15) | BSP_IO_PORT_08_PIN_00 || I2C0-SCL,默认被RT-Thread的I2C设备框架i2c0接管 |

> 注意:
>
> 1. xxxxxxxxx
> 2. xxxxxxxxx
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English: This README content appears copied from another BSP (mentions STM32 and uart6) and does not match the XMC7100 configuration/pinout added in this PR. Please replace the table with the actual XMC7100 pin mapping consistent with pins_arduino.{c,h}, and remove placeholder notes. 中文:该 README 似乎从其他 BSP 复制(出现 STM32、uart6),与本 PR 中的 XMC7100 配置/引脚映射不一致。请用与 pins_arduino.{c,h} 一致的 XMC7100 引脚表替换,并删除占位说明。

Suggested change
| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
| ------------------- | --------- | ---- | ------------------------------------------------------------------------- |
| 0 (D0) | BSP_IO_PORT_06_PIN_04 || Serial-RX,默认被RT-Thread的UART设备框架uart6接管 |
| 1 (D1) | BSP_IO_PORT_06_PIN_05 || Serial-TX,默认被RT-Thread的UART设备框架uart6接管 |
| 2 (D2) | BSP_IO_PORT_05_PIN_00 || |
| 3 (D3) | BSP_IO_PORT_05_PIN_01 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 4 (D4) | BSP_IO_PORT_11_PIN_02 || |
| 5 (D5) | BSP_IO_PORT_11_PIN_03 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 6 (D6) | BSP_IO_PORT_11_PIN_04 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 7 (D7) | BSP_IO_PORT_11_PIN_05 || |
| 8 (D8) | BSP_IO_PORT_11_PIN_06 || |
| 9 (D9) | BSP_IO_PORT_05_PIN_07 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 10 (D10) | BSP_IO_PORT_00_PIN_05 || |
| 11 (D11) | BSP_IO_PORT_00_PIN_02 || SPI0-MOSI,默认被RT-Thread的SPI设备框架spi0接管 |
| 12 (D12) | BSP_IO_PORT_00_PIN_03 || SPI0-MISO,默认被RT-Thread的SPI设备框架spi0接管 |
| 13 (D13) | BSP_IO_PORT_00_PIN_04 || SPI0-SCK,默认被RT-Thread的SPI设备框架spi0接管 |
| 14 (D14) | BSP_IO_PORT_08_PIN_01 || I2C0-SDA,默认被RT-Thread的I2C设备框架i2c0接管 |
| 15 (D15) | BSP_IO_PORT_08_PIN_00 || I2C0-SCL,默认被RT-Thread的I2C设备框架i2c0接管 |
> 注意:
>
> 1. xxxxxxxxx
> 2. xxxxxxxxx
| Arduino引脚编号 | XMC7100引脚编号 | 5V容忍 | 备注 |
| ------------------- | -------------- | ---- | ------------------------------------------------------------- |
| 0 (D0) | P0_0 || UART0_RX, 默认被RT-Thread的UART设备框架接管 |
| 1 (D1) | P0_1 || UART0_TX, 默认被RT-Thread的UART设备框架接管 |
| 2 (D2) | P0_2 || |
| 3 (D3) | P0_3 || PWM0_CH0, 默认被RT-Thread的PWM设备框架接管 |
| 4 (D4) | P0_4 || |
| 5 (D5) | P0_5 || PWM0_CH1, 默认被RT-Thread的PWM设备框架接管 |
| 6 (D6) | P0_6 || PWM0_CH2, 默认被RT-Thread的PWM设备框架接管 |
| 7 (D7) | P0_7 || |
| 8 (D8) | P1_0 || |
| 9 (D9) | P1_1 || PWM1_CH0, 默认被RT-Thread的PWM设备框架接管 |
| 10 (D10)| P1_2 || SPI0_CS, 默认被RT-Thread的SPI设备框架接管 |
| 11 (D11)| P1_3 || SPI0_MOSI, 默认被RT-Thread的SPI设备框架接管 |
| 12 (D12)| P1_4 || SPI0_MISO, 默认被RT-Thread的SPI设备框架接管 |
| 13 (D13)| P1_5 || SPI0_SCK, 默认被RT-Thread的SPI设备框架接管 |
| 14 (D14)| P2_0 || I2C0_SDA, 默认被RT-Thread的I2C设备框架接管 |
| 15 (D15)| P2_1 || I2C0_SCL, 默认被RT-Thread的I2C设备框架接管 |
> 注意:
>
> 1. 部分引脚默认被RT-Thread的设备框架(如UART、PWM、SPI、I2C)接管,使用时请注意资源冲突。

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +83 to +84
{CYHAL_PORT_22, ioss_interrupts_gpio_23_IRQn},
{CYHAL_PORT_24, ioss_interrupts_gpio_24_IRQn},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hydevcode 关注下,看起来确实写错了

Comment on lines +21 to +43
| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
| ------------------- | --------- | ---- | ------------------------------------------------------------------------- |
| 0 (D0) | BSP_IO_PORT_06_PIN_04 || Serial-RX,默认被RT-Thread的UART设备框架uart6接管 |
| 1 (D1) | BSP_IO_PORT_06_PIN_05 || Serial-TX,默认被RT-Thread的UART设备框架uart6接管 |
| 2 (D2) | BSP_IO_PORT_05_PIN_00 || |
| 3 (D3) | BSP_IO_PORT_05_PIN_01 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 4 (D4) | BSP_IO_PORT_11_PIN_02 || |
| 5 (D5) | BSP_IO_PORT_11_PIN_03 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 6 (D6) | BSP_IO_PORT_11_PIN_04 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 7 (D7) | BSP_IO_PORT_11_PIN_05 || |
| 8 (D8) | BSP_IO_PORT_11_PIN_06 || |
| 9 (D9) | BSP_IO_PORT_05_PIN_07 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 10 (D10) | BSP_IO_PORT_00_PIN_05 || |
| 11 (D11) | BSP_IO_PORT_00_PIN_02 || SPI0-MOSI,默认被RT-Thread的SPI设备框架spi0接管 |
| 12 (D12) | BSP_IO_PORT_00_PIN_03 || SPI0-MISO,默认被RT-Thread的SPI设备框架spi0接管 |
| 13 (D13) | BSP_IO_PORT_00_PIN_04 || SPI0-SCK,默认被RT-Thread的SPI设备框架spi0接管 |
| 14 (D14) | BSP_IO_PORT_08_PIN_01 || I2C0-SDA,默认被RT-Thread的I2C设备框架i2c0接管 |
| 15 (D15) | BSP_IO_PORT_08_PIN_00 || I2C0-SCL,默认被RT-Thread的I2C设备框架i2c0接管 |

> 注意:
>
> 1. xxxxxxxxx
> 2. xxxxxxxxx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +21 to +43
| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
| ------------------- | --------- | ---- | ------------------------------------------------------------------------- |
| 0 (D0) | BSP_IO_PORT_06_PIN_04 || Serial-RX,默认被RT-Thread的UART设备框架uart6接管 |
| 1 (D1) | BSP_IO_PORT_06_PIN_05 || Serial-TX,默认被RT-Thread的UART设备框架uart6接管 |
| 2 (D2) | BSP_IO_PORT_05_PIN_00 || |
| 3 (D3) | BSP_IO_PORT_05_PIN_01 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 4 (D4) | BSP_IO_PORT_11_PIN_02 || |
| 5 (D5) | BSP_IO_PORT_11_PIN_03 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 6 (D6) | BSP_IO_PORT_11_PIN_04 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 7 (D7) | BSP_IO_PORT_11_PIN_05 || |
| 8 (D8) | BSP_IO_PORT_11_PIN_06 || |
| 9 (D9) | BSP_IO_PORT_05_PIN_07 || PWM0-CH0,默认被RT-Thread的PWM设备框架pwm0接管 |
| 10 (D10) | BSP_IO_PORT_00_PIN_05 || |
| 11 (D11) | BSP_IO_PORT_00_PIN_02 || SPI0-MOSI,默认被RT-Thread的SPI设备框架spi0接管 |
| 12 (D12) | BSP_IO_PORT_00_PIN_03 || SPI0-MISO,默认被RT-Thread的SPI设备框架spi0接管 |
| 13 (D13) | BSP_IO_PORT_00_PIN_04 || SPI0-SCK,默认被RT-Thread的SPI设备框架spi0接管 |
| 14 (D14) | BSP_IO_PORT_08_PIN_01 || I2C0-SDA,默认被RT-Thread的I2C设备框架i2c0接管 |
| 15 (D15) | BSP_IO_PORT_08_PIN_00 || I2C0-SCL,默认被RT-Thread的I2C设备框架i2c0接管 |

> 注意:
>
> 1. xxxxxxxxx
> 2. xxxxxxxxx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

src = Glob('*.c') + Glob('*.cpp')
inc = [cwd]

print(cwd)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment on lines +24 to +25
{D00, GET_PIN(19, 0), "uart2"}, /* Serial6-RX */
{D01, GET_PIN(19, 1), "uart2"}, /* Serial6-TX */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

select PKG_USING_RTDUINO
select BSP_USING_UART2
select BSP_USING_GPIO
select BSP_USING_HW_I2C
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

rt_pin_mode(IFX_RW007_INT_BUSY_PIN, PIN_MODE_INPUT_PULLUP);
}

static struct rt_spi_device rw007_dev;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

@Rbb666 Rbb666 Rbb666 requested changes

@mysterywolf mysterywolf Awaiting requested review from mysterywolf mysterywolf is a code owner

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

BSP: Infineon BSP related with Infineon BSP

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /