MPC5748G.h 6.0.2 missing CAN buffers

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5748G.h 6.0.2 missing CAN buffers

ソリューションへジャンプ
981件の閲覧回数
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 解決策
889件の閲覧回数
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 返答(返信)
890件の閲覧回数
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

889件の閲覧回数
sx
Contributor III

Oh I see! Thanks for your help!

0 件の賞賛