# Project Name: CddUart_WithDma_Demo

---
## Functional Description

+ This code is a demonstration of how to use the CddUart API and how to set up a buffer using the CddUart_SetBuffer() API for continuous reception and printing.
+ The demonstration utilizes LinFlexd2 in UART mode with the following configuration:
  ***115200 baud rate, 8 data bits, 1 stop bit, and no parity***.

<p style="text-align: center;"><strong>Note</strong></p>

+ When DMA is enabled, the maximum length of data received in a single operation is 256 bytes.
+ The Dummy DMA Channel does not require interrupt handling; it is recommended to disable the interrupt for this channel in the Platform module to reduce the CPU loading.

---

## Operation Instructions

+ ***Step 1***: Launch the sample YCT project file (**CddUart_WithDma_Demo.yct**) using YCT tool and configure the toolchain as needed (default: VS Code + GCC).
+ ***Step 2***: Generate the code. Modify configurations if necessary (to accommodate your hardware design), ensuring all changes are correct and error-free before code generation.
+ ***Step 3***: Open the generated project in your preferred development environment (VS Code/IAR/Keil IDE) based on your configuration.
+ ***Step 4***: Compile the project, power on the EVB, and flash the compiled executable using an available debugger (e.g., J-Link debug probe).
+ ***Step 5***: Power off the board, disconnect JTAG/SWD debug cables, then power on again.
+ ***Step 6***: Configure a serial terminal with 115200 baud rate, 8 data bits, 1 stop bit, and no parity. Run the demo code and send 5 bytes of data to the MCU, which will echo back the received 5 bytes.
---


## Hardware requirement
+ **EVB**: YTM32B1MD1-EVB-Q100-Rev.A/B
+ **Debugger**: J-Link HW v9 or later with YUNTU `YTM32B1MD1` patch(support package) installed.

**Note**: Please check the version number at the bottom of the EVB. If it is `YTM32B1MD1-EVB-Q100-Rev.A/B`, please use the example projects ending with `_RevA` for `Icu_Demo`.
---

## Software requirement

+ **Config & Code Generation Tool**
  + **MCAL**: Yuntu Config Tool(YCT) v2.7.0 or later version
+ **Compiler Toolchain**
  + **GCC**: GNU GCC v10.3 or later version
  + **Keil/MDK**: ARM Keil/MDK v5.36 or later version(`armclang v6.18.2` is recommended to be used as the compiler)
  + **IAR**: IAR v9.50 or later version
  + **VS Code**: Microsoft Visual Studio Code IDE v1.76 or later version(C/C++ support, GNU toolchain, CMake v3.25, ninja, Cortex-Debug extensions installation required)
+ **Debugger driver**
    + **J-Link**: SEGGER J-Link v7.82 or later version, YUNTU `YTM32B1MD1` patch(support package) installation required.
    + **Ozone Debugger tool**: SEGGER Ozone v3.28 or later version.

    ***Note***: **YTM32B1MD1** patch install required which can be obtained via **YCT** or contact ***YUNTU sales/FAE team***.

---