- Feb 14, 2011
Hi Martin.martinn27 said:Hello everyone, I need your help. I studied in detail the instructions on how to build this display, but I can't flash the bootloader with stlink v2 (V2.J40.S7)
I suspect that I can't get in because "Warn : target nrf52.cpu examination failed"
nrf52840 (PCA10059 , 2.1.0 , 2022.9)
I also don't know how to proceed with telnet communication and whether stlink v2 needs to be modified or is it enough if I have stock firmware
The good news is that OpenOCD seems is working well, connecting as expected to NRF52.
On Linux, I do on a terminal:
telnet localhost 4444
Then I get inside telnet and I can run OpenOCD commands. You can do "help" to get help from OpenOCD commands. Then you will see the commands for flash, erase, etc. You can also search on google but you will figure out what are the commands and parameters.
Are you building the display for TSDZ2 or Bafang?
I am developing a new version of the display, but I will only test / develop for my Bafang M500. The most important change is that it runs Pyhton firmware and uses the ESP32-S2 (first programming is done with a USBC cable, then it is wireless). It is also programmed by wireless, I can edit the Pyhton firmware file directly with my phone!! More details:
The schematic is so simple!! Only 11 wires to solder:
I already tested and it works. Early tests showing the state of POWER, UP and DOWN buttons:
Details of the build.
One connector is the display connector to the original Bafang M500 harness cable. The other round connector is to connect to the 860C display remote keypad I bought on Aliexpress:
Very clean and simple:
And now there are two wireless devices connected to my home wifi router, one device is the ESP32-S3 from the EBike board and other device is the ESP32-S2 from this display. I can select which one I want to edit the Pyhton firmware or simple open a second window to select the other board and so have access to both Python firmwares at the same time -- that screenshot is from my phone! I am really amazed to have such advanced technology!!
In the same spirit of the DIY display, I am building a DIY EBike electronics. The motor controller is the popular, high performance and OpenSource VESC. Then I add a ESP32-S3 board to run the EBike application, that is also Pyhton code. Again, I can also program the EBike board using wireless, with my phone or PC.
Here is an example of a small VESC that will be installed inside my motor + the EBike board:
Luckily, the ESP32-S3 board I use, can be placed on top of this VESC and the VESC connectors will still be accessible:
And also, all this are ok to go inside - I just hope wifi will still working with board on that place: