Hi ! Thank you for your answer. I had a look at your example, but I found the problem by having a deeper look inside the headers. I made a confusion between the datasheet and the headers. In datasheet is written that the Control/status register of the first message buffer is located at the address 0x80 (+ offset). That's why I wrote this code:
uint32 x = (0x08 << 24) // Code
| (1 << 22) // Substitue remote request
| (1 << 21) // Extended mode
| (1 << 16); // Data length
MCF_CAN_MBUF0_CTRL(CAN_SEL) = x;
But in reality the MCF_CAN_MBUF0_CTRL macro writes a 16 bit word, so it must be used to write the high part of Control/Status register. This is the corrected code:
uint16 x = (0x08 << 8) // Code
| (1 << 6) // Substitue remote request
| (1 << 5) // Extended mode
| 1; // Data length
MCF_CAN_MBUF0_CTRL(CAN_SEL) = x;
Maybe a little change in datasheet could avoid such confusion. What do you think about this ?
+-----------------+ +-----------+----------+
| Control/Status | => | Control | Status |
+-----------------+ +-----------+----------+
Now I get a nice CAN signal on my Oscilloscope and I'm waiting for my friend to receive the message !
Thanks !
Olivier Heriveaux