About MSCAN module on 56F82xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About MSCAN module on 56F82xx

912 Views
emb_developer
Contributor I

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;
}CANrxMsg_t;
 

Labels (1)
Tags (1)
0 Kudos
3 Replies

500 Views
Law
Contributor I

Hi there,

 

This is only about a month late, but I was just looking through the data sheet for the DSP56F800E core.

I am using an MC56F8037 part, but I think they both use the same core. Anyway, in the section of the core reference manual,

part 6.4 Byte and Word addresses, it says the 56F800E core supprts two methods of addressing - word and byte.

It says when Word addressing is used each unique adress corresponds to a word in memory, so you count up:

$4002 (15......0) etc

$4001 (15......0)

$4000 (15......0)

 

When Byte addressing is used you can access individual bytes, and it counts up like:

$4004 (7....0)(7....0) etc

$4002 (7....0)(7....0)

$4000 (7....0)(7....0)

 

I hope this helps!!

 

I am also working on getting MSCAN up and running on my controller. I can get data out of it, but I have screwed up something in the way I am collecting data from buffers in my program to put in the CAN tx buffers, so my data is coming out in a mixed order - ie not the way it is being accessed out of the program buffer.

If you have any tips on CAN isr and sending approaches, I would be most grateful!

 

Laurence

0 Kudos

500 Views
emb_developer
Contributor I

No reply?

0 Kudos

500 Views
emb_developer
Contributor I

No help...

0 Kudos