公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received
关于使用CYT4BB7CEBQ0AESGS,8路CAN同时使用,每一路报文超过90条,负载率40%,出现丢帧!想尽一切方法都没能解决,此问题卡滞半年左右,希望有此经验的同行能够帮忙提出一些关键性建议!感谢不尽

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/td-p/743401

0 点赞
1 解答
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好 QFGL,

我把之前的帖子贴附在这里进行参考:

https://community.infineon.com/t5/TRAVEO-T2G/CAN-%E4%B8%A2%E5%B8%A7%E9%97%AE%E9%A2%98%E8%AF%B7%E6%95...

在发送前,可以先get一下相关 buffer 的状态:

Cy_CANFD_GetTxBufferStatus

看状态是否是pending,进行判断,如果是pending的话,可以换一个buffer ID进行发送;

如果 32 个 buffer 都是待处理状态,说明 can 的负载率较高,可以进行等待,等到有一个 buffer 不再待处理后再调用发送 API:

Cy_CANFD_UpdateAndTransmitMsgBuffer

做一些类似这样的软件处理后,应该不会出现丢帧现象。

最诚挚的问候,

珍妮

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/744002

在原帖中查看解决方案

0 点赞
18 回复数
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好 QFGL,

我把之前的帖子贴附在这里进行参考:

https://community.infineon.com/t5/TRAVEO-T2G/CAN-%E4%B8%A2%E5%B8%A7%E9%97%AE%E9%A2%98%E8%AF%B7%E6%95...

在发送前,可以先get一下相关 buffer 的状态:

Cy_CANFD_GetTxBufferStatus

看状态是否是pending,进行判断,如果是pending的话,可以换一个buffer ID进行发送;

如果 32 个 buffer 都是待处理状态,说明 can 的负载率较高,可以进行等待,等到有一个 buffer 不再待处理后再调用发送 API:

Cy_CANFD_UpdateAndTransmitMsgBuffer

做一些类似这样的软件处理后,应该不会出现丢帧现象。

最诚挚的问候,

珍妮

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/744002

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

哈喽-简妮

我如何在软件中确定我的主频是否正确尼,因为我们始终是怀疑主频不够高导致,while循环不够快,麻烦您指导一下!就是有什么寄存器或者函数可以算出当前主频

QFGL_0-1713924239958.png

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745629

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好,QFGL

有 API 可以返回核心频率的: API

Cy_SysClk_GetCoreFrequency

但你是有buffer是pending状态,应该不是主频不够高,而是can外设发送速度不够快,才导致想要再发数据的时候,buffer里之前的数据还没发出去。

BR,

珍妮

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745644

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

简妮-坎特收发器的速度是死的,您的意思!收发器的推送出去的速度不够快导致的是吗,因为波特率500K是死的!?

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745694

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好 QFGL,

你的意思是接收方设定的波特率是 500k,所以我这边发送只能设定 500k么?

我们的芯片是最高可以支持到 8m 的。

Janine_Y_0-1713935101430.png

BR,

珍妮

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745763

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

是的,整车所有节点都是 500k,我们发车速度高不被识别,必须是 500k!......

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

QFGL_1-1713924713050.png哈喽 Janine ,我看芯片手册说,可以指定分配这个can ram空间,4BB的芯片最大是32,

QFGL_2-1713924794549.png

那么我是否可以把使用频率比较低的can通道调制更小的ram,将剩余的空间给更大频率的can通道以此优化can提高其他通道的效率呢?

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745639

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好 QFGL,

你现在还有丢帧现象么? 还是说是嫌发送的实时性不够?

BR,

珍妮

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745686

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

超过40%同时报文数量变多之后依然存在丢帧现象,但是比以前好多了,所以主机厂要求对效果继续整改

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745693

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好,QFGL

你代码的逻辑是怎么样的呢? 有在调用Cy_CANFD_UpdateAndTransmitMsgBuffer之前先Cy_CANFD_GetTxBufferStatus获取状态判断是否是pending么?

BR,

珍妮

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/%E5%85%B3%E4%BA%8E%E4%BD%BF%E7%94%A8CYT4BB7CEBQ0AESGS%E4%B8%A2%E5%B8%A7%E7%9A%84%E6%8E%A2%E8%AE%A8/m-p/745768

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

嗨,简妮是这样,这样的逻辑!如果待定则切换不同的 buffer

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好,QFGL

如果32个buffer都pending的话会做什么应对呢? 可以发一下你这段逻辑的代码么?

BR,

珍妮

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

简妮 这里的方案能有效改变 can 的效率和丢帧率嘛!

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

我目前的方案如果是pending则是继续切换下一个bufeer,没有其他逻辑Janine!你给我帖子我之前根据您的建议都修改了,但是依然没有彻底解决这个问题

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好 QFGL,

我不知道你的代码具体是怎么实现的,理论上应该不会出现丢帧的现象。

最诚挚的问候,

珍妮

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received
0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

Janine 您上面说的方案,就是我去年发布的帖子,哪些方案我们都尝试过了,效果有改善,但是没有彻底解决

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager
100 likes received

你好,QFGL

如果方便的话,可以把判断pending 切换buffer的代码发出来,可以更清楚问题,方便讨论和我们这边也进行测试,看看能不能复现你的问题。 如果你不想在社区中公开代码的话,可以建一个case,问题和讨论内容将不被公开,相较于社区论坛,隐私性更高。

在英飞凌官网的个人账户选项下就有My Cases的窗口:

Janine_Y_0-1714271871181.png

最诚挚的问候,

珍妮

 

0 点赞