Skip to content
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

New motherboard YST-DXT-J20 V4 with "ATERY" AT32F403RCT6 #97

Open
cloidnerux opened this issue May 25, 2019 · 78 comments
Open

New motherboard YST-DXT-J20 V4 with "ATERY" AT32F403RCT6 #97

cloidnerux opened this issue May 25, 2019 · 78 comments

Comments

@cloidnerux
Copy link

Hello,

I bought a hoverboard mainboard off ebay in order to use this firmware, hover on arrival I realized that this mainboard seems to be newer and different to the ones currently used.
It features a "AT32F403RCT6" which seems to be a Chinese STM32F103RCT6 clone with faster clock speed, a M4F core, more peripherals, and more RAM. As far as I could see it, it should be possible to compile the current firmware for the new controller.
2019-05-25 11 19 24

Also, it seems to have dedicated gate driver ICs instead of the discrete ones, some of the connectors are different and the layout changed. They also changed the pinout of the SWD connection. I try to reverse engineer the layout as I could not find anything on the internet at the moment.

Does anybody already have any experience with these boards?

@p-h-a-i-l
Copy link
Contributor

Shoutout to @TomTinkering
Is that yet another new variant? Or is this similar to your GD F403 board?

@TomTinkering
Copy link

TomTinkering commented May 25, 2019

That is exactly my board. The AT32F403 chip is (I think) more or less the same as the GD32F403RCT6, which provides a bit more support/documentation. I have made a schematic of the board.

Here are some resources for the GD version of the chip:

And for the AT32F403 chip:

I have just started working on it, but not much time right now. Pretty sure it will not run the firmware directly, but it should not be too hard to port. I will let you know if I make any progress

@cloidnerux
Copy link
Author

The GD32 and the AT32 are not exactly the same devices, they have some differences, however the footprint is quite the same and the schematic matches my board.

I try to compile something for the AT32, hopefully it works.

@TomTinkering
Copy link

Hmm, for the artery chip I could only find a chinese datasheet/reference manual. Do you have more information? My chinese is not great :P

@cloidnerux
Copy link
Author

cloidnerux commented May 25, 2019

Some of the stuff is in English and I use the google translator, otherwise, I am also left to guess. If there is some critical stuff I can ask some Chinese friends of mine if they can translate it for me.
From the excerpts, I could understand they have a core which achieves 200MHz operation, the GD32 only achieves 168MHz. I am guessing they are indeed different parts. GigaDevices propably has a serial flash, which is glued on the top of the DIE
https://zeptobars.com/en/read/GD32F103CBT6-mcm-serial-flash-Giga-Devices
The AT32 might have the flash on the same DIE,

Somewhere on the bottom of this site are the standard lib, the files for their dev board and some other stuff:
http://www.arterytek.com/html/product/product_AT32F403.jsp

I expect them to be mostly compatible to the STM32 stuff to allow for easier migration, GigaDevices did the same.

Also I asked on reddit if somebody knows these chips, which brought only little insight:
https://old.reddit.com/r/AskElectronics/comments/bs0k3n/someone_heard_of_artery_mcus/
https://old.reddit.com/r/embedded/comments/bs7p1z/xpostsomeone_heard_of_artery_mcus/

@TomTinkering
Copy link

Ah that library is great, that will probably answer most of my questions. Thanks, and good luck

@cloidnerux
Copy link
Author

cloidnerux commented May 25, 2019

The hoverboard hack firmware uses the ST HAL, which isn't provided by Atery.
So it is necessary to look through the files and see where there are differences that need to be patched...
However it seems that only the "low level" functions should be patched to include the differences between the parts?(Not true)

@TomTinkering
Copy link

TomTinkering commented May 26, 2019

I would start from the 3ADCs_DMA example, get it running, integrate PWM, UART and GPIO and then take all the non hardware related bits from the hoverboard-hack. I don't think you can reuse much hardware related stuff, or at least, it will be easier to start from scratch, using the STM32F103 source as a reference.

Then based on an #ifdef or maybe something fancy like a chip-ID at runtime, it should not be too hard to merge the two projects back together.

@cloidnerux
Copy link
Author

cloidnerux commented May 26, 2019

Then based on an #ifdef or maybe something fancy like a chip-ID at runtime, it should not be too hard to merge the two projects back together.

Ok.

I searched a bit for information about the gate driver and it seems to be a copy of the IR2108S

