TSDZ2 EBike wireless standard (like Specialized Turbo Levo) - OpenSource

I will be testing the latest firmware on repository to make a new release, so, I hope I can find (or not) that issue and then I hope to be able to find more clues about it.
 
casainho said:
I will be testing the latest firmware on repository to make a new release, so, I hope I can find (or not) that issue and then I hope to be able to find more clues about it.

Thank you
 
rananna said:
Filippods said:
casainho said:
I will be testing the latest firmware on repository to make a new release, so, I hope I can find (or not) that issue and then I hope to be able to find more clues about it.

Thank you
I have a hunch I want to check.
Could you please try this file?TSDZ2_wireless_ota_update.zip

I've flashed this firmware with 0.9 bootloader and the one you linked yesterday, in both cases the leds don't blink and the device is not listed.

The leds blinked only one time, yesterday, after i've flashed for the first time via OTA the bootloaer v0.9: red led blinking.

There is a way to flash both firmware and bootloader via st-link etc..?

I would be of more help...
 
Filippods said:
rananna said:
Filippods said:
casainho said:
I will be testing the latest firmware on repository to make a new release, so, I hope I can find (or not) that issue and then I hope to be able to find more clues about it.

Thank you
I have a hunch I want to check.
Could you please try this file?TSDZ2_wireless_ota_update.zip

I've flashed this firmware with 0.9 bootloader and the one you linked yesterday, in both cases the leds don't blink and the device is not listed.

The leds blinked only one time, yesterday, after i've flashed for the first time via OTA the bootloaer v0.9: red led blinking.

There is a way to flash both firmware and bootloader via st-link etc..?

I would be of more help...
lets wait for the release coming soon - that way we are all on the same page.
It makes debugging much easier.
 
rananna said:
Filippods said:
rananna said:
Filippods said:
Thank you
I have a hunch I want to check.
Could you please try this file?TSDZ2_wireless_ota_update.zip

I've flashed this firmware with 0.9 bootloader and the one you linked yesterday, in both cases the leds don't blink and the device is not listed.

The leds blinked only one time, yesterday, after i've flashed for the first time via OTA the bootloaer v0.9: red led blinking.

There is a way to flash both firmware and bootloader via st-link etc..?

I would be of more help...
lets wait for the release coming soon - that way we are all on the same page.
It makes debugging much easier.
It would be helpful if you could post the log file from nrf connect.
To do this select in the upper right corner menu 'show log' - delete in lower right corner first, then run a dfu as before.
You should see something like this:
View attachment logpdf.pdf
 
rananna said:
rananna said:
Filippods said:
rananna said:
I have a hunch I want to check.
Could you please try this file?TSDZ2_wireless_ota_update.zip

I've flashed this firmware with 0.9 bootloader and the one you linked yesterday, in both cases the leds don't blink and the device is not listed.

The leds blinked only one time, yesterday, after i've flashed for the first time via OTA the bootloaer v0.9: red led blinking.

There is a way to flash both firmware and bootloader via st-link etc..?

I would be of more help...
lets wait for the release coming soon - that way we are all on the same page.
It makes debugging much easier.
It would be helpful if you could post the log file from nrf connect.
To do this select in the upper right corner menu 'show log' - delete in lower right corner first, then run a dfu as before.
You should see something like this:
logpdf.pdf
 

Attachments

  • Firmware.txt
    39 KB · Views: 24
  • Bootloader.txt
    100.5 KB · Views: 12
I have had similar problems programming several dongles.

The only way I got them to work correctly was to mass erase the dongle before the bootloader is programmed. Something in the DFU loaded firmware doesn’t work correctly unless this has been done.

The Linux instructions include this mass erase step but the Windows ones do not. You might need to revert back to using telnet on Windows as I don’t think the mass erase command can be appended to the command line.

Colin.
 
I have the wireless remote enclosure mostly designed - the most difficult parts are already done!!

Here is the current state - I hope to finish this weekend:



 
g4eml said:
I have had similar problems programming several dongles.

The only way I got them to work correctly was to mass erase the dongle before the bootloader is programmed. Something in the DFU loaded firmware doesn’t work correctly unless this has been done.

The Linux instructions include this mass erase step but the Windows ones do not. You might need to revert back to using telnet on Windows as I don’t think the mass erase command can be appended to the command line.
We had this issue when we started developing and the mass erase was the solution!! anyone with windows that can test adding the mass erase command? just compare with the instructions for Linux as the command should be just equal to mass erase!!
 
casainho said:
g4eml said:
I have had similar problems programming several dongles.

The only way I got them to work correctly was to mass erase the dongle before the bootloader is programmed. Something in the DFU loaded firmware doesn’t work correctly unless this has been done.

