Bricked by custom app - how to recover?

Support for creating custom user applications on the VESC.
jenkie2
Posts: 9
Joined: 22 Dec 2015, 14:00

Bricked by custom app - how to recover?

Postby jenkie2 » 26 Feb 2016, 22:15

I am currently trying to write some custom application on a VESC (trying to read from a HX711 load cell amplifier).
Since I switched to the custom app last time, the VESC does not boot any more: No vid/pid information is sent to the host pc, so USB communication is not possible any more.

Does anyone have an idea how to unbrick the VESC? Is there a way for programming other than USB?

Background on what I changed:
- activated GPT driver
- activated GPT use TIM14 in mcuconf.h
- set timer frequency to 100 kHz via

Code: Select all

static const GPTConfig gpt14cfg = {
  100000,
  NULL,
  0, 0
};

Then i use

Code: Select all

gptPolledDelay(&GPTD14, 2);
to get short delays for clocking the HX711 serial communication.
Everything worked fine until I increased TIM14 frequency to 1 MHz.

barney
Posts: 22
Joined: 23 Dec 2015, 08:21

Re: Bricked by custom app - how to recover?

Postby barney » 27 Feb 2016, 13:28

Hi jenkie2,

Welcome to the club. I have started code attempts at Nunchuk and frozen the STM for a USB download.
Also, an attempt to achieve the STM by the STM-linker v2 was not possible. Last Hope is a programming attempt by JTAG.

Barney

jenkie2
Posts: 9
Joined: 22 Dec 2015, 14:00

Re: Bricked by custom app - how to recover?

Postby jenkie2 » 27 Feb 2016, 14:42

Do you mean this programmer? This should support flashing the STM32 via P2 on the VESC, right?

I think I will get one or a copy and give it a try.

dpetrillo
Posts: 25
Joined: 24 Dec 2015, 01:47

Re: Bricked by custom app - how to recover?

Postby dpetrillo » 28 Feb 2016, 04:26

Could you post the rest of the code that you were using for communicating with the HX711? That chip requires special timing in order to read it and I've been trying to use it also, but without success. I never found an ARM library for it, just AVR and the datasheet is in chinese.

Thanks

barney
Posts: 22
Joined: 23 Dec 2015, 08:21

Re: Bricked by custom app - how to recover?

Postby barney » 28 Feb 2016, 10:57

jenkie2 wrote:Do you mean this programmer? This should support flashing the STM32 via P2 on the VESC, right?

I think I will get one or a copy and give it a try.


Yes.
But you must connected direct to the STM by JTAG. There is no port on VESC.

jenkie2
Posts: 9
Joined: 22 Dec 2015, 14:00

Re: Bricked by custom app - how to recover?

Postby jenkie2 » 01 Mar 2016, 21:05

It worked!
Software used: STM32 ST-Link Utility (Windows)
Programmer: ST-Link V2 clone
Connected programmer Pins (all to P2 on the VESC): RST, SWDIO, SWCLK, GND

With this combination I just uploaded the usual firmware file and everything is working again.


Return to “Custom Applications”

Who is online

Users browsing this forum: No registered users and 1 guest