当前位置:网站首页>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 边栏推荐
猜你喜欢

I wish you all the best and the year of the tiger

The author of LinkedList said he didn't use LinkedList himself

微信论坛交流小程序系统毕业设计毕设(8)毕业设计论文模板

【微服务|SCG】gateway整合sentinel

【刷题记录】3. 无重复字符的最长子串

微生物健康網,如何恢複微生物群落

What does the model number of asemi rectifier bridge kbpc1510 represent

Transparent i/o model from beginning to end

Line test - graphic reasoning -7- different graphic classes

iNFTnews | Web5 vs Web3:未来是一个过程,而不是目的地
随机推荐
Unity 动态合并网格纹理
二叉树(Binary Tree)
Advantages and disadvantages of rest ful API
iNFTnews | Web5 vs Web3:未来是一个过程,而不是目的地
Lecture 30 linear algebra Lecture 5 eigenvalues and eigenvectors
智慧社区和智慧城市之间有什么异同
14、 Two methods of database export and import
Byte hexadecimal binary understanding
Network security CSRF
ADC采样率(HZ)是什么怎么计算
Why does the market need low code?
每日一题——PAT乙级1002题
Wechat forum exchange applet system graduation design completion (8) graduation design thesis template
肠道里的微生物和皮肤上的一样吗?
Network security - Eternal Blue
网络安全-对操作系统进行信息查询
About idea cannot find or load the main class
网络安全-联合查询注入
Circumvention Technology: Registry
Use JfreeChart to generate curves, histograms, pie charts, and distribution charts and display them to jsp-2