Author: abhinavg_21 Version: **
Translation - Japanese: https://community.cypress.com/docs/DOC-20637
How to generate CY_U3P_UART_EVENT_TX_DONE in UartLpRegMode firmware example?
In the current implementation of UartLpRegMode firmware, which is in the following SDK path:
EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxuartlpregmode, the TX_DONE event cannot be generated since it is not enabled in the library. You need to modify certain registers to enable TX_DONE event.
1. Define following variables in the starting of your firmware code which store the addresses of registers:
uvint32_t *uart_config = (uvint32_t*)0xE0000800;
uvint32_t *uart_int_mask = (uvint32_t*)0xE000080C;
2. In CyFxUartLpApplnInit(), add these code lines after CyU3PUartSetConfig():
*uart_config &= ~((1u << 31));
*uart_int_mask |= (1u << 3);
*uart_config |= ((1u << 31));
This step enables the CYU3UART_EVENT_TX_DONE event.
3. Check for the CY_U3P_UART_EVENT_TX_DONE event in the callback function CyFxUartLpApplnCallback()