You are here

No USB with latest VESC FW on 4.12 hardware

5 posts / 0 new
Last post
chris1seto
Offline
Last seen: 1 year 3 weeks ago
Joined: 2019-01-04 01:41
Posts: 11
No USB with latest VESC FW on 4.12 hardware

Hi,

 

I have a Flipsky 4.12 hardware based mini VESC. I did a git pull on my clone of the bldc firmware repo, and then changed the configuration files to uncomment the following:

> #define HW_SOURCE "hw_410.c" // Also for 4.11 and 4.12
> #define HW_HEADER "hw_410.h" // Also for 4.11 and 4.12

When I load the firmware, however, I have no USB VCP. 

Any ideas what might be wrong? Did I miss a source config step? If I use hardware 60 I do get USB VCP, so I know the board is fine.

 

chris1seto
Offline
Last seen: 1 year 3 weeks ago
Joined: 2019-01-04 01:41
Posts: 11

After some debugging, it appears as though this commit breaks compatibility with 4.12 VESCs (or at least the flipsky vesc)

https://github.com/vedderb/bldc/commit/17f97763c0f32ad38001629850d2a606f3679f70

 

chris1seto
Offline
Last seen: 1 year 3 weeks ago
Joined: 2019-01-04 01:41
Posts: 11

Yep, commenting out `timeout_init_IWDT();` in timeout.c fixes this. So for whatever reason, the watchdog isn't getting fed as the board boots and then is just reseting the board as soon as it comes up.

chris1seto
Offline
Last seen: 1 year 3 weeks ago
Joined: 2019-01-04 01:41
Posts: 11

Final update, you can work around this in the latest FW by commenting out the following lines in timeout.c:

	// WWDG configuration
	/*RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE);
	// Timeout = t_PCLK1 (ms) * 4096 * 2^(WDGTB [1:0]) * (T[5:0] + 1)
	// CLK1 = 42MHz

	// Window set between 6.24ms and 12.48ms. Mcu will reset if watchdog is fed outside the window
	WWDG_SetPrescaler(WWDG_Prescaler_2);
	WWDG_SetWindowValue(127);
	WWDG_Enable(127); //0x7F

	timeout_init_IWDT();*/

 

I would just fix this, but I'm not sure if I know the intended archecture of this well enough to make a good fix. Should be trivial to fix for someone that  knows the project a bit better. 

dp
Offline
Last seen: 2 years 2 months ago
VESC Free
Joined: 2020-09-05 12:26
Posts: 3

Hello chris1seto,

I have a similar problem after flashing the firmware for 4.12 vesc, but if i use the default firmware for 4.12 from vesc tool, the USB VCP is detected, i see the code had been changed a lot, do you have any idea how to fix this issue in the current github version?.

Best Regards

dp

dp