About MSCAN module on 56F82xx

Discussion created by HUSEYIN DEMIR on Mar 27, 2012
Latest reply on May 3, 2012 by Laurence McLean

Hi all,


I just wonder why sequential MSCAN registers increments  by one in the memory space. Since these DSCs are 16 bit, a register should occupy two bytes in memory.  I investigated both the datasheet and IO_map.h. In the IO_map.h they are defined as word. But in the datasheet it is word also but occupies only one byte of memory. What's wrong with it? If I define a struct aligned to CAN receive message buffer, is that correct?


typedef struct{
UNSIGNED16 ident;
UNSIGNED16 extIdent;
UNSIGNED16 data[8];
UNSIGNED16 DLC :12; // big endian
UNSIGNED16 DLCrest :4;