David Richter

Problems with starting FlexCAN module

Discussion created by David Richter on Oct 27, 2009
Latest reply on Jul 26, 2012 by TomE

 Hi. I hope anyone can help me with the following problem.


I want to build up a little CAN network and therefor I use a MCF52235. I'm using the FlexCAN connected to the pins SYNCA and SYNCB.


For the first tests I don't want to use interrupts I just want to initialize the registers and send some messages to a canalyzer.


And now the problem:


I initialized in this way.


- set the PASPAR register to secondary function (0xA0)

- then I disable the CAN module and start a softreset

- set the clock source to external oscillator (25MHz)

- initialize the bus frequency to 1Mbit/s

          PROPSEG = 8, LOM = 0, LBUF = 0, TSYNC = 0, SAMP = 1
          RJW = 4, PSEG1 = 8, PSEG2 = 8, PRESDIV = 1

- set the max message buffer to 16

- set global extended mask

- initialize all message buffers as inactive

- set message buffer 14 extended mask

- set message buffer 15 extended mask

- set specified message buffers to RX or TX with individual identifiers

- then another softreset

- and the last point is to set the FlexCAN module in normal mode.


I debug with the Abatron BDI2000 and when I look into register values, then every initialization was correct, but when I connect my system to canalyzer an write a little programm to send some data, nothing happens.


The data are written to the specified message buffer with the start code 'transmit once' but the message isn't transmitted and the code remains 'transmit once'. Normally the message should be transmitted and the code should be set to 'inactive'.


I think I forgot something during initialization, but I don't know what. Is there anything else I need to initialize to start FlexCAN module?