Skip to content

Commit e3b7a26

Browse files
committed
fix: use original atc1441 source for some web_tools
source: https://github.com/atc1441/atc1441.github.io/tree/main
1 parent fba6c3b commit e3b7a26

2 files changed

Lines changed: 38 additions & 26 deletions

File tree

web_tools/ATC_TLSR_PaperBLEcontrol.html

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
2-
<!-- saved from url=(0057)https://atc1441.github.io/ATC_TLSR_Paper_OTA_writing.html -->
3-
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>ATC_TLSR_Paper BLE control</title>
1+
<title>ATC_TLSR_Paper BLE control</title>
42
</head>
53

64
<body>
@@ -394,43 +392,48 @@
394392
</script>
395393
Welcome to ATCnetz.de ATC_TLSR_Paper BLE control,<br>Click connect and select the TLSR E-Paper display you want to
396394
talk to.<br><br>
397-
The ATC_TLSR_Paper Firmware can be found here: <a href="https://github.com/atc1441/ATC_TLSR_Paper" target="_blank">https://github.com/atc1441/ATC_TLSR_Paper</a><br><br>
395+
The ATC_TLSR_Paper Firmware can be found here: <a href="https://github.com/atc1441/ATC_TLSR_Paper"
396+
target="_blank">https://github.com/atc1441/ATC_TLSR_Paper</a><br><br>
398397
<button id="connectbutton" type="button" onclick="preConnect();">Connect</button>
399398
<button id="connectbutton" type="button" onclick="reConnect();">Reconnect</button>
400-
<button id="connectbutton" type="button" onclick="document.getElementById(&#39;log&#39;).innerHTML = &#39;&#39;;">Clear Log</button>
399+
<button id="connectbutton" type="button" onclick="document.getElementById('log').innerHTML = '';">Clear Log</button>
401400
<br><br>
402-
<div id="status">Current part: 92416 All: 92416 Time: 46.629s</div><br>
401+
<div id="status">Upload status</div><br>
403402
Please select a .bin file you want to flash to the Telink BLE device.<br>
404403
Connect to the Display and click on "Send Firmware" after the display is connected.<br>
405404
after all bytes are uploaded the display will do a CRC check and flash and reboot into the new firmware if all is
406405
ok.<br><br>
407-
Select Firmware: <input type="file" accept=".bin" id="file" onclick="resetFileSelector();"><br><br>
406+
Select Firmware: <input type="file" accept=".bin" id="file" onclick="resetFileSelector();" /><br><br>
408407
<button type="button" onclick="sendFile(0x20000,document.getElementById(&quot;cmdIMAGE&quot;).value);">Send
409408
Firmware</button><br>
410409
<textarea id="cmdIMAGE" rows="12" cols="100"></textarea><br><br>
411410
<label for="hour">Hour offset:</label>
412-
<input type="number" id="hourOffset" min="-12" max="12" value="2"><br>
411+
<input type="number" id="hourOffset" min="-12" max="12" value="2"/><br>
413412
<button type="button" onclick="setTime(document.getElementById(&quot;hourOffset&quot;).value);">Set Time</button><br><br>
414413
<label for="hour">Force EPD Model:</label>
415414
<select id="forceEPDselection">
416415
<option>BW213</option>
417416
<option>BWR213</option>
418417
<option>BWR154</option>
419418
<option>213ICE</option>
419+
<option>BWR350</option>
420+
<option>BWY350</option>
420421
</select>
421422
<button type="button" onclick="sendForceEpd(document.getElementById(&quot;forceEPDselection&quot;).selectedIndex);">Force EPD</button><br><br>
422423
<input type="text" id="positionText" value="20000">
423-
<button type="button" onclick="readFlash(Number(&#39;0x&#39;+document.getElementById(&quot;positionText&quot;).value));">readFlash</button><br>
424+
<button type="button"
425+
onclick="readFlash(Number('0x'+document.getElementById(&quot;positionText&quot;).value));">readFlash</button><br>
424426
<input type="text" id="positionTextRam" value="0">
425-
<button type="button" onclick="readRam(Number(&#39;0x&#39;+document.getElementById(&quot;positionTextRam&quot;).value));">readRam</button><br>
427+
<button type="button"
428+
onclick="readRam(Number('0x'+document.getElementById(&quot;positionTextRam&quot;).value));">readRam</button><br>
426429
<br>
427430
<br>
428431
<input type="text" id="cmdTXT" value="0055">
429432
<button type="button" onclick="sendcmd(document.getElementById(&quot;cmdTXT&quot;).value);">SendCMD</button><br><br>
430-
<button id="w_fw_button" type="button" onclick="writeFW(0x20000,&#39;1212123234321234&#39;);">Write FW</button><br>
433+
<button id="w_fw_button" type="button" onclick="writeFW(0x20000,'1212123234321234');">Write FW</button><br>
431434
<button type="button" onclick="doFinalFlash();">final flash</button><br>
432-
<div id="log">03:22:40 : Got bytes: 0100038000<br>03:22:40 : Got bytes: 0100039000<br>03:22:40 : Got bytes: 010003a000<br>03:22:40 : Got bytes: 010003b000<br>03:22:40 : Got bytes: 010003c000<br>03:22:40 : Got bytes: 010003d000<br>03:22:40 : Got bytes: 010003e000<br>03:22:40 : Got bytes: 010003f000<br>03:23:23 : Sending Final flash: 07C001CEEDff7b<br>03:23:43 : Disconnected.<br></div>
433-
435+
<div id="log"><br></div>
434436

