Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

themax
Posts: 6
Joined: Sat Jun 29, 2019 10:10 am

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby themax Sat Jun 29, 2019 10:16 am

Hi:

I tried to flash an ES2 board, double checked the wiring and looks correct, but when triying to run the program command i get an error:

Code: Select all

telnet localhost 4444 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > > > program full_BLE.bin Could not find MEM-AP to control the core Target not examined, reset NOT asserted! embedded:startup.tcl:449: Error: ** Unable to reset target ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 474 at file "embedded:startup.tcl", line 449

A quick search shows that this error may be due to some kind of write protection.

Does this mean it cannot be programmed or is there any procedure?
Donnydingel
Posts: 11
Joined: Fri Apr 12, 2019 7:02 pm

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby Donnydingel Tue Jul 02, 2019 1:34 pm

Hi:

I tried to flash an ES2 board, double checked the wiring and looks correct, but when triying to run the program command i get an error:

Code: Select all

telnet localhost 4444 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > > > program full_BLE.bin Could not find MEM-AP to control the core Target not examined, reset NOT asserted! embedded:startup.tcl:449: Error: ** Unable to reset target ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 474 at file "embedded:startup.tcl", line 449

A quick search shows that this error may be due to some kind of write protection.

Does this mean it cannot be programmed or is there any procedure?
Did you remove C15? Clone or OEM version?
themax
Posts: 6
Joined: Sat Jun 29, 2019 10:10 am

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby themax Wed Jul 03, 2019 11:05 am

Did you remove C15? Clone or OEM version?
OEM version, C15 removed.

I was trying a Ubuntu install but then I thought it could be part of the issue, so i tried again with a new install of Raspbian, and there was some advance, as the programming seemed to begin but had a new error (posted it before in the non-raspberry thread as it seemed not to be raspi related)

Code: Select all

> program full_BLE.bin target halted due to debug-request, current mode: Thread xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc ** Programming Started ** SWD DPIDR 0x0bb11477 Failed to read memory at 0x4001e400 Couldn't read NVMC_READY register Failed to erase reg: 0x4001e508 val: 0x00032800 failed erasing sectors 0 to 255 embedded:startup.tcl:449: Error: ** Programming Failed ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 508 at file "embedded:startup.tcl", line 449
Searching for this error, it seems to be wiring related, but as long as I can test is fine. Just tested with a voltimeter and see that 3.3v line is good (actually its 3,27) but I don't know if I can test something else. Should it light up, beep or something to give a clue?

Also have noticed that now when I launch openocd (It must be run as root, so sudo openocd) I get a message that didn't have before. Sorry I have no access to the system right now, something like "Chip model XXXXXX detected".


Anyway I will try to solder the points again as soon as I have some free time.

Edit: got the time to solder again, this is what i get when launch openocd:

Code: Select all

sudo openocd Open On-Chip Debugger 0.10.0+dev-00920-g6ea43726 (2019-07-02-10:38) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : BCM2835 GPIO JTAG/SWD bitbang driver Info : JTAG and SWD modes enabled Info : clock speed 1001 kHz Info : SWD DPIDR 0x0bb11477 Info : nrf51802.cpu: hardware has 4 breakpoints, 2 watchpoints Error: nrf51802.cpu -- clearing lockup after double fault Polling target nrf51802.cpu failed, trying to reexamine Info : nrf51802.cpu: hardware has 4 breakpoints, 2 watchpoints Info : Listening on port 3333 for gdb connections TargetName Type Endian TapName State -- ------------------ ---------- ------ ------------------ ------------ 0* nrf51802.cpu cortex_m little nrf51802.cpu halted Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections

So new programming attempt:

Code: Select all

> program full_BLE.bin target halted due to debug-request, current mode: Thread xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc ** Programming Started ** Unknown device (HWID 0x000000d2) not enough working area available(requested 32) no working area available, falling back to slow memory writes SWD DPIDR 0x0bb11477 Failed to write memory at 0x0003d0ec Failed to write to nrf5 flash error writing to flash at address 0x00000000 at offset 0x00000000 embedded:startup.tcl:449: Error: ** Programming Failed ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 508 at file "embedded:startup.tcl", line 449
User avatar
UgloBuglo
Posts: 24
Joined: Sat Jul 13, 2019 9:40 pm
Location: Sweden

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby UgloBuglo Wed Jul 17, 2019 8:11 am

Thanks for this guide!
Unfortunately I get a Low Voltage error on my Pi when connecting my dashboard, and I am at my summer house for vacation so I don't have a stronger power supply at hand - I would have thought that 2.1A (I use an old IPad charger) would be enough, but apparently not when powering both the Pi and the dashboard.
Donnydingel
Posts: 11
Joined: Fri Apr 12, 2019 7:02 pm

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby Donnydingel Sat Jul 20, 2019 8:38 pm

Lots of text...
Did you try to erase it? As In "the clone step" ?
User avatar
UgloBuglo
Posts: 24
Joined: Sat Jul 13, 2019 9:40 pm
Location: Sweden

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby UgloBuglo Sat Jul 27, 2019 8:46 pm

I couldn't get it to work on a RPi3, and some google-fu seems to indicate that there indeed are some issues with openocd on RPi3.
Switched to a RPi2B and it worked flawlessly!

Now I just need to find the time to put the scooter back together and test to flash a CFW over bluetooth.
themax
Posts: 6
Joined: Sat Jun 29, 2019 10:10 am

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby themax Mon Jul 29, 2019 9:45 am

Lots of text...
Did you try to erase it? As In "the clone step" ?
Yes I did, it seemed to go one step further but failed anyway.

I'm waiting for a programer now so I can discard it's a RPI3 issue as UgloBuglo says.

I'm starting to think that theres some "manufacturer locking" to avoid reprogramming. But is this even possible?

Edit: My programmer has just arrived and it worked, got the dashboard flashed in a couple of seconds so it seems that RPI3 is not 100% compatible with this method. I tried Ubuntu and Raspbian installations with similar results.

I have other issues now, But that's another story and shall be told another time :lol:
Donnydingel
Posts: 11
Joined: Fri Apr 12, 2019 7:02 pm

Re: Flash using Raspberry Pi 3 - GUIDE UPDATED (Incl. clone)

Postby Donnydingel Thu Aug 01, 2019 12:56 pm

I'm waiting for a programer now so I can discard it's a RPI3 issue as UgloBuglo says.

Edit: My programmer has just arrived and it worked, got the dashboard flashed in a couple of seconds so it seems that RPI3 is not 100% compatible with this method. I tried Ubuntu and Raspbian installations with similar results.
I couldn't get it to work on a RPi3, and some google-fu seems to indicate that there indeed are some issues with openocd on RPi3.
Switched to a RPi2B and it worked flawlessly!
As long as you got it working in some way! :D My RPi3 worked, wierd yours didnt :?

Return to “Ninebot ES and E-series”

Who is online

Users browsing this forum: No registered users and 49 guests