Skip to main content
Amir Amir
Associate
June 10, 2018
Question

Can bus problem

  • June 10, 2018
  • 1 reply
  • 1341 views
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
This topic has been closed for replies.

1 reply

T J
Senior III
June 11, 2018
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
Amir Amir
Amir AmirAuthor
Associate
June 11, 2018
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
T J
Senior III
June 12, 2018
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.