437+
</body>
435438

436-
</body></html>
439+
</html>

web_tools/uart_flasher.html

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<!DOCTYPE html>
2-
<!-- saved from url=(0058)https://atc1441.github.io/ATC_TLSR_Paper_UART_Flasher.html -->
3-
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
2+
<!-- Created on: 02.01.2021, Author: pvvx -->
3+
<!-- Edited on: 02.12.2021, Author: Aaron Christophel ATC1441 ATCnetz.de -->
4+
<html>
5+
<head><meta charset="utf-8">
46
<!-- style type="text/css"></style -->
57
<title>Hanshow TLSR8359 E-Paper Pricetag Flasher</title>
68
</head>
@@ -10,16 +12,16 @@ <h3>TLSR8359 USB-COM Flash Writer v0.2 (TX-SWS only!)</h3>
1012
<a href="https://github.com/atc1441/ATC_TLSR_Paper" target="_blank">Firmware GitHub Repo</a><br>
1113
<a href="https://github.com/atc1441/ATC_TLSR_Paper/blob/main/USB_UART_Flashing_connection.jpg" target="_blank">Flashing Pinout</a>
1214
<br><br>
13-
1. USB-COM: <input type="button" id="butOpen" value="Close">
14-
Baud: <select id="ubaud" title="Optimal: 460800 baud"><option value="115200">115200</option><option value="230400">230400</option><option value="460800" selected="">460800</option><option value="921600">921600</option><option value="1500000">1500000</option><option value="2000000">2000000</option></select>
15-
Atime: <select id="uatime" title="Activation time: Set above than Advertising interval or use manual power reset"><option value="0">0 ms</option><option value="100">100 ms</option><option value="1000">1 sec</option><option value="2000">2 sec</option><option value="3000" selected="">3 sec</option><option value="4000">4 sec</option><option value="8000">8 sec</option><option value="16000">16 sec</option></select>
15+
1. USB-COM: <input type="button" id="butOpen" value="Open">
16+
Baud: <select id="ubaud" title="Optimal: 460800 baud"><option value="115200">115200</option><option value="230400">230400</option><option value="460800" selected>460800</option><option value="921600">921600</option><option value="1500000">1500000</option><option value="2000000">2000000</option></select>
17+
Atime: <select id="uatime" title="Activation time: Set above than Advertising interval or use manual power reset"><option value="0">0 ms</option><option value="100">100 ms</option><option value="1000">1 sec</option><option value="2000">2 sec</option><option value="3000" selected>3 sec</option><option value="4000">4 sec</option><option value="8000">8 sec</option><option value="16000">16 sec</option></select>
1618
<br><br>
17-
2. Select Firmware: <input type="file" accept=".bin" id="file"><br><br>
18-
3. <input type="button" title="Write firmware in to Flash" id="butWrite" value="Write to Flash"> <span id="swrite">ok</span><br><br>
19-
<input type="button" title="Unlock flash" id="butUnlock" value="Unlock Flash"> <input type="button" title="Clean all flash" id="butErase" value="Erase All Flash"> <input type="button" id="butReset" title="Test restart of M�U" value="Soft Reset MCU"> <input type="button" id="butClrlog" value="Clear log"><br><hr>
19+
2. Select Firmware: <input type="file" accept=".bin" id="file"/><br><br>
20+
3. <input type="button" title="Write firmware in to Flash" id="butWrite" value="Write to Flash" disabled> <span id="swrite">Open COM & Select file</span><br><br>
21+
<input type="button" title="Unlock flash" id="butUnlock" value="Unlock Flash" disabled> <input type="button" title="Clean all flash" id="butErase" value="Erase All Flash" disabled> <input type="button" id="butReset" title="Test restart of M�U" value="Soft Reset MCU" disabled> <input type="button" id="butClrlog" value="Clear log"><br><hr>
2022
</div>
21-
<div id="slog">22:53:41: USB-COM opened.<br>22:53:44: File was selected, size: 92424 bytes<br>22:53:46: Reset DTR/RTS (100 ms)<br>22:53:46: Activate (3 sec)...<br>22:53:49: Flash Erase All (3.5 sec)...<br>22:53:53: Done.<br>22:53:53: Reset DTR/RTS (100 ms)<br>22:53:53: Activate (3 sec)...<br>22:53:56: Write 92424 bytes in to Flash...<br>22:54:33: Done (39.818 sec).<br>22:54:33: Soft Reset MCU<br>23:18:42: File was selected, size: 92392 bytes<br>23:18:44: Reset DTR/RTS (100 ms)<br>23:18:44: Activate (3 sec)...<br>23:18:47: Write 92392 bytes in to Flash...<br>23:19:21: Done (36.991 sec).<br>23:19:21: Soft Reset MCU<br>23:23:02: File was selected, size: 92424 bytes<br>23:23:03: Reset DTR/RTS (100 ms)<br>23:23:03: Activate (3 sec)...<br>23:23:06: Write 92424 bytes in to Flash...<br>23:23:40: Done (36.994 sec).<br>23:23:40: Soft Reset MCU<br>00:33:54: File was selected, size: 92460 bytes<br>00:33:55: Reset DTR/RTS (100 ms)<br>00:33:55: Activate (3 sec)...<br>00:33:58: Flash Erase All (3.5 sec)...<br>00:34:02: Done.<br>00:34:02: Reset DTR/RTS (100 ms)<br>00:34:02: Activate (3 sec)...<br>00:34:05: Write 92460 bytes in to Flash...<br>00:34:39: Done (36.881 sec).<br>00:34:39: Soft Reset MCU<br>00:55:09: File was selected, size: 92568 bytes<br>00:55:10: Reset DTR/RTS (100 ms)<br>00:55:10: Activate (3 sec)...<br>00:55:13: Write 92568 bytes in to Flash...<br>00:55:47: Done (36.868 sec).<br>00:55:47: Soft Reset MCU<br></div>
22-
23+
<div id="slog"></div>
24+
</body>
2325
<script type="text/javascript">
2426
"use strict";
2527
//Firmware values
@@ -95,6 +97,11 @@ <h3>TLSR8359 USB-COM Flash Writer v0.2 (TX-SWS only!)</h3>
9597
return FlashByteCmd(0xab);
9698
}
9799
async function FlashUnlock() { // send flash cmd 0x01 unlock flash
100+
await FlashWriteEnable();
101+
await serialController.write_raw(sws_wr_addr(0x0d, new Uint8Array([0x00]))); // cns low
102+
await serialController.write_raw(sws_wr_addr(0x0c, new Uint8Array([0x01]))); // Flash cmd
103+
await serialController.write_raw(sws_wr_addr(0x0c, new Uint8Array([0x00, 0x01]))); // Unlock all + cns high
104+
await FlashWriteEnable();
98105
await serialController.write_raw(sws_wr_addr(0x0d, new Uint8Array([0x00]))); // cns low
99106
await serialController.write_raw(sws_wr_addr(0x0c, new Uint8Array([0x01]))); // Flash cmd
100107
await serialController.write_raw(sws_wr_addr(0x0c, new Uint8Array([0x00]))); // Unlock all
@@ -158,6 +165,9 @@ <h3>TLSR8359 USB-COM Flash Writer v0.2 (TX-SWS only!)</h3>
158165
return;
159166
let t = new Date().getTime();
160167
await Activate(uatime.value);
168+
await FlashWriteEnable();
169+
await FlashUnlock();
170+
await delay(1500);
161171
log('Write ' + firmwareArray.byteLength + ' bytes in to Flash...');
162172
let len = firmwareArray.byteLength;
163173
let addr = 0;
@@ -363,5 +373,4 @@ <h3>TLSR8359 USB-COM Flash Writer v0.2 (TX-SWS only!)</h3>
363373
}
364374
var serialController = new SerialController();
365375
</script>
366-
367-
</body></html>
376+
</html>

0 commit comments

Comments
 (0)