-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gen2.3.1 (ex2.7) = GD32E230C8T6 #16
Comments
I noticed when I was tracing the connections that the Hi and Lo sides of the driver connect to |
The GD32E230 also has only one advanced timer capabale of driving a 3 phase motor.
These connect to TIMER0_CH0, TIMER0_CH1 and TIMER0_CH2 We are currently working on a simpleFOC port for these Gen2 boards: Candas1/Split_Hoverboard_SimpleFOC#6 (comment) But please also continue to get the GD32E230 compiled for this Gen2.x firmware. |
@Candas1 has begun with a nice spreadsheet of the pin connections for various board layouts: https://docs.google.com/spreadsheets/d/15msbDAIMxC2rIkq8Au8vf82ub1qEaS67Lc1cFb86Jpc/edit#gid=0 |
I think that all |
Okay, i have replace all
This compiles successfully for the f130 target. Will publish my code now. |
#include "gd32e23x.h" is the correct wording. Now it compiles but i get 10 compiler errors.
@WizzardDr please continue as i want to work on something else :-) |
5 compiler errors with
:-) |
4 errors:
But the remaining four errors are not in our user code:
So i guess some compiler setting must be adjusted :-/ |
Okay if i simple remove that strange line with //FMC_WS... this leads to a successful compilation:
@WizzardDr , you continue ! |
Well this is unfortunate, I didn't see your updates, I have wasted my time doing what you have just done, but I did it worse and slower lol. I looked into the FMC stuff and found "The FMC provides a security protection function to prevent illegal code/data access on theFlash memory." so it probably isn't important. Thanks for getting it to compile. |
Only test the binary with a 1-2A CC power supply !!! The master and slave boards seem to be different, slave having new room for the buzzer and bluetooth on board ! |
I am currently working to add your defines_2-7.h ! 22 errors at the moment.. |
Okay i added the defines_2-7.h and removed the compiler errors.
It seems to me that the gate driver chips expect a negated signal for low side mosfets. So maybe the 2.0 code will run. But again, be careful ! |
If you do not find the
|
Okay i added |
@RoboDurden I do not understand how the pulse time is correct with the PWM running in mode 1. In mode 1 "When counting up, OxCPRE is low when the counter is smaller than TIMER0_CHxCV, and high otherwise.". Is "pulse_value" = How does |
What was wrong with UCC1800_dcdc_chip.PDF ? Have you started testing the binary with a constant current power supply ??? |
I think that pdf is for a different chip. It shows a different pinout to the chip that is on the board. E.g. My schematic shows pin1 connected to vcc whereas that datasheet shows vcc at pin 7. That datasheet also shows an external switching mosfet. |
My problem at the moment is that https://github.com/EFeru/hoverboard-firmware-hack-FOC/wiki/How-to-Unlock-MCU-flash seems to have bricked the mcu... I connected it and it seamed to be unlocked, It read a 4kB image. Then I followed the step and now it just says the chip protection is enabled and it won't let me set the option bits to unlock it. STM32CubeProgrammer returns |
I lifted the Boot0 pin and used UART and got it to load the firmware. (I selected "Read Unprotect (MCU)" in STM32CubeProgrammer) |
If you indeed succeeded with a stlink dongle to flash with the uart protocol and not the SWD protocol, please make a youtube tutorial. |
I have tested it with 20v (1a) with the battery cell count set to 5, but the power doesn't seem to be latching ON. |
add
to your I never got the debug step by step mode working with this Keil ide. |
Yes, I guess I'll have to trace more of the pcb and find the led pins. |
I've been trying to get it to work and have come to the realization that the main code doesn't seem to be running at all. I've blocked out the main code with
This should be working no matter what, right? |
This is the code that works on my gen2.0 test setup:
|
Man guys are really smart. I am completely brand new to this whole thing. I'm still trying to figure out how to wire my ST link to the board. I have been using chat gpt to help me. However, that appears to be working with a toddler. Consistently looking for a brand new toy. I have already Soldered in the four headers. I think that they're called in the four holes in the board. My end use is I'm trying to make like a 4 wheel drive platform that i can control by an RC controller. |
Rc Controller = stupid fun project :-/ |
Would you suggest. RC to ESP32 to Motherboard UART or RC to ESP32 to Arduino Uno 3 to Motherboard? You appear to be the tube god for these firmware hacks. Thank you for doing what you do. Sincerely,
Christopher
|
We have RC to ESP32 to Motherboard UART example code but I do not support it. Please read the wiki and prove that you can solve problems yourself and have the happiness to contribute. Otherwise you are only a brain degenerated consumer :-( |
I bricked all 4 boards being a noob. Just got em to j reflash jtonight. Using opencd. |
You still have not confirmed what boards you have. |
Accidentally closed |
I have the GD32E230C8T6 |
Layout ? |
On the computer downstairs pushing 4am here. Lots of reading and research. Trying to do this thing. Im getting there. Ty for your time. |
do you have other board, e230 is not supported(by autodetect), you either need gd32f130 or mm32 series |
if you still want further support, go to my repo and join the discord server, if you submit the layout in database i may be able to help(we have allot of e230 unsupported board in database already) |
as he is living in the Eastern Time US time zone, there might be no shpping of the $2 board to the US ? |
?? i provide gd32e230 autodetect binaries: https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/tree/main/BinariesToTest |
yeah i also dont have e230 to test |
not sure, but someone from canada ordered one and shipping included is $7 still cheap
yeah i dont need any board numbering i just provide a list to search board support status and hardware specs based on marking, i dont include the mpmode string because some of them is not mm32 |
Hoverboard Motherboard: LC_TWO_SYS 20200825 I'll test the auto detect. Remember noob. What is the purpose of the auto detect |
You either don't use your brain or you don't have one any longer. So you could start with https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/raw/main/BinariesToTest/hoverboard%202.3.1%20master%20Dummy.bin The guy who added this board to this repo also addd RC-hoverboard control: #26 But then he disappeared and that is why the 2.3.1 binaries are still in the BinariesToTest/ folder :-( |
Thank you as stated up until 5 days ago I didn't even know what a microcontroller was. Thank you so much for your guidance. |
then maybe you should read the wiki which will show you how to identify the board, you dont provide any picture, how are we supposed to know your hardware then, you really didnt use your brain |
it is just the board thats already indexed and have pre compiled binary, i think even chatgpt can tell |
I stopped at the boards. Didn't notice the bottom of the page |
It's ok, just check now, it should be linked on main page too probably |
Hello ive also just found that my hoverboard is the 2.3.1 with black wheels and a GD32E230 chip. Firstly i have this ftdi to serial programmer and was wondering if i can use this instead of stlink or using an esp32 to flash the device If not then i will go with a wemos d1 mini esp8266 and the CMSIS‐DAP method. If keil says my hoverboard is blocked then i will go with the hard way? im using linux so i get to skip some steps In both my go to will be keil for now After that i guess im going to use an esp32 and the UART_BUS method to control both motors simultaneously on the 19200 baud rate with a diode. I just want to double check that the binaries i need to be flashing are https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/blob/main/BinariesToTest/hoverboard%202.3.1%20master%20Dummy.bin this one Some more binaries were added to the Binaries to test 3 months after this but they have a few variations. all seemingly for the GD32E230 chip. Im guessing i will be the first to test the binaries? |
Buy a $2 st link v2 dongle from China.. |
thanks to @WizzardDr who added this new layout which needs a new Keil compiler target: #15
As i am not really experienced at all with this Keil platform, help from anybody would be appreciated :-)
I see that this board has three mosfet gate driver chips instead of analog gate drivers like the original 2.0.
Be aware that this firmware here was written for the 2.0 layout where the low side mosfets are turned on with a LOW signal !!
With layouts having gate driver chips however, the on-signal might be HIGH for both high-side and low-side mosfets.
If this is not correctly applied, all three half-bridges will short cut and burn !!
When testing a new layout it is mandatory to use a CC constant current power supply with only 1-2 A max !!!
The text was updated successfully, but these errors were encountered: