bipropellant / bipropellant-hoverboard-firmware

OpenSource Hoverboard firmware based on Niklas Fauth's one https://github.com/NiklasFauth/hoverboard-firmware-hack
GNU General Public License v3.0
174 stars 74 forks source link

Main crashes when using machine protocol on UART2 and UART3 #30

Closed p-h-a-i-l closed 5 years ago

p-h-a-i-l commented 5 years ago

I felt like I had to leave a warning somewhere ;)

When using the machine protocol with USART2 and USART3, the main routine crashes pretty often for me. That's also the reason why I'm not actively using this fork. In my own branch only minimal parts of this fork are implemented, this is running stable. Also a watchdog is running which at leasts stops the motors since the bldc interrupts keep on firing happily :) My goal is to merge both back together, but it looks like we're short on timers. Maybe in the final product you have to decide between function vs. watchdog.

While merging electricalmeasurements, pid and Flash functionality, instability came back too. Need to look further into the root cause, but wanted to leave this here as warning.

Neither timeouts nor a watchdog is implemented right now in bipropellant-hoverboard-firmware.

btsimonh commented 5 years ago

If DMA is still running, we can watchdog in there....

AntumArk commented 5 years ago

I am working with machine protocol with #39 . Today I had one crash upon sending speed command. Board powered off, I turned it back on and checked temp with ASCII.... It was 140C.... Inspected with thermometer and it was only 35.

p-h-a-i-l commented 5 years ago

Did you hear the shutdown melody? When I speak of crashing, I'm thinking of undefined behaviour, endless loops where you have to pull the battery or power off without going through the proper poweroff() function.

AntumArk commented 5 years ago

Yes, I heard shutdown melody. I experienced crashing with original repo, when hoverboard could not handle too fast communication.

p-h-a-i-l commented 5 years ago

Ok, when you heard the melody, it's a different Issue.

btsimonh commented 5 years ago

I also noticed the other day that the temp was reporting high at boot then falling. In my case falling from ~50C. I thought it was too high for just the 1A load tests I was doing.... so maybe we screwed the temp ADC reading?

p-h-a-i-l commented 5 years ago

stop hijacking my bug ;)

use https://github.com/bipropellant/bipropellant-hoverboard-firmware/issues/52

alex-makarov commented 5 years ago

I can confirm crashes, at least when using speed PID control on UART2. Works for 1-2 minutes and that's it.

p-h-a-i-l commented 5 years ago

Are you sure it is a crash? Does the power button work when you experience a crash like that?

I haven't seen these crashes as I mentioned when opening this issue since the switch to sinusoidal control was done.

alex-makarov commented 5 years ago

Hm, weird. It just stopped happening since today - now everything runs just fine. Power button worked, but serial connection was broken.

p-h-a-i-l commented 5 years ago

Ok, then it might have been a different kind of crash, but my first guess is EMI problems..

I'll close this issue, haven't seen these crashes anymore and every other report was not related.