

JT2Mini
Install and enable the Embedded Trace Module (ETM) for real-time debug
- Size
- 35 × 24 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 9
- Nets
- 16
- Pads
- 51
- Tracks, vias
- 116, 33
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 6 (file 20211014)
- Created
- 14 Jun 2022
- Updated
- 19 Apr 2024
Overview
JT2Mini is an open-source printed circuit board by drzwave, from the drzwave/etm_zwave repository on GitHub. It is a 2-layer board of 35 × 24 mm with 9 parts on 16 nets, routed with 116 tracks and 33 vias.
README
README.mdetm_zwave
Z-Wave Embedded Trace Module (ETM) debugging example code
The ETM is an invaluable tool for debugging embedded code and measuring code coverage in real-time. More details on ETM can be found on the ARM and Segger web sites.
The example code here is provided AS-IS and without warrantee.
Setup
Hardware
- Z-Wave Developers Kit - WSTK and a Radio board
- Or your board assuming it has the JTrace pins
- Segger J-Trace Pro
- The Cortex-M model is sufficient for Z-Wave debug (the cheaper one)
- Cables and power source
- J-Trace 20 pin connector pinout:
- 0.05" (1.27mm) spacing
- Connect the DUT to the J-Trace and ensure the Target Power is green
- Note that the 20 pin debug cable should be as short as possible - ideally just 2-3"
- If you get LTRACE invalid frame errors on the trace, the signal quality across the ribbon cable is probably not good.
- Try lowering the clock speed, adjusting the timing in JTrace and that all ground pins are connected.
JT2Mini Adapter
- See the Adapter folder for the J-Trace to MiniSimplicity adapter.
Software
- Simplicity Studio (for building the code)
- Segger Ozone (supports ETM trace)
- SVD files for the respective EFR32 - see the SVD folder
- This repo contains JLink scripts and other files needed for tracing
Step by Step Instructions
- Clone this repo into your Z-Wave project
- Build the project in SSv5
- Open Ozone
- Click on the New Project wizard and select the .AXF file for the project. Ozone will find the source code files via the .axf file.
- Click on File->Edit Project file (opens the .jdebug file)
- Add the following lines to the end of the OnProjectLoad section
- Project.SetOSPlugin("FreeRTOSPlugin_ARM");
- For xG13 projects:
- Project.AddSvdFile ("$(ProjectDir)/etm_zwave/svd/EFR32XG13XFULL.svd");
- For xG14 projects:
- Project.AddSvdFile ("$(ProjectDir)/etm_zwave/svd/EFR32XG14XFULL.svd");
- For xG23 projects:
- Project.AddSvdFile ("$(ProjectDir)/etm_zwave/svd/EFR32XG23A000F512GM40_SEQ_M33.svd");
- For modules (ZGM130,ZGM230), just use the base-SoC part which has the same internal registers which is what the .SVD defines
- Scroll down to the BeforeTargetConnect section
- uncomment the call and the }
- Add ONE of the following lines that matches your Z-Wave chip :
- Project.SetJLinkScript("$(ProjectDir)/etm_zwave/ZGM130S_Traceconfig.JLinkScript");
- Project.SetJLinkScript("$(ProjectDir)/etm_zwave/ZG23_Traceconfig.JLinkScript");
- Enable Tracing
- Tools->Trace Settings

- Trace Source is Trace Pins
- CPU Frequency is 39MHz
- Trace Port Width is ideally 4 but if you have limited pinout, 2 or even 1 will work but will stall the CPU potentially altering the program flow
- Increase the Maximum Instruction Count to at least 100M
- Trace Timing should be default - the script alters the slew rate of the GPIOs which should be sufficient with a short cable
- Tools->Trace Settings
- Click on View -> Instruction Trace, Code Profile, Timeline and any other windows desired
- Click on Download and Reset Program
- Review the console window and look for any errors
- The DUT should stop at the beginning of Main() and there is data in the Timeline
Software Project Recommendations
- Do not use -flto optimization when debugging. Link Time Optimization (LTO) mashes the code making Ozone unable to match the PC with the C source code.
- Recommend installing Z-Wave DEBUG in the SLC - This will set the -Og optimzation option which will make the code much easier to trace and debug but requires more FLASH.
- In Simplicity Studio, click on the .slcp file for your project, then Software Components, then scroll down (or search) for Z-Wave Debug and click on it, then install it. Do NOT ship production code with Z-Wave Debug installed! Uninstall it for the final production release.
- May also want to install Z-Wave Debug Print and uncomment the #define DEBUGPRINT in app.c. This also requires IO Stream and a UART. This enables print statements to help with debugging. The print statements are sent out the uart and are visible on the SSv5 console window.
TroubleShooting
- Ozone will give all sorts of different errors that most often are caused by Signal Integrity issues
- LTRACE (Time since start: 0.139 656, Thread=ETM1): Unknown trace data packet detected
- No trace clock present, trace may not work correctly.
- LTRACE (Time since start: 0.074 546, Thread=ETM1): Trace overflow detected. Trace packets may have been lost.
- General flakeyness where restarting Ozone yields different errors or works sometimes but not all the time
- Signal Integrity of TRACECLK and TRACEDATA
- Use short cables (less than 6")
- Connect EVERY ground pin on the 20-pin header to the DUT if possible or add additional GND wires
- View the TRACECLK and TRACEDATA pins on a good scope with good grounds
- Adjust the slew rate of the EFR GPIO port to try to make the signals cleaner or sharper (See the .JLinkScript file for an example)
- Adjust the timing in the J-Trace - Ozone - Trace Settings - Trace Timing
- If the cable is short, the trace timing timing should not need to be adjusted as the EFR provides good setup/hold
Reference Documents
Contacts - Eric Ryherd - Author
- File an Issue to report a problem or make a suggestion.
Parts
9| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3, J4, J5 |
| 3 | Jumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1, JP2, JP3 |
| 1 | 3220-10-0300-00 | Connector_PinHeader_1.27mm:PinHeader_2x05_P1.27mm_Vertical_SMD | J2 |
| 1 | CBE224 | JT2Mini:PinHeader_2x10_P1.27mm_Greenconn | J1 |
| 1 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J6 |
Similar boards
- 2 layers103 × 30.5 mm

- 2 layers31.8 × 47.6 mm

- 2 layers24 × 27.3 mm

Expansion Card Retrofit
FrameworkComputer/ExpansionCards
Reference designs and documentation to create Expansion Cards for the Framework Laptop
9 parts1.1kCC-BY-4.0 - 2 layers15.6 × 17.3 mm

SKR Mini TFT Thermistor Board
VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group
9 parts1.1kGPL-3.0 - 2 layers39.1 × 49.5 mm

Learnoliver
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
9 parts915 - 2 layers17.4 × 16.9 mm

- 2 layers9.8 × 108 mm

- 2 layers

Keyboard after
adamws/kicad-kbplacer
KiCad plugin for automatic keyboard's key placement and routing
9 parts547GPL-3.0
Questions
How big is the JT2Mini PCB?
It measures 35 × 24 mm and has 2 copper layers, 1.6 mm thick.
What parts does the JT2Mini use?
9 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the JT2Mini KiCad files?
From the drzwave/etm_zwave repository on GitHub, at the commit this page was made from: the board is adapter/JT2Mini/JT2Mini.kicad_pcb and its schematic adapter/JT2Mini/JT2Mini.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the JT2Mini design in my own project?
Its repository states no licence, so its author keeps all rights: ask drzwave before reusing the design.