5328 views|1 replies

280

Posts

0

Resources
The OP
 

[XMC4800 Relax EtherCAT Kit Review] + Getting started with DAVE, a preliminary exploration of simple UART applications [Copy link]

I have got the XMC4800 for almost a week, and I gradually feel the power of the DAVE software. For a certain component, the program calls it APP, which can be directly added, and then the corresponding settings are made, and then the code is generated. Users only need to pay attention to their main, and for related sans-serif]APPmodule, in the generated code, there are actually routines for the use of each function.
This time, I simply applied UART, and it was very simple to realize the serial port sending data. The specific process is as follows for your reference:
1. The specific method of creating a new DAVE project and adding the APP module will not be introduced here. You can follow the previous tutorials to build the program and add the UART APP. 2. Here we can focus on the UART settings in the APP, which is the 8-1-n method with a baud rate of 9600.400665[/attach]
3. To use the serial port in the USB debugger, you must check the drawing, where the definition of TX and RX is clear, but the drawing is not particularly clear. Because the debugger uses xmc4200, it feels strange when I first look at this part of the drawing.400666[/attach]
4. Set the corresponding pins and click Generate Code. 5.1. Refer to the example of generated code and write your own main function. After initializing UART, it starts sending data continuously.
The code is relatively simple:
  1. int main(void) { DAVE_STATUS_t status; status = DAVE_Init(); /* Initialization of DAVE APPs */ UART_STATUS_t init_status; uint8_t valid_str[] = "hello world!\n"; init_status = (UART_STATUS_t)UART_Init(&UART_0); if(status != DAVE_STATUS_SUCCESS) { /* Placeholder for error handler code. The while loop below can be replaced with an user error handler. */ */ while(1U) { if(init_status==UART_STATUS_SUCCESS){ UART_Transmit(&UART_0, valid_str, sizeof(valid_str)); } } }
复制代码
6. Use putty, set the corresponding parameters, and you can see the data information sent by xmc4800.
In general, DAVE software allows users who have never been exposed to Infineon products to easily get started and make their own applications. For engineering applications, it greatly improves the efficiency of engineers. Great! ! !
PS:I originally wanted to make a program for timing serial port transmission, but I just came into contact with DAVEsoftware. After studying each module in depth, I will rewrite one.
This content is created by flyword, a netizen of EEWORLD forum. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source

APP中的设置.png (50.92 KB, downloads: 0)

APP中的设置.png

图纸里的引脚位置.png (18.72 KB, downloads: 0)

图纸里的引脚位置.png

引脚配置.png (15.74 KB, downloads: 0)

引脚配置.png

Latest reply

Thanks for sharing, have fun!  Details Published on 2019-4-3 09:09
 

133

Posts

0

Resources
2
 
Thanks for sharing, have fun!
Personal signature

上海铱钲电子科技有限公司

 

 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list