当前位置:网站首页>USB (十八)2022-04-17
USB (十八)2022-04-17
2022-07-07 21:50:00 【晓晓暮雨潇潇】
Cyusb3014开发经验总结
1.固件开发
1.1串口打印调试信息
在固件开发时,可以利用串口打印调试信息,获得代码执行情况的指示。固件中,用于打印调试信息的串口配置如下,其中波特率的设置为112500,停止位为1,无校验位。在程序设计过程中,可在适当位置调用CyU3PDebugPrint函数打印信息,固件工程中可查看该函数原型。赛普拉斯官方代码非常规范,很多地方会进行返回值有效性检测并打印相关信息,在数据发送过程中,可以关注串口信息,看是否数据有溢出或丢失,如下图所示。
CyU3PUartConfig_t uartConfig;
CyU3PMemSet ((uint8_t *)&uartConfig, 0, sizeof (uartConfig));
uartConfig.baudRate = CY_U3P_UART_BAUDRATE_115200;
uartConfig.stopBit = CY_U3P_UART_ONE_STOP_BIT;
uartConfig.parity = CY_U3P_UART_NO_PARITY;
uartConfig.txEnable = CyTrue;
uartConfig.rxEnable = CyFalse;
uartConfig.flowCtrl 边栏推荐
- Two minutes, talk about some wrong understandings of MySQL index
- 双非大厂测试员亲述:对测试员来说,学历重要吗?
- Are the microorganisms in the intestines the same as those on the skin?
- Adrnoid开发系列(二十五):使用AlertDialog创建各种类型的对话框
- Online interview, how to better express yourself? In this way, the passing rate will be increased by 50%~
- 网格(Grid)
- 微信论坛交流小程序系统毕业设计毕设(5)任务书
- 网络安全-安装CentOS
- 2022 words for yourself
- 网络安全-联合查询注入
猜你喜欢

Develop those things: go plus c.free to free memory, and what are the reasons for compilation errors?

Wechat forum exchange applet system graduation design (2) applet function

How to operate DTC community?

消息队列与快递柜之间妙不可言的关系

Sword finger offer 55 - I. depth of binary tree

肠道里的微生物和皮肤上的一样吗?

Innovation today | five key elements for enterprises to promote innovation

Gbu1510-asemi power supply special 15A rectifier bridge gbu1510

Microbial health network, how to restore microbial communities

ArcGIS:字段赋值_属性表字段计算器(Field Calculator)依据条件为字段赋值
随机推荐
Software test classification
知识点滴 - PCB制造工艺流程
Microbial health network, how to restore microbial communities
Network security -beef
双非大厂测试员亲述:对测试员来说,学历重要吗?
Byte hexadecimal binary understanding
Introduction to anomaly detection
Brush question 3
Quelles sont les similitudes et les différences entre les communautés intelligentes et les villes intelligentes?
When copying something from the USB flash disk, an error volume error is reported. Please run CHKDSK
Statistical method for anomaly detection
聊聊 Dart 的空安全 (null safety) 特性
Unity 动态合并网格纹理
JMeter interface automated test read case, execute and write back result
网络安全-对操作系统进行信息查询
Wechat forum exchange applet system graduation design (3) background function
./ setup. Insufficient sh permission
每日一题——PAT乙级1002题
二叉树(Binary Tree)
Classification and prediction of heartbeat signal