Zubax babel schematic and hardware init for libcanard

(Kent Martin) #1

I am trying to run libcanard on the zubax babel board.
I couldn’t find a schematic anywhere to show what the crystal is and pin connections to the stm32.
I am trying to use cubemx to set up a project so I need to know what the xtal frequency is and pins connceted. I also need to know what the HSE_VALUE define refers to? Is it External crystal frequency or is it the system clock, or pll clk frequency?


(Alexander Sysoev) #2

Greetings! Please find babel schemaitc attached to this post
babel.pdf (58.2 KB)
HSE_VALUE is indeed frequency of the external crystal. System clock is obtained from it using PLL with its prescalers and dividers. UAVCAN may work with different system clock settings, it just has to know these settings. For that there is a function canardSTM32ComputeCANTimings.

(Kent Martin) #3

Thanks, I did manage to create a startup project and got it to build and run, but it did not work. It got stuck in a tx function somewhere.
Is there any chance i can get the original .ioc (cubemx ) file used to generate the project?
I’m using SW4STM(ac6) not ewarm that appears was used in the sample code.
There is something wrong. Most code should be the same but the startup (.s) file is not.
I couldn’t see one there that was for sw4stm that would build on it, so I need to generate from cubemx.
Having the original cubemx file would help greatly in narrowing down what the problem is.
It might help to see where there are differences in generated source.


(Alexander Sysoev) #4

I’m sorry but there is no *.ioc file for this project as iCubeMX was not used to generate any code here.
Stm32CubeMX is well known for the low quality code it generates so I try to avoid it if I can.
If you’d like to use any kind of library for hardware init, I’d recommend you go on with SPL.
Also, do you have step by step debug available? It would be useful to know on what step exactly everything stops.
Best regards, Alex