Yatli microcontroller development notes

Table of contents

1. Acquisition of development resources

2.Hardware resources

2.1 Hardware schematic pcb resources

2.2 Data sheet

3.SDK software resources

3.1 keil development environment configuration

3.2 Software Development Kit Description

3.3 jlink configuration

3.4 jlink programming and simulation

3.5 Description of program-related routines

4. Microcontroller development tools

5. Yatli Microcontroller Forum


1. Acquisition of development resources

        All resources of Yatli MCU are officially released. Official website address: Yatli Technology: the innovative leader of 32-bit microcontrollers!

Here is an example of obtaining AT32F415 series microcontroller resources:

  1. Enter the official website
  2. product information
  3. Value-for-money MCU
  4. AT32F415 series

         After performing the above operations, you will enter the product homepage, where there will be a brief introduction to this series of microcontrollers, and related resources can also be downloaded on this page.

 

 There are also some materials that can be downloaded from Technology and Development Support:  Artili Technologies: The innovative leader in 32-bit microcontrollers!

 

2.Hardware resources

        Hardware resources mainly include related design references and data descriptions. Here are the main parts:

  1. Product Select Guide: AT32 full series MCU selection manual
  2. Cross Reference Table: AT32 and Sxx32/Gx32 replacement comparison table
  3. Datasheet: AT32F415 series pin definition, electrical characteristics and packaging characteristics
  4. Evaluation Board (development board): AT32F415 development board and supports Arduino standard interface

2.1 Hardware schematic pcb resources

        The technology and development support page of Altium's official website provides the hardware design related to the development board. This circuit board was drawn using AltiumDesigner.

Download address: https://www.arterytek.com/download/AT-START/AT_START_F415_V1.3_CH.zip

 

There are three parts after opening:

  1. Schematic diagram
  2. pcb
  3. Hardware design documentation 

 These schematic diagrams can be opened using ad:

 pcb file:

 Hardware design document description:

         Note: After we understand the basic minimum system, power supply, crystal oscillator, and reset circuit of the microcontroller, before designing related peripherals, we must refer to and understand the official related peripheral circuits, otherwise it is easy to make mistakes.

Take the AT32F415 as an example. When its USB interface is used as a device, it is stated in the data sheet: (9) When OTGFS1 is used as a device, PA9 must remain high and cannot be used as GPIO or other multiplexing functions. Starting from silicon version C there is no above restriction.

If you don’t pay attention, it is easy to make design errors and it is also difficult to find problems.

2.2 Data sheet

        Before proceeding with hardware design, be sure to check the data sheet of the microcontroller. The most basic parts are:

  1. Debug: Serial Wire ( SWD ) /JTAG debug interface
  2. Specifications
  3. Power Control ( PWC )
  4. Pin definition (detailed explanation of IO remapping function)
  5. Electrical characteristics
  6. Package characteristics
The above sections provide a more detailed explanation of the key points of building a minimum hardware system.
If you want to design the related peripherals of the microcontroller by yourself, you can read the function introduction and related functions section in the data sheet .

3.SDK software resources

SDK software resources are also the official firmware libraries. Here we take AT32F415 as an example:

BSP: Supports AT32F415 underlying driver source code, presented in the firmware library (Firmware Library) https://www.arterytek.com/download/BSP/AT32F415_Firmware_Library_V2.0.7.zip

 Click the link above to download the SDK code library compressed package and open it as shown in the figure:

This is the software development kit for the AT32F15 series.

3.1 keil development environment configuration

        Before developing related software packages, we need to configure the keil environment first. Download the keil configuration file from the official website to configure the keil device library. Here we will continue to use the AT32F415 as an example:

Download the keil configuration package:

https://www.arterytek.com/download/PACK/Keil5_AT32MCU_AddOn_V2.1.7.zip

 I use KEIL5 here, so what I downloaded is the KEIL5 configuration package compressed file:

 Double-click ArteryTek.AT32F415_DFP.2.0.7.pack to install the keil configuration package:

I have already installed it here, so there is an alarm. After installation, you can open the example of the software development package. 

3.2 Software Development Kit Description

        The software development kit mainly contains the configuration library of the underlying peripherals, peripheral usage examples, peripheral usage instructions, and library usage documentation. After configuring keil, we can open the relevant routines according to the peripherals we need to use. For example gpio routine:

Open the use of other related peripherals as shown in the picture above. There are also related examples in the examples folder. 

3.3 jlink configuration

        After opening the project and compiling, we need to configure our own jlink driver to download the example to the development board.

First, we go to the jlink official website to download the jlink driver. The jlinkq driver official website address is: SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace

 

 Download and install the j-link software development package and install it.

Download the jlink configuration file from Arterytek’s official website https://www.arterytek.com/download/PACK/Segger_AT32MCU_AddOn_V2.0.6.zip

Open the compressed package and install the Yatli jlink configuration file. This now supports Yatli microcontrollers using keil to develop jlink simulation and debugging.

3.4 jlink programming and simulation

        Taking the AT32F415 just now as an example, we need to configure jlink simulation after opening the project, click on the keil magic wand

 Configure using jlink 

 

 Click the settings button next to Configure jlink

The following screen may pop up:

Click OK and then pop up

Select the Cortex-M4 in the picture above, and then change the configuration port to SW. The SW device on the right will pop up the identified chip IDCODE. Finally, click OK to end the configuration. You can download the program and simulate debugging in keil.

  If the chip cannot be recognized, please check whether the hardware jlink wiring is correct.

The VCC, SWDIO, SWCLK, GND, and RESET of jlink are connected to the VCC, PA13, PA14, GND, and NRST of AT32F415 respectively.

JLINK AT32F415
VCC VCC
SWDIO PA13
SWCLK PA14
GND GND
RESET NRST

        After the connection is completed, you can download the program simulation. It should be noted here that using jlink to repeatedly download the program from the microcontroller may fail. You can use the official ConfigJlink software to erase all sectors and then download it again. You can also use j-flash in the segger directory to erase the chip and then download the program again. That’s it.

 

 

 Click connect to connect to the microcontroller

 Just erase the entire flash.

Then click the download button in keil to download or simulate the program. 

3.5 Description of program-related routines

        The firmware SDk provides a large number of sample programs, as well as the peripheral configuration interface AT32F415_periph_lib_V2.0.7.chm document. If you do not know the firmware library during development, you can refer to this document.

AT32F415 Firmware Library BSP&Pack Application Guide.pdf This file explains the peripheral library and keil configuration

The libraries folder contains peripheral drivers and cortex-m4 drivers.

Middlewares include fatfs file system, freertos system, USB driver library, and USB host library.

The project contains sample programs for all peripherals, including USB devices and host gpio, timers, serial ports, i2c, can, spi, etc.

The utilities folder contains several usage demos, mainly including serial port iap, usb iap, freertos, and slib examples.

4. Microcontroller development tools

System clock configuration tool: AT32_New_Clock_Configuration_V3.0.04.zip

CAN baud rate configuration tool: Artery_CAN_BitRate_Configuration_V1.0.0.zip

I2C timing configuration tool: Artery_I2C_Timing_Configuration_V2.0.3.zip

ICP programming: Artery_ICP_Programmer_V3.0.06.zip

ISP programming: Artery_ISP_Multi-Port_Programmer_V2.0.06.zip and Artery_ISP_Programmer_V2.0.06.zip

USB HID sample tool: Artery_UsbHid_Demo_V1.0.2.zip

5. Yatli Microcontroller Forum

Artili AT32 MCU official technical support forum

Guess you like

Origin blog.csdn.net/klp1358484518/article/details/127818959