Homepage GitHub

Libuavcan CubeMX FreeRTOS SystemWorkbenchForSTM32


(Raimondas Pomarnacki) #21

In my Case I don’t used cubemx CAN configuration, because libuavcan has own configuration, I only making GPIO pins initalization. My main problem was, what newest version has issues what was discussed in this topic, I just tooked a little bit older version and it began working. Some working examples are at https://github.com/raimapo. Only server side in examples are not implemented, everything is in readme.md explained.


#22

Thank you, Raimondas, I will see your repo)


#23

Raimondas Pomarnacki,I watched. In your example, the same actions are described as in mine. The initialization of the GPIO is also the same. Perhaps there is a bug in the library, but I think I missed something or did something wrong. I’ll think more, but if I don’t solve the problem, I will switch to another version.)


(Pavel Kirienko) #24

Could be wiring. Could you show us a pic and/or a schematic diagram of your electrical connections?


#25

For prototyping of my node I used:

  1. Nucleo-F429ZI
  2. WCMCU-2551 MCP2551 CAN BUS interface module
  3. 2 resistors 120 Om
  4. bread board

For prototyping of slcan I used:

  1. STM32F103C8T6
  2. WCMCU-2551 MCP2551 CAN BUS interface module
  3. USB-UART bridge
  4. bread board

All system:

Connecting of Nucleo and interface module:


Nucleo -> CAN interface
can1_txo -> ctx (“transmitter IN” logic)
can1_rxi -> crx (“receive OUT” logic)

Photo with the bus between resistors (red line - CANH, blue line - CANL) :

I`m sorry for bad culture of manufacturing :grimacing::disappointed_relieved:. I have not the wiring diagrams, but can make if need.


(Alexander Sysoev) #26

Hi! Could you please try to remove terminating resistors at all, as they are placed weirdly and with your line length they are not really needed.
Also, I noticed one more thing.
image
Try removing these resistors in green ovel from your WCMCU-2551 boards in order to exclude all excessive components from the line.


#27

Thanks for the answer, Alexander Sysoev) I tried to remove the terminators. Nodes (slcan and my node) was emitting frames of errors. The resistors on the board are needed to maintain a recessive state, I do not think that they need to be removed. slcan works well under these conditions.

If look at schedule of my nodes working (my post above), can see periodic short pauses. As I understanding, during these pauses a some reboot occurs. I cant capture it in debug.

And one more, mcp2551 has next logic:

  1. Dominant on the bus = 0 on the TxD/RxD
  2. Recessive on the bus = 1 on the TxD/RxD
    UAVCAN has the same logic, or this question needs addressing to stm32?

(Pavel Kirienko) #28

Yes. UAVCAN works on top of the standard CAN.

It’s hard to debug a hardware problem remotely. Perhaps you could arrange a video call with Alexander if he’s available, or ask for help at electronix.ru.