The ISR for receive in UART will be called if you set the number of bytes set in the CyU3PUartRxSetBlockXfer API have been received.
Also, you need to enable the UART interrupt for RX_ENABLE as shown below:
UART->lpp_uart_config &= ~(CY_U3P_LPP_UART_ENABLE);
REG32(0xE000080C) = 0x1;
UART->lpp_uart_config |= CY_U3P_LPP_UART_ENABLE;
(Please refer the FX3 TRM for register details)
I have attached an example project in which the RX byte count is set to 1. This means after one byte is received, the ISR is called. (Note: Inside the ISR, I set the UART_ready flag as true and it in turns calls the the CyU3PDeviceReset API, so you will notice the device getting disconnected and know that the ISR is triggered)
USBBulkLoopAuto.zip 723.1 K
You have enabled the UART DMA, which I have tried.
The problem with this is that I cannot transmit using the CyU3PUartTransmitBytes() function, since this doesn't work with DMA mode.
Is there anyway to receive without DMA mode? I had partial, and inconsistent results with this method.
Madhu, from your example, where is the buffer where I read the data when the interrupt is triggered?
I'm seeing the interrupt trigger, so I believe data is being received, but the transmit is not working.
I'm not sure what I'm doing wrong, but the project has a lot going on with it.
To clarify, CyU3PUartTransmitBytes() does not work when DMA mode is true, which is the case for this project.
Using your example code, how then can I transmit?