MPC5748G.h 6.0.2 missing CAN buffers

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5748G.h 6.0.2 missing CAN buffers

跳至解决方案
1,029 次查看
sx
Contributor III

Hi,

Recently I noticed that CAN_0_MB_tag MB[64] is not in MPC5748G.h revision 6.0.2.

Instead, I found CAN_0_RAMn_tag RAMn[384] there. Is there any plans to fix it? Or I need to access it by another way?

MPC5748G.h revision 6.0.2(S32DS PA 2.1)

6.PNG

MPC5748G.h revision 6.0.1(S32DS PA 2017.R1)

5.PNG

lukaszadrapa

davidtosenovjan

petervlna

PetrS

b55689

标记 (2)
0 项奖励
1 解答
937 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

header ver. 6.0.1 is not correct as defines just 64 MBs, it should be 96. 

Second one from S32DS PA 2.1 should be OK but the usage is little bit different. Here it covers whole MB area, but per single words (384/4=96 MBs for default config). Access is using

#define MSG_BUF_SIZE  4    /* Msg Buffer Size. (CAN 2.0AB: 2 hdr +  2 data= 4 words) */

CAN0->RAMn[ 8*MSG_BUF_SIZE + 1] =     /* MB8 word 1:  ID */

CAN0->RAMn[ 8*MSG_BUF_SIZE + 2] =     /* MB8 word 2: data word 0 */
CAN0->RAMn[ 8*MSG_BUF_SIZE + 3] =     /* MB8 word 3: data word 1 */

CAN0->RAMn[ 8*MSG_BUF_SIZE + 0] =     /* MB8 word 0: CS */

you can easily address MBs in case of different payload if CAN FD is used, because base address of the MB differs.

Previous header assume just 8 bytes payload.

BR, Petr

在原帖中查看解决方案

2 回复数
938 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

header ver. 6.0.1 is not correct as defines just 64 MBs, it should be 96. 

Second one from S32DS PA 2.1 should be OK but the usage is little bit different. Here it covers whole MB area, but per single words (384/4=96 MBs for default config). Access is using

#define MSG_BUF_SIZE  4    /* Msg Buffer Size. (CAN 2.0AB: 2 hdr +  2 data= 4 words) */

CAN0->RAMn[ 8*MSG_BUF_SIZE + 1] =     /* MB8 word 1:  ID */

CAN0->RAMn[ 8*MSG_BUF_SIZE + 2] =     /* MB8 word 2: data word 0 */
CAN0->RAMn[ 8*MSG_BUF_SIZE + 3] =     /* MB8 word 3: data word 1 */

CAN0->RAMn[ 8*MSG_BUF_SIZE + 0] =     /* MB8 word 0: CS */

you can easily address MBs in case of different payload if CAN FD is used, because base address of the MB differs.

Previous header assume just 8 bytes payload.

BR, Petr

937 次查看
sx
Contributor III

Oh I see! Thanks for your help!

0 项奖励