当前位置:网站首页>USB (XVIII) 2022-04-17

USB (XVIII) 2022-04-17

2022-07-07 23:25:00 Xiao Xiao and evening rain Xiao Xiao

                        Cyusb3014 Summary of development experience

1. Firmware development

1.1 Print debugging information through serial port

During firmware development , You can use the serial port to print debugging information , Get instructions on code execution . In firmware , The serial port configuration for printing debugging information is as follows , The baud rate is set to 112500, The stop bit is 1, No parity bit . In the process of programming , It can be called in the appropriate place CyU3PDebugPrint Function print information , This function prototype can be viewed in firmware Engineering . The official code of cypress is very standard , Many places will check the validity of the return value and print relevant information , In the process of data transmission , You can pay attention to the serial port information , See if there is data overflow or loss , As shown in the figure below .

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 
原网站

版权声明
本文为[Xiao Xiao and evening rain Xiao Xiao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207072016330713.html