Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
- {RTT_BSP: "Edgi_Talk_M33_Blink_LED"}
- {RTT_BSP: "Edgi_Talk_CherryUSB/Edgi_Talk_M33_USB_D"}
- {RTT_BSP: "Edgi_Talk_CherryUSB/Edgi_Talk_M33_USB_H"}
- {RTT_BSP: "Edgi_Talk_IPC/Edgi_Talk_M33_IPC"}
- {RTT_BSP: "Edgi_Talk_IPC/Edgi_Talk_M55_IPC"}
- {RTT_BSP: "Edgi_Talk_M55_Blink_LED"}
- {RTT_BSP: "Edgi_Talk_CherryUSB/Edgi_Talk_M55_USB_D"}
- {RTT_BSP: "Edgi_Talk_CherryUSB/Edgi_Talk_M55_USB_H"}
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ $ sdk-bsp-psoc_e84-edgi-talk
│ │ ├── Edgi_Talk_M33_USB_H
│ │ ├── Edgi_Talk_M55_USB_D
│ │ └── Edgi_Talk_M55_USB_H
│ ├── Edgi_Talk_IPC
│ │ ├── Edgi_Talk_M33_IPC
│ │ └── Edgi_Talk_M55_IPC
│ ├── Edgi-Talk_CoreMark
│ ├── Edgi-Talk_CDC_Echo
│ ├── Edgi-Talk_HyperRam
Expand Down
3 changes: 3 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ $ sdk-bsp-psoc_e84-edgi-talk
│ │ ├── Edgi_Talk_M33_USB_H
│ │ ├── Edgi_Talk_M55_USB_D
│ │ └── Edgi_Talk_M55_USB_H
│ ├── Edgi_Talk_IPC
│ │ ├── Edgi_Talk_M33_IPC
│ │ └── Edgi_Talk_M55_IPC
│ ├── Edgi_Talk_CoreMark
│ ├── Edgi_Talk_CDC_Echo
│ ├── Edgi_Talk_HyperRam
Expand Down
6 changes: 6 additions & 0 deletions libraries/HAL_Drivers/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ if GetDepend(['RT_USING_DAC']):
if GetDepend(['BSP_USING_TIM']):
src += ['drv_hwtimer.c']

if GetDepend(['RT_USING_CAN']):
src += ['drv_canfd.c']

if GetDepend(['BSP_USING_IPC']):
src += ['drv_ipc.c']

path = [cwd]
path += [cwd + '/config']

Expand Down
95 changes: 95 additions & 0 deletions libraries/HAL_Drivers/canfd_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/******************************************************************************
* Copyright 2020-2026 The RT-Thread Development Team. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/

#ifndef __CANFD_CONFIG_H__
#define __CANFD_CONFIG_H__

#include <rtthread.h>
#include "board.h"
#include "cy_canfd.h"
#include "cy_sysint.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef BSP_USING_CANFD0
extern const cy_stc_canfd_config_t CYBSP_CAN_FD_CH_0_config;

static cy_stc_sysint_t CANFD0_IRQ_cfg =
{
.intrSrc = canfd_0_interrupts0_0_IRQn,
.intrPriority = 3u,
};
#endif

#ifdef BSP_USING_CANFD1
extern const cy_stc_canfd_config_t CANFD1_config;

static cy_stc_sysint_t CANFD1_IRQ_cfg =
{
.intrSrc = canfd_1_interrupts0_0_IRQn,
Comment on lines +39 to +44
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

BSP_USING_CANFD1 configuration references an extern CANFD1_config, but there is no definition for it in the repo (only CYBSP_CAN_FD_CH_0_config is generated). Enabling CANFD1 will fail to link. Either generate/provide a CANFD1 config symbol or remove/guard the CANFD1 option/macros until the second instance is supported.

Copilot uses AI. Check for mistakes.
.intrPriority = 3u,
};
#endif

/* CANFD0 */
#if defined(BSP_USING_CANFD0)
#ifndef CANFD0_CONFIG
#define CANFD0_CONFIG \
{ \
.name = "canfd0", \
.base = CANFD0, \
.channel = 0u, \
.channel_mask = (1u << 0), \
.mram_delay_us = 6u, \
.irq = canfd_0_interrupts0_0_IRQn, \
.irq_cfg = &CANFD0_IRQ_cfg, \
.isr = RT_NULL, \
.canfd_config = &CYBSP_CAN_FD_CH_0_config, \
.test_mode = CY_CANFD_TEST_MODE_DISABLE, \
.enable_brs = true, \
.tx_buffer_index = 0u, \
}
#endif
#endif /* BSP_USING_CANFD0 */

/* CANFD1 */
#if defined(BSP_USING_CANFD1)
#ifndef CANFD1_CONFIG
#define CANFD1_CONFIG \
{ \
.name = "canfd1", \
.base = CANFD1, \
.channel = 0u, \
.channel_mask = (1u << 0), \
.mram_delay_us = 6u, \
.irq = canfd_1_interrupts0_0_IRQn, \
.irq_cfg = &CANFD1_IRQ_cfg, \
.isr = RT_NULL, \
.canfd_config = &CANFD1_config, \
.test_mode = CY_CANFD_TEST_MODE_DISABLE, \
.enable_brs = true, \
.tx_buffer_index = 0u, \
}
#endif
#endif /* BSP_USING_CANFD1 */

#ifdef __cplusplus
}
#endif

#endif /* __CANFD_CONFIG_H__ */
Loading
Loading