isabellesimova / HoverboardFirmware

50 stars 24 forks source link

bin file #1

Closed goosst closed 6 years ago

goosst commented 6 years ago

Hello,

I am unable to generate the .bin file using the "make" command. Would it be possible to commit the bin file in your repo?

thanks

isabellesimova commented 6 years ago

Hi goost,

I've updated the README to include some missing instructions to install the ARM toolchain, which is actually required to compile the firmware. Additionally, I've created a release for v0.1, which includes a compiled bin file.

Please let me know if installing the missing toolchain does not resolve the issue.

Douwe1 commented 6 years ago

Hello, For my "HI6SIM" project: (6DOF ow cost soaring flight-simulator platform) i would like to use hover-board motors for the 6 linear actuators. With this firmware, can the motor be run slower then 11 rpm and have good torque? Best regards, Douwe https://jippes.home.xs4all.nl/hi6sim/index.html

goosst commented 6 years ago

Awesome, thanks for correcting the calibration code! (p.s.: I think this folder should still change from /drivers/stm32f1xx_hal_driver/inc/legacy/ to /drivers/stm32f1xx_hal_driver/inc/Legacy/)

goosst commented 6 years ago

by the way, do you use any proper debugging tools for this stm32? I can't make it to do anything on a hoverboard (not even make a beep, uart communication returns rubbish, ... ).

isabellesimova commented 6 years ago

@Douwe1 In the future, please open a separate issue for a new problem / question - This firmware in its current state can't be run slower than 11rpm because of the limit of the 16-bit timers. That being said, changing the prescaler in motor.c line 561: https://github.com/isabellesimova/HoverboardFirmware/blob/13c0215d9a6ca9c2b83679ba4d41904f35e9b6f7/src/motor.c#L554-L569 to a higher number would allow more time between phase changes / a slower rate.

@goosst I've been using SystemWorkbench. It wasn't the easiest to set up initially, but once I got it up and running, it's been really useful! I don't have any beeps currently set up on start, but the LED that turns on when the firmware starts https://github.com/isabellesimova/HoverboardFirmware/blob/13c0215d9a6ca9c2b83679ba4d41904f35e9b6f7/src/main.c#L54 Feel free to add beeps anywhere and everywhere to help debug: https://github.com/isabellesimova/HoverboardFirmware/blob/13c0215d9a6ca9c2b83679ba4d41904f35e9b6f7/inc/debug.h#L22-L25 but only after the buzzer_init has been called https://github.com/isabellesimova/HoverboardFirmware/blob/13c0215d9a6ca9c2b83679ba4d41904f35e9b6f7/src/main.c#L51

As for UART - it should be giving a status of the battery voltage and the status though. Could you double check the baud rate is 9600 and you have the right serial port?

goosst commented 6 years ago

thanks a lot will give the debug tool a chance, always better than blindly trying things :). If there are any configurations for SystemWorkbench available, always welcome since you've indicated it was hard to setup.

isabellesimova commented 6 years ago

@goosst Just added a guide for setting up the project in SystemWorkbench! If you get a chance to try it out and find anything amiss, feel free to create a PR to update the guide!

goosst commented 6 years ago

Thank you, it's becoming a frustrating endeavor. The .bin file committed in the release does not match the .bin file if I build it directly from the code in your release (yours make the led turn on by default, mine doesn't).

isabellesimova commented 6 years ago

If you can detail the problem, would you mind opening up a new issue? Please include details about your environment (OS, hoverboard, etc) and where you are at in the process. e.g. Are you able to flash the released .bin file onto your board and is it working as expected? Can you compile a bin file using the "make" command and what's the behavior when flashed onto the hoverboard? Are you on calibration mode or not? Any other observations you've made?

The only thing I can think of off the top of my head are: 1) It might help to add some UART print statements, such as the one here: https://github.com/isabellesimova/HoverboardFirmware/blob/13c0215d9a6ca9c2b83679ba4d41904f35e9b6f7/src/motor.c#L219-L221 2) The watchdog might be kicking in (it might help to comment out watchdog related code to see where it's crashing if you have the debug tool set up).

The debug tool would probably give you a better understanding of what's happening, by the way.

goosst commented 6 years ago

Thanks for the response again. It looks like switching from ubuntu to windows has resolved the issue. Now I can at least make a led turn on and off :) and I hear clicking sounds. So I hope some motors will spin soon!

isabellesimova commented 6 years ago

I'm so glad to hear that!! If I can get my hands on an ubuntu laptop, I'll try to figure out how to set it up :)

isabellesimova commented 6 years ago

I got it working on ubuntu and updated the README ! Let me know if that works for you.

goosst commented 6 years ago

as an update: