Skip to content

Commit

Permalink
* Add en doc of SLogic combo 8
Browse files Browse the repository at this point in the history
  • Loading branch information
lxowalle committed Jul 26, 2023
1 parent f2c3d6f commit fabb073
Show file tree
Hide file tree
Showing 7 changed files with 384 additions and 11 deletions.
55 changes: 55 additions & 0 deletions docs/hardware/en/logic_analyzer/combo8/basic_operation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Basic Operations
keywords: LogicAnalyzer, debugger, link, RISCV, tool
---

The SLogic combo8 has four functions (SLogic, CKLink Debugger, DAP-Link Debugger, USB2UART). This document is intended to guide you on how to select the functions.

## Button Functions

After power on, **press the button** to switch functions, and you can see the **indicator light change** when the switching is successful.



![](../../../zh/logic_analyzer/assets/slogic_btn.png)

(Up:The red box indicates the position of the function switch button)

> Note: When switching functions, do not press the button more frequently than every 100ms; otherwise, it may cause the module to enter boot mode, and you will see that the indicator light will no longer change. If you encounter this situation, try to restart the power supply.
## Indicator Light Color and Functions

Each function corresponds to a specific color, and you can determine the currently enabled function based on the indicator light color.

| Function | Slogic | DAPLink | USB2UART | CKLink |
| ---------- | ------ | ------- | -------- | ------ |
| Indicator Light Color | Blue | Green | Red | Yellow |

(Up:Table of Indicator Light Color and Functions)

## Panel Information

You can check the current function and corresponding wire sequence through the panel information:

- The left side shows the wire sequence for **CKLink (Yellow)** and **DAPLink (Green)** together, as their wire sequences are similar.

- The middle section shows the wire sequence for **UART (Red)**.

- The right side shows the wire sequence for **SLogic (Blue)**.




![](../../../zh/logic_analyzer/assets/slogic_panel.png)

(Above:Color/Function/Wire Sequence Correspondence Diagram)


Here's an example:

1. If you want to use the SLogic function, press the button to switch the indicator light to blue. This will enable the SLogic function, and you can find the pin wire sequence for SLogic under the blue font on the panel.

2. If you want to use the UART function, press the button to switch the indicator light to red. This will enable the UART function, and you can find the pin wire sequence for UART under the red font on the panel.

Alright, now you can switch to the function you need and proceed to the next step!

45 changes: 35 additions & 10 deletions docs/hardware/en/logic_analyzer/combo8/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,48 @@ update:
version: v0.1
author: wonder
content:
- 新建文件
- New file
---

## 简介
## Introduction

SLogic Combo8 是基于 Sipeed M0s Dock 进行二次开发而成的逻辑分析仪,除此之外还有 Cklink、Daplink 和 USB 转四串口的功能。
SLogic combo8 is a logic analyzer based on Sipeed M0s Dock for secondary development, and also has CKLink Debugger, DAP-Link Debugger, USB2UART functions, which can be switched arbitrarily by buttons.

## 参数

## 引脚分布
![](../../../zh/logic_analyzer/assets/slogic_combo8_main.png)

## 使用说明
## Function Parameters

### 逻辑分析仪
### SLogic Function Parameters

### Cklink
| Logic Analyzer (Linux only) | **SLogic Combo8** |
| --------------------------- | ----------------- |
| Maximum Channel Number | 8CH |
| Maximum Sampling Rate | 80M |
| Transmission Bandwidth | 320Mb/s |
| Sampling Mode | Stream |
| Typical Configuration | 80M@3CH 32M@8CH |
| Signal Input Range | 0~3.6V |
| High and Low Level Thresholds | VIH>2V VIL<0.8V |

### Daplink
### CKLink Function Parameters

### USB 转四串口
| CKLink | SLogic Combo8 |
| ------------ | ------------- |
| JTAG Clock Rate | 16M |
| Typical Dump Speed | 1200KB/s |
| Debug Serial Port | Up to 20Mbps |

### DAPLink Function Parameters

| DAPLink | SLogic Combo8 |
| ------------ | ------------- |
| Debug Serial Port | Up to 20Mbps |
| Typical Burning Speed | 110KB/s |

### UART Function Parameters