I managed to compile the example code with Keil uVision and upload it with a Segger J-Link, so now I just have to port this to the gcc toolchain

@cloidnerux
Copy link
Author

It was a bit frustrating to be able to flash the AT32 with jlink, as there is little to no information about everything. At this point I found out, that I need a flash loader as the flash is not directly wirtable through SWD. So this is some code that is loaded into ram, then the PC is set to the start of the code, it gets executed and it can copy/verify blocks of code that is also within the RAM, crazy stuff.

Luckily everything necessary is within the uVision support package from Atery, so theoretically I have everything to try it.

Software side I could get the Buzzer to work with uVision, so using the timers is no problem. There are tons of examples in the StdLib, which should make it somewhat easy to port the firmware. However a lot of bits and registers are named differently, so there will be some work to make it compatible.

@cloidnerux
Copy link
Author

I patched the HAl driver to work with the AT32 and could successfully compile it and upload it. I will test it later today.
The code is in my repository
https://github.com/cloidnerux/hoverboard-firmware-hack

@TomTinkering
Copy link

TomTinkering commented Jun 4, 2019

Thanks for posting all the updates here!

@EFeru
Copy link

EFeru commented Jun 4, 2019

@cloidnerux Nice work! Few questions:
At what frequency do you run the AT32?
And is the pinout connections the same as for the STM32 boards? I also ordered the AT32 board. By the way, i made a much beter control for the motors. Maybe you can try and see if you like it. I will make a new commit soon with improvements. You can check it in my repository.
https://github.com/EmanuelFeru/hoverboard-firmware-hack

@cloidnerux
Copy link
Author

Currently, I set 72 MHz to use the same frequency the STM32F103 code does, in case there is some hardcoded frequency dependent stuff.

The pinout is mostly the same. I use the schematic TomTinkering provided, and it seems that the R_MTR_PHB and R_MTR_PHA are swapped and there are no motor current shunts. Also, the LED is missing or is on one of the auxiliary boards.

I had an error in my hardware definition files so my code did not work yesterday, I fixed it but I have to try it today, so hopefully, everything now works as intended and I can test your changes.

@EFeru
Copy link

EFeru commented Jun 5, 2019

Ok. I am curious if you run it at higher frequency, if you get better performance for the new BLDC control that I made.
Just wait for my commit with latest updates. In approx. 2-3 days should be there. I am doing final calibrations and testing.

If no motor current shunts are there, I wonder how do they do the overcurrent protection?

@cloidnerux
Copy link
Author

Currently I try to get it working at all. There are a lot of small details that mess up the port.

Maybe later after everything works I try to increase the freqeuncy, however it only helps so much because there is no reason for the MCU to idle for twice the amount of cycles because the control loops are limited by the motor speed.

I think they just measure the phase current and use this value but I really don't know.

@cloidnerux
Copy link
Author

Yes! It works now. I ported the HAL libraries, so I hope it is quite easy to use the same code for both MCUs.

@EFeru
Copy link

EFeru commented Jun 5, 2019

Nice! Let us know the progress.

@TomTinkering
Copy link

The board has a simple circuit that trips an IO pin on overcurrent, but not also an amplifier connected to and ADC like the stm32/older boards

@EFeru
Copy link

EFeru commented Jun 6, 2019

@cloidnerux The new sinusoidal based BLDC control is committed:
https://github.com/EmanuelFeru/hoverboard-firmware-hack

Feel free to give it a try...and tell me if you hear the sound of silence :)

@cloidnerux
Copy link
Author

I tried it and it works. The motors weren't terrible noisy before, they are not noisy now. They seem to be faster, that could however also be a different setting in the config.h

The wheels seem to "twitch" however in idle. They seem to move a bit forward and backwards.

@EFeru
Copy link

EFeru commented Jun 7, 2019

At what frequency do you run the controller? You might need to re-adjust the following calibratable in BLDC_controller_data.c :

Recalculate (based on your frequency in Hz)