The Linux instructions include this mass erase step but the Windows ones do not. You might need to revert back to using telnet on Windows as I don’t think the mass erase command can be appended to the command line.
We had this issue when we started developing and the mass erase was the solution!! anyone with windows that can test adding the mass erase command? just compare with the instructions for Linux as the command should be just equal to mass erase!!

For windows try this openocd.cfg file. Drop it in the same folder as the openocd binary and run openocd. Edit the first few lines if your filename isn't correct.

https://raw.githubusercontent.com/4...c230a8c6c230a149854650bbe3e2c7f92/openocd.cfg
 
Filippods said:
rananna said:
rananna said:
Filippods said:
I've flashed this firmware with 0.9 bootloader and the one you linked yesterday, in both cases the leds don't blink and the device is not listed.

The leds blinked only one time, yesterday, after i've flashed for the first time via OTA the bootloaer v0.9: red led blinking.

There is a way to flash both firmware and bootloader via st-link etc..?

I would be of more help...
lets wait for the release coming soon - that way we are all on the same page.
It makes debugging much easier.
It would be helpful if you could post the log file from nrf connect.
To do this select in the upper right corner menu 'show log' - delete in lower right corner first, then run a dfu as before.
You should see something like this:
logpdf.pdf
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?
 
rananna said:
Filippods said:
rananna said:
rananna said:
lets wait for the release coming soon - that way we are all on the same page.
It makes debugging much easier.
It would be helpful if you could post the log file from nrf connect.
To do this select in the upper right corner menu 'show log' - delete in lower right corner first, then run a dfu as before.
You should see something like this:
logpdf.pdf
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?

Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.
 
Filippods said:
rananna said:
Filippods said:
rananna said:
It would be helpful if you could post the log file from nrf connect.
To do this select in the upper right corner menu 'show log' - delete in lower right corner first, then run a dfu as before.
You should see something like this:
logpdf.pdf
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?

Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.
Is there any possibility to try flashing with ubuntu?
 
rananna said:
Filippods said:
rananna said:
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?

Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.
Is there any possibility to try flashing with ubuntu?

I've a VirtualMachine with Debian, is it possible to use it?
 
Filippods said:
rananna said:
Filippods said:
rananna said:
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?

Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.
Is there any possibility to try flashing with ubuntu?

I've a VirtualMachine with Debian, is it possible to use it?
@beemac, could you answer this?
 
Filippods said:
rananna said:
Filippods said:
rananna said:
It would be helpful if you could post the log file from nrf connect.
To do this select in the upper right corner menu 'show log' - delete in lower right corner first, then run a dfu as before.
You should see something like this:
logpdf.pdf
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?

Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.

Doesn't work in what way? Can you paste the output...
 
beemac said:
Filippods said:
rananna said:
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?

Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.

Doesn't work in what way? Can you paste the output...

c:\OpenOCD\bin>openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Info : clock speed 1000 kHz
Info : STLINK V2J35S7 (API v2) VID:pID 0483:3748
Info : Target voltage: 3.208918
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000a80 msp: 0x20000400
** Programming Started **
Info : nRF52840-xxAA(build code: D0) 1024kB Flash, 256kB RAM
Info : Padding image section 0 at 0x00000b00 with 1272 bytes
Info : Flash write discontinued at 0x0002f740, next section at 0x000eb000
Warn : Adding extra erase range, 0x0002f740 .. 0x0002ffff
Error: Error waiting NVMC_READY: generic flash write/erase error (check protection etc...)
Error: Failed to enable read-only operation
Error: Failed to erase reg: 0x4001e508 val: 0x0002e000
Error: Error erasing sector 46
Error: failed erasing sectors 0 to 47
embedded:startup.tcl:509: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 574
at file "embedded:startup.tcl", line 509

c:\OpenOCD\bin>
 
casainho said:
I have the wireless remote enclosure mostly designed - the most difficult parts are already done!!

Here is the current state - I hope to finish this weekend:



looks great!
Have you assembled and tested it yet?
Could you please update the repo with the new files - i would like to look at it.
 
rananna said:
casainho said:
I have the wireless remote enclosure mostly designed - the most difficult parts are already done!!

Here is the current state - I hope to finish this weekend:



looks great!
Have you assembled and tested it yet?
Could you please update the repo with the new files - i would like to look at it.
Well, seems there are very small details to change, things like move parts one millimeter to left or right. So I think it will take one more week to finish all this.

No, I did not assembled yet and I have a problem because I do not have the M2 long screws of 20mm.

I saw that the battery as also the board can move to inside the top printed part so that will make easy to solder all wires and separate from all the printed parts - should make assembly much more easy.

