Skip to content

Commit 73af14f

Browse files
committed
Merge branch 'main' into build_automation
2 parents 2bc1319 + 2515dcd commit 73af14f

File tree

2 files changed

+32
-19
lines changed

2 files changed

+32
-19
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ Discord: @Onwrikbaar<br/>
1010
1111

1212
### Status
13-
This is a work in progress. Updates may be few and far between.
14-
15-
### Request
16-
Please send me an e-mail in case you are building this design, and let me know whether you run into any questions or problems. It will help me decide how I can best lower the threshold to replicating NeoDK. Thanks!
13+
This is a work in progress. The electronics are production-ready. The firmware is far from finished.
1714

1815
### Goals
1916
1. The last quarter century, innovation in the e-stim realm has been virtually nonexistent, despite massive advances in electronics and cheap computing power. Currently available commercial devices are without exception channel-oriented and produce TENS-like waveforms. Most are horrendously energy-inefficient. The time has come to unlock the potential of a more capable architecture.

firmware/Setup.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
1-
### ARM gcc
1+
## Updating the firmware without using a debugging probe
2+
1. Download and install STM's free [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) programming tool.
3+
2. Connect NeoDK to a computer using a USB-to-3.5mm-TRS-serial cable. Suitable cables (3.3V TTL, Tip=Tx, Ring=Rx, Sleeve=GND) are readily available from various sources, like Aliexpress, for about €10 including shipping.
4+
3. Press and hold the pushbutton on NeoDK while switching on its power (or connecting the battery). This puts NeoDK in bootloader mode. Release the button.
5+
4. Open a terminal window and execute the following on the command line:<br/>
6+
&nbsp;&nbsp;`cd firmware`<br/>
7+
&nbsp;&nbsp;`STM32_Programmer_CLI -c port=/dev/tty.usbserial-0001 -w build/neodk_g071.hex -v`<br/>
8+
(Specify the COM port that corresponds to your USB-serial cable, in place of `/dev/tty.usbserial-0001`).<br/>
9+
A power cycle starts the firmware; the blue LED should light up and the box is ready for use.
10+
11+
## Controlling NeoDK from a computer
12+
1. Connect NeoDK to a computer using a USB-to-3.5mm-TRS-serial cable (3.3V TTL, Tip=Tx, Ring=Rx, Sleeve=GND).
13+
2. Open a Chrome, Edge or Opera browser window and point it to the [NUUI](https://deviceweb.org/neostim) (Neostim Ugly User Interface).
14+
3. The following commands can be typed into the command box:
15+
- /? list the commands
16+
- /a print the instantaneous primary current and some voltages
17+
- /b simulate the button, to start/pause/resume the pattern
18+
- /d primary voltage down by 200 mV
19+
- /l toggle the lovely blue LED
20+
- /u primary voltage up by 200 mV
21+
- /v print firmware version
22+
- /0 (zero) turn off the primary voltage
23+
- /1../9 set the primary voltage to 1..9 Volt (be careful what you wish for)
24+
25+
## Developing code for NeoDK
26+
### Debugging probe
27+
A suitable probe is the Segger JLink or Segger JLink EDU. Other probes supporting the SWD interface will work too.
28+
29+
### Compiler
230
1. Download and install the [Arm GNU Toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) for bare metal targets.
331
2. Edit [Makefile.posix](toolchain/gcc/Makefile.posix) or [Makefile.windows](toolchain/gcc/Makefile.windows) (depending on your operating system) to set three environment variables to their appropriate values. Alternatively, they can be set in the startup file for your command line interface.
432

5-
### STM32Cube
33+
### STM's low-level code library
634
1. Download and install [STM32Cube for STM32G0 series](https://www.st.com/en/embedded-software/stm32cubeg0.html).
735
2. In your home directory, create a softlink to directory 'STM32Cube' of the just installed tree.
836

9-
### SEGGER J-Link
37+
### SEGGER J-Link software
1038
1. Download and install [Segger J-Link](https://www.segger.com/downloads/jlink/).
1139
2. In the just installed Segger directory tree, find file JLink_V792k/Samples/RTT/SEGGER_RTT_V792k.tgz and unpack it in place.
1240
3. In your home directory, create a softlink named 'SEGGER_RTT' to directory 'JLink_V792k/Samples/RTT/SEGGER_RTT_V792k/RTT' of the just installed tree.
@@ -35,15 +63,3 @@ This should now show output from NeoDK.<br>
3563
In the JLinkRTTClient window, type<br>
3664
&nbsp;&nbsp;`/?`<br>
3765
to see a list of available NeoDK interactive commands.
38-
39-
### Updating the firmware without using a debugging probe
40-
1. Download and install STM's free [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) programming tool.
41-
2. Connect NeoDK to a computer using a USB-to-3.5mm-TRS-serial cable. Suitable cables (3.3V TTL, Tip=Tx, Ring=Rx, Sleeve=GND) are readily available from various sources, like Aliexpress, for about €10 including shipping.
42-
3. Press and hold the pushbutton on NeoDK while switching on its power (or connecting the battery). This puts NeoDK in bootloader mode. Release the button.
43-
4. Open a terminal window and execute the following on the command line:<br/>
44-
&nbsp;&nbsp;`cd firmware`<br/>
45-
&nbsp;&nbsp;`STM32_Programmer_CLI -c port=/dev/tty.usbserial-0001 -w build/neodk_g071.hex -v`<br/>
46-
(Specify the COM port that corresponds to your USB-serial cable, in place of `/dev/tty.usbserial-0001`).<br/>
47-
If flashing was successful, execute:<br/>
48-
&nbsp;&nbsp;`STM32_Programmer_CLI -c port=/dev/tty.usbserial-0001 -g`<br/>
49-
This last command starts the firmware; the blue LED should light up and the box is ready for use. A power cycle instead of this command will have the same effect.

0 commit comments

Comments
 (0)