Summary
The following article provides a means to program Nordic nRF9160 based SigCell M1-N1 using ST-Link-Compatible Programmer & Emulator / Debugging USB dongle.
Image from: Adafruit
Note: This article details using ST-Link-Compatible Programmer & Emulator / Debugging USB dongle to program Nordic nRF9160.
It is not about using STMicroelectronics ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32; Information about ST-LINK/V2 can be found here and here
Essential equipment
SigCell M1-N1
4x Male-Female Jumpers
Windows PC
1. Convert STLINKV2 to J-Link
Plug STLINKV2 dongle to a Windows PC. It will be shown in the Windows Device Manager as shown below:
- Follow the procedure from SEGGER for Converting ST-LINK On-Board Into a J-Link
- Download and Install USB driver (STSW-LINK009) for ST-LINK/V2 from SEGGER
- Download and install SEGGER J-Link software package. V5.12b or later is required. Latest version is recommended.
- Download and Install the modified SEGGER STLink_Reflash utility
- Connect ST-LINK dongle to PC
- Select "Upgrade to J-Link"
- Wait for operation to complete
- Quit the command line utility.
This is a command line utility to convert ST-LINK on-board version into a J-Link-OB by replacing the firmware.
Workaround STLink_Reflash issues
- NOTE: You may encounter issues when using STLink Reflash utility from SEGGGER. You may see an error as shown below.
- Use the attached modified STLink_Reflash. Install STLinkReflash_modified.exe by running as Administrator, and follow the steps to "Upgrade to J-Link" as described above.
Now STLinkV2 is properly converted to J-Link. Ensure to close the STLinkFlasher programmer command line utility by selecting `[0] Quit`.
Device Manager should now show ST-Link V2 USB dongle as `J-Link driver` as shown in the picture below.
2. Connect M1-N1 to ST-Link V2 USB Dongle
Disconnect STLINKV2 USB dongle from PC before connecting to M1-N1 Tag-Connect
Connect M1-N1 to
Note: The pin visible through the slot is Pin 5.
ST-LINK V2 Dongle(Converted to J-Link) |
M1-N1 (Tag-Connect) |
RST (Pin1) |
nRESET (Pin3) |
SWCLK (Pin2) |
SWCLK (Pin4) |
SWIM (Pin3) |
Do not connect to M1-N1 |
SWDIO (Pin4) |
SWDIO (Pin2) |
GND (Pin5 or Pin6) |
GND (Pin5) |
3.3V (Pin7, Pin8) |
Do not connect to M1-N1 |
5V (Pin9, Pin10) |
Do not connect to M1-N1 |
NOTE: Do not connect Vcc pins from USB Dongle to M1-N1. Power M1-N1 externally via TC or LPC connector.
3. Flash firmware into M1-N1
- After finishing the wiring, plug ST-Link-V2 USB dongle to PC.
- Provide power to M1-N1.
- Be sure to assert high PWR_ON pin of M1-N1, to enable the power supply.
Refer to M1-N1 data-sheet for Pin description to power M1-N1.
Firmware can be now flashed using nRF Connect programmer OR nRF command line.
Steps to program using nRF Connect programmer are described here. Start at this step: "Open nRF Connect software suite. Open Programmer"
Purchasing USB Dongle
ST-Link-Compatible Programmer & Emulator / Debugging USB dongle can be purchased from the following places:
Comments
0 comments
Please sign in to leave a comment.