The most recent files, I am being committing but for a specific branch, not master one - so go there and get the files.
 
casainho said:
rananna said:
casainho said:
I have the wireless remote enclosure mostly designed - the most difficult parts are already done!!

Here is the current state - I hope to finish this weekend:



looks great!
Have you assembled and tested it yet?
Could you please update the repo with the new files - i would like to look at it.
Well, seems there are very small details to change, things like move parts one millimeter to left or right. So I think it will take one more week to finish all this.

No, I did not assembled yet and I have a problem because I do not have the M2 long screws of 20mm.

I saw that the battery as also the board can move to inside the top printed part so that will make easy to solder all wires and separate from all the printed parts - should make assembly much more easy.

The most recent files, I am being committing but for a specific branch, not master one - so go there and get the files.
yes I see that thanks!
btw, freecad is quite unstable - lots of crashing!
can the files be used in another viewer?
 
Filippods said:
beemac said:
Filippods said:
rananna said:
These both look normal.
However, as you may have read on the forum above, there is a very good possibility that the flashing issues are caused by windows openocd not properly erasing the nrf52840 dongle.
Are you using windows?
If so, could you please try the file submitted by @beemac?

Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.

Doesn't work in what way? Can you paste the output...

c:\OpenOCD\bin>openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Info : clock speed 1000 kHz
Info : STLINK V2J35S7 (API v2) VID:pID 0483:3748
Info : Target voltage: 3.208918
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000a80 msp: 0x20000400
** Programming Started **
Info : nRF52840-xxAA(build code: D0) 1024kB Flash, 256kB RAM
Info : Padding image section 0 at 0x00000b00 with 1272 bytes
Info : Flash write discontinued at 0x0002f740, next section at 0x000eb000
Warn : Adding extra erase range, 0x0002f740 .. 0x0002ffff
Error: Error waiting NVMC_READY: generic flash write/erase error (check protection etc...)
Error: Failed to enable read-only operation
Error: Failed to erase reg: 0x4001e508 val: 0x0002e000
Error: Error erasing sector 46
Error: failed erasing sectors 0 to 47
embedded:startup.tcl:509: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 574
at file "embedded:startup.tcl", line 509

c:\OpenOCD\bin>

Not an error I've seen before - and looks like you're using the same version of openocd as I do 20201228 from here https://gnutoolchains.com/arm-eabi/openocd/ Do you have another nrf to try to eliminate a hardware problem?
 
beemac said:
Filippods said:
beemac said:
Filippods said:
Yes, i use windows.
I've copied the file in the directory /openocd/bin so i've repeated the bootloader flashing... doesn't work.

Doesn't work in what way? Can you paste the output...

c:\OpenOCD\bin>openocd.exe -f ../share/openocd/scripts/interface/stlink.cfg -f ../share/openocd/scripts/target/nrf52.cfg -c "program TSDZ2_wireless-bootloader_with_sd-v0.9.0.hex verify" -c "exit"
Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Info : clock speed 1000 kHz
Info : STLINK V2J35S7 (API v2) VID:pID 0483:3748
Info : Target voltage: 3.208918
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000a80 msp: 0x20000400
** Programming Started **
Info : nRF52840-xxAA(build code: D0) 1024kB Flash, 256kB RAM
Info : Padding image section 0 at 0x00000b00 with 1272 bytes
Info : Flash write discontinued at 0x0002f740, next section at 0x000eb000
Warn : Adding extra erase range, 0x0002f740 .. 0x0002ffff
Error: Error waiting NVMC_READY: generic flash write/erase error (check protection etc...)
Error: Failed to enable read-only operation
Error: Failed to erase reg: 0x4001e508 val: 0x0002e000
Error: Error erasing sector 46
Error: failed erasing sectors 0 to 47
embedded:startup.tcl:509: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 574
at file "embedded:startup.tcl", line 509

c:\OpenOCD\bin>

Not an error I've seen before - and looks like you're using the same version of openocd as I do 20201228 from here https://gnutoolchains.com/arm-eabi/openocd/ Do you have another nrf to try to eliminate a hardware problem?
I have seen errors like that when power is incorrectly applied to the programmer.
The 3.3 v line from the stink should ONLY be connected to vbus on the nrf52840 if there is no other 5v supply being used on vbus.

If you are powering the board with 5v from a dcdc converter or external power supply, please disconnect the stlink 3.3v line.

Then try reprogramming.
 
rananna said:
btw, freecad is quite unstable - lots of crashing!
can the files be used in another viewer?
I forgot to mention that I use the FreeCAD 0.19 dev version, as there are features like assembly for assembly file that uses the assembly version from 0.19 only!!

No, you really must use FreeCAD.
 
Back
Top