cancel
Showing results for 
Search instead for 
Did you mean: 

Can Bus, sending and receiving does not work

csminus
Associate II
Posted on June 15, 2015 at 21:25

ghhhhhhhhhhhhk

#lmgtfy #can-bus #stm32f207 #can-prescale-and-quanta
42 REPLIES 42
csminus
Associate II
Posted on June 24, 2015 at 11:53

im still trying to run it but nothing works, i see data on osciloscop

Posted on June 24, 2015 at 17:37

eh i try almos all prescalers and still nothing, maybe its converter problem but i cant check it i think

 

I've never found banging in random values a good way to diagnose problems.

Do you have a schematic for this board you're using? Please provide.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
csminus
Associate II
Posted on June 24, 2015 at 18:19

i was count and i set 4 for 500 br, and i set same br on converter. I have schema only on paper but i try make it fast on pc

Posted on June 24, 2015 at 18:27

i was count and i set 4 for 500 br, and i set same br on converter.

 

500Kbps

That would be coherent with my understanding that the CAN's APB clock is at 30 MHz, and you have 15 time quanta (1 + 6 + 8).

ie ((30,000,000 / 4) / 15) = 500,000

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
csminus
Associate II
Posted on June 24, 2015 at 19:08

0690X000006031bQAA.jpg

Posted on June 24, 2015 at 19:37

Ok, and if you lose R1 and R4 can just connect the west side to CAN-H and CAN-L of the bus, with a 120 Ohm termination between them, does that function any better?

Do you have two of these boards, and can you set them up in receive and transmit modes?

0690X000006031pQAA.jpg

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
csminus
Associate II
Posted on June 24, 2015 at 19:48

i have only one, i will try to get second at the morning, Ou and i have on can out 5khz freq but on converter its a 10-60 its not stable, but when i connect devices then all loks normal

csminus
Associate II
Posted on June 25, 2015 at 10:04

I have 2 devices now, but still not working i set reciving on first and sending on second.

csminus
Associate II
Posted on June 25, 2015 at 12:12

someone have idea?

john239955_st
Associate III
Posted on June 25, 2015 at 17:44

Hi Not sure if this helps ...

Sometime ago I invested in a Peak PCAN View (USB) which allows you work with a known Transmitter and Receiver. You can set say 1M bit and transmit a CAN message and check timing of data on an Oscilloscope, I think 1Mbit is 1uSec, 500K is 2uSec etc.

If you have clocks etc incorrect it ususally easier to pin point the problems albeit I do struggle with CAN ... Good Luck.

KR John.W