AnsweredAssumed Answered

MPC5634M, how can set maximum of BUF[xx] ?

Question asked by Kritsanasak Wuttisuwapap on Mar 10, 2016
Latest reply on Mar 11, 2016 by Martin Kovar

Hi, I use MPC5634M and I want to know how can set maximum of BUF[xx] ?

 

I use code below and i can set BUF[xx] up to BUF[31].

 

But, i want set BUF[xx] up to BUF[40].

 

Code ;

static void RecieveMsg(void)

{

  uint8_t j;

  uint32_t dummy;

 

/* Use 1 of the next 2 lines: */

/*while (CAN_C.IFLAG1.B.BUF04I == 0) {};*//* MPC551x: Wait for CAN C MB 4 flag */

  while (CAN_A.IFRL.B.BUF05I == 0) {};   /* MPC555x: Wait for CAN C MB 4 flag */

  RxCODE   = CAN_A.BUF[5].CS.B.CODE;      /* Read CODE, ID, LENGTH, DATA, TIMESTAMP */

  RxID     = CAN_A.BUF[5].ID.B.STD_ID;

  RxLENGTH = CAN_A.BUF[5].CS.B.LENGTH;

  for (j=0; j<RxLENGTH; j++) {

    RxDATA[j] = CAN_A.BUF[5].DATA.B[j];

  }

  RxTIMESTAMP = CAN_A.BUF[5].CS.B.TIMESTAMP;

  dummy = CAN_A.TIMER.R;                /* Read TIMER to unlock message buffers */  

/* Use 1 of the next 2 lines: */

/*CAN_C.IFLAG1.R = 0x00000010; */       /* MPC551x: Clear CAN C MB 4 flag */

  CAN_A.IFRL.R = 0x00000010;            /* MPC555x: Clear CAN C MB 4 flag */

}

 

Thank you

Outcomes