cf_speedCoef    = round(f_ctrl * 4 * (pi/180) * (30/pi));     % [-] Speed calculation coefficient (factors are due to conversions rpm <-> rad/s) 4 = MechanicalAngle`

Examples:
cf_speedCoef = 11111 for f_ctrl ~= 16000 Hz (default)
cf_speedCoef = 5333 for f_ctrl = 8000 Hz
and so on.

And you might need some adjustmenst on:

dz_counterHi    = 50;       % [-] Counter gradient High. Above this value the control resets to Commudation method (to deal with the high dynamics)
dz_counterLo    = 20;       % [-] Counter gradient Low. Below this value the control authorizes the Advance method (high dynamics have passed)

Then it should be ok. Does it run well (silent) for higher speeds?

  • EDIT:
    You can measure the DMA interrupt frequency by toggling the LED pin (or another pin) in DMA1_Channel1_IRQHandler() in bldc.c. Then with an oscilloscome measure the time between pulses = Ts_ctrl. Then f_ctrl = 1/Ts_ctrl.

@cloidnerux
Copy link
Author

I changed the cf_speedCoef to match the control loop frequency and it worked a bit better. However, after some time of idling it starts to twitching again. Is there some I-loop running wild?

@EFeru
Copy link

EFeru commented Jun 7, 2019

No, it is all open loop and I do not have any Integral action. Is it possible to make a short movie with the behavior?

@cloidnerux
Copy link
Author

No, it is all open loop and I do not have any Integral action. Is it possible to make a short movie with the behavior?

I will make a video as soon as I am able to, unfortunately, this will probably be Tuesday.

@EFeru
Copy link

EFeru commented Jun 7, 2019

@cloidnerux This is how the motors work for me with the code from my main branch (for reference)
https://photos.app.goo.gl/E38ZATYqnf8wf9tE6

And comparison with Commutation method (1st half = commutation; 2nd half = Sinusoidal 3rd harmonic)
https://drive.google.com/file/d/1vC_kEkp2LE2lAaMCJcmK4z2m3jrPUoBD/view

@cloidnerux
Copy link
Author

Here is a video of the old bldc controller:
https://youtu.be/Vn0n6_TUgWo

Here is a video of the new bldc controller:
https://youtu.be/eXSLYO_MpYY

Here is a video of the wheels jittering while idle:
https://youtu.be/7B-F05YvMEU

I think I saw some jittering with the old controller too, however not that strong. I also think that the wheels spin faster with the new bldc controller. The new controller seems to be a bit less noisy, however, I not that much. It might be due to the gate drivers, that there is less switching noise.

@EFeru
Copy link

EFeru commented Jun 11, 2019

@cloidnerux First of all, very nice setup! I like it... It's very nice, especially with those offroad wheels ;)

  • Regarding the jittering issue. That is most probably from your input. What input mode do you use: Potentiometer, PPM... ? However, the input at 0 is not a perfect 0, so you get small movements. You will not see them when the vehicle is on the ground.

  • Solution_1: If you what to minimize them you need to apply more filtering on the input. So, go in config.h and modify
    #define FILTER 0.1f // lower value == softer filter. do not use values <0.01, you will get float precision issues.
    Put something like 0.05f. Try different numbers and see which one is better (lower value = less jitter but slower response to input, higher value = more jitter but faster response to input).

  • Solution_2: Add a dead band. So, if your -eps<inputRaw<eps, where eps is a small number, then input = 0, else input = inputRaw

Overall, I think it is a good behavior. For me looks improved compared to old method. It does not excite those vibrations (at medium speed) as the old controller does. Currently, I am working on improving even further the dynamic behavior, so stay tuned for an update.

@cloidnerux
Copy link
Author

I added a dead band, but it does not help. I don't think it is really a dead band issue, as it only starts after some time stopping. However, it isn't that big of a problem, as it is hardly noticeable during normal operation.

@TomTinkering
Copy link

@cloidnerux I finally had some time to work on my own board. Thanks a lot for sharing the port and info on flashing the chip, that saved me a ton of time. Evenything seems to run (interrupt gets executed, buzzer works, I can step through the code), except for the PWM outputs. pwml/r are being set, and the BLCD step returns with values that seem to make sense, but nothing happens on the PWM outputs. I double checked this with a logic analyzer. Have you maybe run into the same problem? Otherwise I will just continue debugging :)

@EFeru
Copy link

EFeru commented Jun 27, 2019

@TomTinkering

Please see below the correct mapping of current phases thanks to STM Studio logging (amazing tool). (The mapping is from my STM32 board). Also the same comment can be found here #41.

Data below is real measured data (not simulation).

LEFT motor (long wired motor)

Motor_LEFT_SIN3

Mapping:
Phase A current: adc_buffer.rl1 (flipped)
Phase B current: adc_buffer.rl2 (flipped)

RIGHT motor (short wired motor)

Motor_RIGHT_SIN3

Mapping:
Phase B current: adc_buffer.rr1 (flipped)
Phase C current: adc_buffer.rr2 (flipped)

Important Note: The sign of all phase current measurements is flipped:

  • positive PWM command = negative current measurement
  • negative PWM command = positive current measurement

@juodumas
Copy link

@TomTinkering / @EmanuelFeru
Sorry to bother you, but a question about AT32F403RCT6 boards - looks like they are becoming more popular.

So my question: if you manage to implement FOC control, will it be portable to AT32F403RCT6 (i.e. no hw limitations)?

I have ordered 2 YST boards with GD32F103 (according to product photo), but seller sent me AT32F403RCT6...

@EFeru
Copy link

EFeru commented Jul 14, 2019

@juodumas

So my question: if you manage to implement FOC control, will it be portable to AT32F403RCT6 (i.e. no hw limitations)?

Yes, it will be portable. From HW point of view I will use the measured Phase currents, which are available in YST board too. And there will be more calculations, but this was expected.

This board that I ordered from Aliexpress was a GD board. Shipping was fast and quality was also good. I recommend.

@lacrimosa2k2
Copy link

Hello,
i have the same board and trying it to flash, but whatelse i am doing i cannot connect with a st-link v2 to the board.
when i try to connect with the st-utility it beeps and reset
i cant find any information about that, what do i wrong?

@cloidnerux
Copy link
Author

Hi,

did you read my information in my fork?
https://github.com/cloidnerux/hoverboard-firmware-hack
The SWD pins have a different order. You also have to patch something to make the ST-Link work with OpenOCD and the AT32.

Lastly you have to hold the power button to not power cycle the system during a MCU reset.

@lacrimosa2k2
Copy link

lacrimosa2k2 commented Feb 2, 2020

Hi,

did you read my information in my fork?
https://github.com/cloidnerux/hoverboard-firmware-hack
The SWD pins have a different order. You also have to patch something to make the ST-Link work with OpenOCD and the AT32.

Lastly you have to hold the power button to not power cycle the system during a MCU reset.

i have a brige in the power button that is correct?
yes that i found out that the connectors on the board different.

in your fork you write "Or use the Windows ST-Link utility" thats old from the stm32?

i have try it with the st tool on windows.
i testet it with the st-link under linux, but i dont understand how to patch the openocd/st-link can you explain me this? or files that ready to compile?
st-link -- probe brings only this
Found 1 stlink programmers
serial: 343d050232123853354b4e00
openocd: "\x34\x3d\x05\x02\x32\x12\x38\x53\x35\x4b\x4e\x00"
flash: 0 (pagesize: 0)
sram: 0
chipid: 0x0000
descr: unknown device

@IzidorM
Copy link

IzidorM commented Mar 5, 2020

Just wondering. Is anybody replaced the AT32F403RCT6
with the old stm32f103 on the new board?

@Rettigran
Copy link

hi
i am building one wheels, connecting both wheels toghter to be controlled by same dougther board .
before i used the ARM controller yst dxt j20 v5.5 , and connected the 2 dougther bords together by connecting the green and yellow wires on both 4wire connectors.
i just got this new controller , and could not find the wiring diagram.
does anybody has one? has anybody connected this type in this way?

@123JRM
Copy link

123JRM commented May 26, 2021

I was not able to program the AT32. Like Izidor I am tempted to just replace this AT with an ST chip and be done with it. it's a lot easier for me to do some SMD rework than fight with a chip for which there is little documentation. checking if the pins match .. anyone do this yet ?

@123JRM
Copy link

123JRM commented May 26, 2021

@Brnpimenta
Copy link

Hello!
Anyone flashed and reprogramed using st-link?

@Velix762
Copy link

Velix762 commented Jul 8, 2021

Hello!
I have the same board and i can't figure it out how to flash it . I got it connected to my pc and stlink utility sees it but can't connect . My question is does anybody know of a video or a step by step quide how to set it up . (i have never used OpenOCD or gcc-arm-none-eabi binary)

@Brnpimenta
Copy link

Velix762,
I'm still stuck on this.

@cloidnerux
Copy link
Author

You have to compile your own version of OpenOCD with the path described here:
bipropellant/bipropellant-hoverboard-firmware#67 (comment)

It is not that complicated as there is a makefile for the OpenOCD code.

With the patched OpenOCD you can just use
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "mww 0x40022004 0x45670123" -c "mww 0x40022004 0xCDEF89AB" -c "mww 0x40022008 0x45670123" -c "mww 0x40022008 0xCDEF89AB" -c targets -c "halt" -c "stm32f1x unlock 0"
The ST-Link utility does not work, but doing this little bit of manual work is not that hard.

@leChrisLessieur
Copy link

Hi all,
Did someone manage to flash an AT32 motherboard with an ST-link v2 ?
It seems pretty tricky, even with Cloidnerux advices on OpenOCD patch ...

@juodumas
Copy link

I am using this patch with https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/:
0001-Support-for-board-with-AT32F403-CPU.txt

Only sinusoidal control is working. Current limiting is not working.
I am flashing with openocd: openocd -f interface/stlink-v2.cfg -f target/stm32f3x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0" -c "flash write_image erase $(BUILD_DIR)/$(TARGET).hex 0 ihex" -c "shutdown"

@Brnpimenta
Copy link

Hello,
can anybony describe step by step (like youtube video) on how to reprogram an AT32 motherboard with an ST-link v2?

still stuck on this! looking foward to solve it.

Regards,
Bruno O.

@leChrisLessieur
Copy link

leChrisLessieur commented Aug 12, 2021

Thanks, Juodumas, for your response.

Maybe I'm doing something wrong around openocd.
Would you mind giving your opignon on this ?

I use a raspberry pi with debian (raspbian) and an ST-link v2 usb stick.
I try to flash an AT32F403 motherboard.

So, I downloaded the lastest version of openocd and modified the file stm32f1x.c as describe here.
That only add an case (0x242), right ?
Then I ./configure, make and then make install

When I try to use openocd I get an error :

Open On-Chip Debugger 0.11.0+dev-00294-g3d9534b8a-dirty (2021-08-11-14:38) Licensed under GNU GPL v2
Error: The specified debug interface was not found (hla)
The following debug adapters are available: 1: jlink 2: buspirate
Does it mean that my st-link usb stick is not reconized ?
I tried with root permission, also.

Maybe I forgot something ?

Thanks for your help.

Another point :
The command to flash using openocd refere to the file interface/stlink.cfg
This file contains HLA PID (??) but not the one we add in the "case" to patch openocd
Is that a hint ?

interface/stlink.cfg :
adapter driver hla
hla_layout stlink
hla_device_desc "ST-LINK"
hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753

@juodumas
Copy link

@leChrisLessieur what happens when you use openocd that is shipped with raspbian and execute the openocd command that I posted above? If it's not working, then yes, you probably need to patch openocd. I do not remember the details because it's been a while, but I have used the below patch by sjamthe. In your case your openocd complains about missing interfaces. Most probably you have configured it incorrectly (check ./configure --help before compiling) or didn't install some parts.

diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c
index cf10e374..a5b69952 100644
--- a/src/flash/nor/stm32f1x.c
+++ b/src/flash/nor/stm32f1x.c
@@ -728,6 +728,27 @@ static int stm32x_probe(struct flash_bank *bank)

        /* set page size, protection granularity and max flash size depending on family */
        switch (device_id & 0xfff) {
+        case 0x240: /* AT32F403 added by sjamthe */
+                LOG_WARNING("Found 0x700 for ATF32F403");
+                // BAD
+                /* page_size = 2048; */
+                /* stm32x_info->ppage_size = 2; */
+                /* page_size = 1024; */
+                /* stm32x_info->ppage_size = 2; */
+                /* page_size = 1024; */
+                /* stm32x_info->ppage_size = 4; */
+                /* page_size = 2048; */
+                /* stm32x_info->ppage_size = 4; */
+                page_size = 2048;
+                stm32x_info->ppage_size = 2;
+                max_flash_size_in_kb = 256;
+                break;
+        case 0x242: /* AT32F403 added by sjamthe */
+                LOG_WARNING("Found 0x700 for ATF32F403");
+                page_size = 2048;
+                stm32x_info->ppage_size = 2;
+                max_flash_size_in_kb = 512;
+                break;
        case 0x410: /* medium density */
                page_size = 1024;
                stm32x_info->ppage_size = 4;

@Brnpimenta
Copy link

Brnpimenta commented Aug 14, 2021

Hello Guys,
I'm using the ubuntu running on vm and st linkv2, the steps I go through were below,

What other programs I need to install and other steps? like gcc, stlink utility, etc...
Please let me know, my email is [email protected] if you want to contact me direct, I'll create a detailed instructions of the procedure to reprogram the hoverboard which uses at32f403 chip.
step 1:
Create folder hoverboard/orig/opencd
Step 2:
Download Openocd openocd-0.11.0.tar.bz2
At hoverboard /orig/opencd
Step 3:
install openocd-0.11.0.tar.bz2
At HOVERBOADsrc/opencd/openocd-0.11.0
Step 4:
Enter At HOVERBOADsrc/opencd/openocd-0.11.0
Press ./configure--enabe-stlink

image

/
Step 5:
At hoverboard/src/opencd/openocd-0.11.0/ src/flash/nor/stm32f1x.c
Add the command (

case 0x242: /* AT32F403 */
page_size = 2048;
stm32x_info->ppage_size = 2;
max_flash_size_in_kb = 512;
break;

image

Regards,

Bruno Oliveira

@Brnpimenta
Copy link

Brnpimenta commented Aug 29, 2021

Guys,

1 - Created folder hoverboard/orig and downloaded the openocd in the link below:
https://sourceforge.net/projects/openocd/files/openocd/0.11.0/

2 - Create folder hoverboard/scr/openocd
Export openocd from hoverboard/orig
to
hoverboard/scr/openocd

3 - Change the file src/flash/nor/stm32f1x.c
Adding the code:
case 0x242: /* AT32F403 */
page_size = 2048;
stm32x_info->ppage_size = 2;
max_flash_size_in_kb = 512;
break;

4 - go to terminal in the hoverboard/scr/openocd/openocd/0.11.0/
execute the command
sudo apt-get install build-essential
.configure –enable-stlink
sudo apt-get install libusb-1.0.0-dev

after that execute again the command

.configure –enable-stlink

Final message will be presented:

image

got the following error after execute the command:
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0"

image

anyone knows what to do to move foward?

Regards,

Bruno Oliveira

@svenssonjoel
Copy link

Guys,

1 - Created folder hoverboard/orig and downloaded the openocd in the link below:
https://sourceforge.net/projects/openocd/files/openocd/0.11.0/

2 - Create folder hoverboard/scr/openocd
Export openocd from hoverboard/orig
to
hoverboard/scr/openocd

3 - Change the file src/flash/nor/stm32f1x.c
Adding the code:
case 0x242: /* AT32F403 */
page_size = 2048;
stm32x_info->ppage_size = 2;
max_flash_size_in_kb = 512;
break;

4 - go to terminal in the hoverboard/scr/openocd/openocd/0.11.0/
execute the command
sudo apt-get install build-essential
.configure –enable-stlink
sudo apt-get install libusb-1.0.0-dev

after that execute again the command

.configure –enable-stlink

Final message will be presented:

image

got the following error after execute the command:
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0"

image

anyone knows what to do to move foward?

Regards,

Bruno Oliveira

If you have "open failed" maybe that can be because of access rights to the usb device? Maybe there is a specific group you need to be in to access it or you may need to set up UDEV rules?

@Brnpimenta
Copy link

yes,

exactly I rerun the udev rules.
I'm using ubuntu and latest version openocd 0.11.0. I finally make the board listening to the port 6666 and 4444.
what is the next step? how do I upgrade the firmware? is openocd necessary only to unlock the board?

image

image

After perform it I'll do a step-by-step to all users won't be stuck on this like I did.

Regards,
Bruno Oliveira

@Brnpimenta
Copy link

Brnpimenta commented Sep 11, 2021

Hey Guys,
trying the next steps.
1 - installed gcc-arm-none-eabi and
2 - downloaded the firmware of https://github.com/cloidnerux/hoverboard-firmware-hack.
3 - specified the location of gcc-arm-none in the file makefile of https://github.com/cloidnerux/hoverboard-firmware-hack previoes downloaded
4 - executed the command make AT32, got the error:

collect2: error: ld returned 1 exit status
make: *** [Makefile:224 build/hover.elf] Erro 1

image

any insight how to solve it?

@123JRM
Copy link

123JRM commented Sep 11, 2021 via email

@Brnpimenta
Copy link

Brnpimenta commented Sep 11, 2021

hey @123JRM / jeffrey,

the image didn't show up.

Regards,

Bruno Oliveira

@123JRM
Copy link

123JRM commented Sep 11, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests