cancel
Showing results for 
Search instead for 
Did you mean: 

Can bus problem

Amir Amir
Associate II
Posted on June 10, 2018 at 15:55

Hello  everyone

I am using stm32f429 discovery board. I run CAN hal_lib example( networking ) and monitored tx pin on oscilloscope and got bellow signal( it is attached)

I know the can frame, but the signal that is captured is not like a can frame. Where is the problem?

note: I didn't connect tx to a can channel, I only want to see can frame.

#stm32f4xx-can-bus-error
4 REPLIES 4
T J
Lead
Posted on June 11, 2018 at 10:16

this is my Tx pin,

0690X00000604gfQAA.jpgI think you need to turn on the loopback, not sure... your experiment is outside the norm.

0690X00000604gjQAA.jpg
Posted on June 11, 2018 at 20:46

Thanks for your answer.

I tried LOOPBACK mode example and got the correct frame. 

I captured the signal by arduino serial plotter(bellow picture)

0690X0000060L9HQAU.png

but now I have a new problem. I generated this frame by spartan-6 

FPGA

and sent it to RX pin of stm32f4 disco board. In debug mode, I read the CAN register. The LEC(last error code) field in the CAN_ESR( error status) register was set 0x5. It means Bit dominant Error has been occurred. Why has this error been 

occurred? what is this error?

The picture of signal that is generated by spartan-6 FPGA.

0690X0000060L2BQAU.png
Posted on June 12, 2018 at 00:59

did you set ABOM to enable ?

do you have a line driver ?

without a line driver, you need a pullup on the Can Rx pin.

Posted on June 12, 2018 at 10:14

I set ABOM and tried but the error was occurred again.

I don't have a line driver.

I am using internal pull-up of FPGA. I added an external  pull-up but  the result is same:(