MPC5748G.h 6.0.2 missing CAN buffers

cancel
Showing results for 
Search instead for 
Did you mean: 

MPC5748G.h 6.0.2 missing CAN buffers

Jump to solution
258 Views
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

Tags (2)
0 Kudos
1 Solution
166 Views
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

View solution in original post

2 Replies
167 Views
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

View solution in original post

166 Views
sx
Contributor III

Oh I see! Thanks for your help!

0 Kudos