firmware fail

General topics and discussions about the VESC and its development.
Rallye82
Posts: 21
Joined: 28 Jun 2016, 09:48
Location: ÅLESUND, Norway
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

firmware fail

Postby Rallye82 » 05 Jul 2016, 22:51

parallels@ubuntu:~/bldc/BLDC-firmware$ make upload
#qstlink2 --cli --erase --write build/BLDC_4_ChibiOS.bin
#openocd -f interface/stlink-v2.cfg -c "set WORKAREASIZE 0x2000" -f target/stm32f4x_stlink.cfg -c "program build/BLDC_4_ChibiOS.elf verify reset" # Older openocd
openocd -f board/stm32f4discovery.cfg -c "reset_config trst_only combined" -c "program build/BLDC_4_ChibiOS.elf verify reset exit" # For openocd 0.9
Open On-Chip Debugger 0.7.0 (2013-10-22-08:31)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
trst_only combined trst_push_pull
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v23 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : Target voltage: 3.271562
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: BUG: can't assert SRST
Error: TRST/SRST error
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
auto erase enabled
Error: Invalid command argument
image.base_address option value ('exit') is not valid
** Programming Failed **
shutdown command invoked
parallels@ubuntu:~/bldc/BLDC-firmware$


Anyone has any idea?
the bootloader seems to load fine.


Regards
Øystein
Regards
Øystein N

david
Posts: 36
Joined: 15 Dec 2015, 13:19
Location: Hamburg, Germany
Contact:

Re: firmware fail

Postby david » 06 Jul 2016, 06:12

Have a look here, you need to comment/uncomment some lines in the makefile for your STlink to work:
viewtopic.php?f=6&t=197
VESCs made in Germany

Rallye82
Posts: 21
Joined: 28 Jun 2016, 09:48
Location: ÅLESUND, Norway
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: firmware fail

Postby Rallye82 » 06 Jul 2016, 07:04

Hi, thanks for the tips.

i stayed up way past bedtime last night, and found the same thread that you linked.
that made it work. :mrgreen:

but now i`ve got some different problems. but did not get to troubleshoot those problems yesterday.

when i loaded the firmware, i did not power up the VESC. supplying it only with 3.3V from the programmer.
but when i succsessfully got the firmware to load, and the bootloader. i tried to power the VESC with a 4S lipo battery. and plugging inn the usb.
then i open BLDC-tool, but the USB did not get recognized by my computer(as if i plugged the usb cable into the computer with nothing in the other end). Only when i supplied the VESC with 3.3V from the programmer. would the PC recognize the VESC an BLDC-tools could get connected.

If you understand my problem, do you think it might be some problems with the U2 3.3VREG?
seems like the microcontroller dont se any power when connected to main power source.
Regards
Øystein N

david
Posts: 36
Joined: 15 Dec 2015, 13:19
Location: Hamburg, Germany
Contact:

Re: firmware fail

Postby david » 06 Jul 2016, 07:17

I think switching the USB cable could help, but it could also be related to using Parallels. Sometime Parallels doesn't recognize the ports very well.

Edit: else rew is right! ;)
Last edited by david on 06 Jul 2016, 07:18, edited 1 time in total.
VESCs made in Germany

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: firmware fail

Postby rew » 06 Jul 2016, 07:17

The power from the battery ends up as the 1.2V that makes the CPU run in three steps.

First there is the stepdown in the DRV chip. Thats one end of the DRV chip, some capacitors, resistors and an inductor. That makes 5V. Check the 5V. For example, you should be able to find 5V on one of the connectors for easy access.

Then there is a 3.3V regulator. If you looked it up and say it's called u2, I believe you. Check the 3.3V. It's also available on the programming connector for easy access....

Then there is the 1.2V regulator. Its builtin to the CPU. It works. You already tested that. :-)

Rallye82
Posts: 21
Joined: 28 Jun 2016, 09:48
Location: ÅLESUND, Norway
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: firmware fail

Postby Rallye82 » 06 Jul 2016, 07:46

Regards
Øystein N

Rallye82
Posts: 21
Joined: 28 Jun 2016, 09:48
Location: ÅLESUND, Norway
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: firmware fail

Postby Rallye82 » 06 Jul 2016, 07:49

Regards
Øystein N

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: firmware fail

Postby rew » 07 Jul 2016, 05:41

Well that sort of shorts out the 5V output of the DRV stepdown converter. I know the DRV chip as a finicky chip: It blows itself up if you do anything wrong.... It could be that the dcdc part survives shorting the output. Or it could not.... I don't know....

Rallye82
Posts: 21
Joined: 28 Jun 2016, 09:48
Location: ÅLESUND, Norway
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: firmware fail

Postby Rallye82 » 07 Jul 2016, 07:37

After some hours troubleshooting, i found that it was a bad soldering on som of the pins on the DRV, and one of them was pin 29. reflowing the chip made it work perfectly.

so now that i`ve got one done, i can start on the second one. :D
Regards
Øystein N

rew
Posts: 943
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Re: firmware fail

Postby rew » 07 Jul 2016, 09:50

Good news! And thanks for letting know what the problem was. We all like to learn from other's mistakes to prevent making all of them ourselves.... :-)


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1236: count(): Parameter must be an array or an object that implements Countable

Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests