You are here

Initial startup time

4 posts / 0 new
Last post
rxty
Offline
Last seen: 2 years 5 months ago
Joined: 2022-06-02 18:31
Posts: 2
Initial startup time

Hi together!

I have been googling around for some time now, as well as looking (not too deep) over the firmware source code, but did not find my answer...

It seems like the VESCs take around 5 secs. until they respond to anything (CAN bus, VESC tool USBUART connection, etc). What (and where) is the source of this behaviour?
My goal is to have an almost instant startup, maybe it can be set somewhere i didn't look before.

I am using different HW, old VESCs and also Flipsky, and different (also the newest) Firmware 5.03

Thank you in advance,
Tobias

frank
Offline
Last seen: 4 days 50 min ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

It simply needs some time to boot up.

rxty
Offline
Last seen: 2 years 5 months ago
Joined: 2022-06-02 18:31
Posts: 2

This is not really helpful. Because I write STM32 embedded software myself, and I don't see the firmware running linux or something heavy to boot up.

Hoping someone shows up who knows the code!

sifourquier
Offline
Last seen: 5 months 1 week ago
VESC Free
Joined: 2021-12-04 00:50
Posts: 3

Hello is to late for reply to rxty but i reply for anyone else looking for the same query

After measuring boot time i found mcpwm_foc_init take ~4s

you can see

while (UTILS_AGE_S(v_in_stable_time) < 2.0) {
                chThdSleepMilliseconds(1);

he wait Vin are stable for more of 2S then he wait a minimum of 2S

and in

mcpwm_foc_dc_cal

chThdSleepMilliseconds(1000); //i not know why but i thing is for wait current and phase voltage filter are stable but 1s is long
 

and after he sample 1000 time all phase for measuring phase current and voltage offset  (he request a wait of only one tick (20uS) but the rtos can wait more)

and one more 1000 sample for "Measure undriven offsets"

Then this startup time is a wait of hardware analog voltage is stable.