| High Speed Four Serial Ports | **SLogic Combo8** |
| ---------------------------- | ----------------- |
| Maximum Baud Rate | 2x20Mbps+2x1Mbps |
| Total Bandwidth | 42Mbps |
25 changes: 25 additions & 0 deletions docs/hardware/en/logic_analyzer/combo8/use_cklink_function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Using as CKLink
keywords: LogicAnalyzer, debugger, link, RISCV, tool
---

SLogic Combo8 features high-speed CK-Link functionality, with a speed that surpasses CK-Link Lite and comes close to CK-Link Pro, making it a great tool for debugging RISC-V chips. In this mode, it also has a high-speed serial port (20Mbps).

> Note: SLogic directly transmits data to the PC's USB port, so to achieve the maximum speed mentioned above, it is recommended to avoid using SLogic on a USB HUB with multiple devices connected.
Let's get started with using CK-LINK!

## Enable SLogic Functionality

Press the toggle button to switch the indicator light to yellow.

![](../../../zh/logic_analyzer/assets/slogic_led_yellow.png)

> To verify if SLogic functionality is enabled:
>
> On Linux, use the lsusb command / On Windows, check in Device Manager to find the CKLink HS device.
## Getting Started

On both Windows and Linux systems, you can directly refer to [Using CDK + Sipeed RV-Debugger Plus for Compilation and Debugging](https://bouffalolab.gitee.io/bl_mcu_sdk/get_started/cdk_rv_debugger_plus.html#cdk-sipeed-rv-debugger-plus) and [T-HEAD Debug Server User Manual](https://occ.t-head.cn/document?temp=introduction-2&slug=t-head-debug-server-user-manual), the usage is exactly the same.

34 changes: 34 additions & 0 deletions docs/hardware/en/logic_analyzer/combo8/use_daplink_function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Using as DAPLink
keywords: LogicAnalyzer, debugger, link, RISCV, tool
---

SLogic Combo8 features high-speed DAP-Link functionality, suitable for various common chips, especially for debugging STM32 chips using IDE on Windows.

## Enable DAPLink Functionality

Press the toggle button to switch the indicator light to green.

![](../../../zh/logic_analyzer/assets/slogic_led_green.png)

> To verify if DAPLink functionality is enabled:
>
> Linux: Use the lsusb command to check if the CMSIS-DAP HS USB device appears.
### Getting Started

Here's a step-by-step guide on using the STM32F103C8T6 chip with Windows MDK IDE as an example:

1. Quickly generate the project using STM32CUBEMX, paying attention to the minimum version number of the generated project.

2. Connect to DAPLink using MDK:

![](../../../zh/logic_analyzer/assets/cfg_dap_debugger_of_mdk.png)

3. Download the firmware using MDK:

![](../../../zh/logic_analyzer/assets/download_fw_in_mdk.png)

4. Debug the firmware using MDK:

![](../../../zh/logic_analyzer/assets/start_debugger_in_mdk.png)
73 changes: 73 additions & 0 deletions docs/hardware/en/logic_analyzer/combo8/use_fouruart_function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Using as Serial Module
keywords: LogicAnalyzer, debugger, link, RISCV, tool
---

SLogic Combo8 has 4 independent high-speed serial port functionalities. The first two ports based on UART can achieve a super-high speed baud rate of up to 20Mbps simultaneously, while the latter two ports can reach up to 1Mbps through IO simulation. It is highly suitable for scenarios such as batch programming and production testing.

## Enable Serial Module Functionality

Press the toggle button to switch the indicator light to red.

![](../../../zh/logic_analyzer/assets/slogic_led_red.png)

> To verify if Serial Module functionality is enabled:
>
> Linux: Use the lsusb command to check if the UARTx4 HS USB device appears.
![](../../../zh/logic_analyzer/assets/slogic_linux_equipment_uart.png)

## Getting Started

Please note: Due to system reasons, Linux may consider the device as a modem when it has more than one ttyACM. This may temporarily occupy the device for sending AT commands. In this situation, you may not be able to open the serial port, and it may report "Resource busy" due to device being occupied. This is normal, and it will return to normal after a while. To solve this problem, you can add a udev rule to avoid this issue. Please refer to the following commands:

```shell
sudo touch /etc/udev/rules.d/49-sipeed.rules
sudo echo "ATTRS{idVendor}==\"359f\", ATTRS{idProduct}==\"3101\", ENV{ID_MM_DEVICE_IGNORE}=\"1\"" > /etc/udev/rules.d/49-sipeed.rules
sudo udevadm control --reload
```

### Hardware Connection

SLogic Combo8 has a total of 4 serial ports. UART0 and UART1 support a maximum baud rate of 20M, while UART3 and UART4 support a maximum baud rate of 1M. Refer to the panel pinout diagram and connect any UART's TX, RX, and GND to the RX, TX, and GND pins of the target device (note that RX and TX need to be crossed).

Note:
1. Ensure that the module and the target device share a common ground to prevent issues such as garbled data.
2. The device numbers on Windows may be in random order, so manual trial-and-error may be required to find the corresponding serial port.

### Data Transmission and Reception

For Linux, you can use **picocom** or **minicom** as the serial communication tool. Install it using the following commands:

```Bash
sudo apt install picocom
sudo apt install minicom
```

For example, to use **minicom** with UART0 to communicate with the test device, open the Linux terminal using **CTRL+ALT+T**, enter the installation commands, and enter the administrator user password when prompted. Wait for the package installation to complete.

![](../../../zh/logic_analyzer/assets/minicom_install_uart.png)

After installation, communicate with the test device using UART0. In the terminal, enter the command:

```Bash
sudo minicom -b 2000000 -D /dev/ttyACM0
```

The **-b** parameter specifies the desired baud rate, which should be the same as the UART baud rate setting of the test device.

The **-D** parameter specifies the port to listen to.

![](../../../zh/logic_analyzer/assets/minicom_uart.png)

After entering the command, you can communicate with the test device, receive and print messages in the terminal, and send data to the test device.



#### Serial Loopback Test:

![](../../../zh/logic_analyzer/assets/uart_line_uart.jpg)
(Above: Serial module wiring diagram)

Loopback test result:
![](../../../zh/logic_analyzer/assets/minicom_test_uart.png)
138 changes: 138 additions & 0 deletions docs/hardware/en/logic_analyzer/combo8/use_logic_function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Using as a Logic Analyzer

## Enabling the Logic Analyzer Function

Press the button to switch the indicator light to blue. As shown below:

![](../../../zh/logic_analyzer/assets/slogic_led_blue.png)

## Verifying that the Logic Analyzer Function is Enabled

Linux:

Use the lsusb command to see the USB TO LA USB device appear

![](../../../zh/logic_analyzer/assets/slogic_linux_equipment_pulseview.png)

## Using USB TO LA

>Currently, the logic analyzer only supports Linux systems
### Quick Use

#### Connect SLogic and Target Device

Connect the signal points to be tested on the target device to any free CH port of SLogic, and make sure that the GND of the device to be tested is connected to the GND of SLogic

![](../../../zh/logic_analyzer/assets/slogic_panel.png)

#### Connect SLogic and Computer

You need to download [the upper computer]() software for data decoding and visualization. After downloading, go to the directory where the file is located, use `CTRL+ALT+T` to open the Linux terminal, and enter the following command to **add permissions** and **run** the program **as administrator**::

```bash
chmod +x PulseView-x86_64-032323-1101.AppImage
sudo ./PulseView-x86_64-032323-1101.AppImage
```
**Connection Steps**
1. Select the device to connect
2. Select the driver **Sipeed Slogic Analyzer(sipeed-slogic-analyzer)**
3. Select the connection mode as USB
4. Scan for devices that meet the requirements
5. Select the device that has been found

![](../../../zh/logic_analyzer/assets/set_connect_cfg_of_pulseview.png)

> If no device is found in the third step, you can try to switch the module function, switch back to the logic analyzer mode, and repeat the third step


### Start Sampling

1. Configure the number of channels, number of samples, and sampling rate of PulseView

Note!!! The sampling bandwidth must not be equal to or exceed 320MHz, that is, the number of channels * sampling rate must be less than 320MHz. For example: set the number of channels to 8, then the sampling rate can only be set to 32MHz or lower, not 40MHz, otherwise it may cause the upper computer to malfunction.

The figure below sets the number of channels to **8**, the number of samples to **1M samples**, and the sampling rate to **10Mhz**

![](../../../zh/logic_analyzer/assets/equ_selec_complete_of_pulseview.png)

2. Set the trigger mode of channel D0 to **rising and falling edge trigger**

Click on the label icon of channel D0 to set the trigger mode

![](../../../zh/logic_analyzer/assets/set_channel_of_pulseview.png)

3. Start acquisition and get sampling results

![](../../../zh/logic_analyzer/assets/waveform_fast_of_pulseview.png)

### Detailed Configuration

#### Channel Settings

Open the **"red probe"** icon in the top toolbar, select the channels you want to enable, and the number of sampling channels for the logic analyzer. The optional options are 1ch, 2ch, 4ch and 8ch. There are also shortcut keys for quick switching of channels that meet the corresponding conditions


![](../../../zh/logic_analyzer/assets/set_Logic_cfg_of_pulseview.png)

#### Sampling Parameters

Sampling parameters include sample quantity, sampling frequency and sampling time

1. Sample quantity: select an appropriate value according to your needs
2. Sampling frequency: select according to the frequency of the signal to be measured, **recommended to choose more than 10 times the frequency of the signal to be measured**
3. Sampling time: sampling time is calculated based on the **sample quantity** and **sampling frequency**, the calculation formula is:</br>**Time (seconds) = Number of samples / Sampling rate**</br>For example, when 1M samples and 1Mhz, the sampling time is 1s

![](../../../zh/logic_analyzer/assets/set_total_sampling_time_of_pulseview.png)

> After setting the sample quantity and sampling frequency, place the mouse over the sample quantity selection box, and it will display the sampling time for the current parameters
#### Channel Parameters

Click on the channel label to set the channel parameters, which include label name, label color, channel waveform display window width and signal trigger mode

1. Label name: can be set according to the meaning of the sampling signal, for easy distinction of multiple signals
2. Label color: set according to personal preference, for easy distinction of different signals
3. Channel waveform display window width: set according to the signal amplitude, unit is pixels, when the signal amplitude changes greatly, you can increase this parameter to observe the signal amplitude change
4. **Signal trigger mode**: has **direct sampling**, **high level trigger**, **low level trigger**, **falling edge trigger**, **rising edge trigger** and **edge trigger**



![](../../../zh/logic_analyzer/assets/set_channel_cfg_of_pulseview.png)

### Debugging Waveforms

#### View Operations

> - **Waveform zoom**: mouse wheel (middle button) scroll up to zoom in waveform, scroll down to zoom out waveform
> - **Drag waveform**: mouse left button hold can drag the waveform display area left and right up and down
> - **Area zoom**: mouse double click on an area can zoom in the waveform of that area
> - **Channel scroll**: "waveform display area" use Ctrl+mouse wheel (middle button) can quickly scroll channels up and down
> - **Time measurement**: You can mark a position by right-clicking on the desired position and clicking "Create Marker Here". When you repeat marking another position, the software will automatically calculate and display the time length between the two markers on the time axis
> - **Adjust channel order**: mouse drag channel label can drag channel to specified position
![](../../../zh/logic_analyzer/assets/tag_of_pulseview.png)

#### Protocol Decoding

> Clicking on the **yellow-blue waveform icon** from the top toolbar will list the currently supported protocol list, you can directly search for the protocol you want to decode on the list to add a new protocol, new protocol can be viewed in the waveform display area
![](../../../zh/logic_analyzer/assets/decoder_selector_of_pulseview.png)

> On the waveform chart, a new protocol will occupy a row of channel waveform display window, click on the **protocol label**, you can set the basic parameters of the protocol. Taking UART protocol as an example, set UART protocol frequency to 115200, data bits to 8 bits, use ascii format decoding. After setting, the system will decode the waveform of the selected channel, so that you can more intuitively observe and analyze the communication data.
![](../../../zh/logic_analyzer/assets/set_decoder_cfg_of_pulseview.png)

> After setting, the waveform display area will show the corresponding protocol decoding results of the waveform
![](../../../zh/logic_analyzer/assets/value_of_pulseview.png)

### Precautions

When connecting logic analyzer to test system, pay attention to the following points:

1. **The logic analyzer and computer are grounded together. If the device under test is a strong electric system, be sure to use a "USB isolator" for isolation measures. Otherwise, there is a high risk of damaging the logic analyzer or computer**
2. GND channel and GND of test system must be reliably connected, as short as possible
3. Signal channel must be reliably connected to the test signal position of test system, not randomly "grafted", causing interference introduction
4. If you do not pay attention to wiring method, it may introduce a lot of glitches, causing software unable to analyze data
Loading

0 comments on commit fabb073

Please sign in to comment.