- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Everybody,
with one of a Traveo™ II family of microcontroller, I try to use UART protocol to receive data from external input, I checked that signal is for sure there with oscilloscope, but the interrupt flag is not set with the help of trace32 environment, with the following initialization, am I missing something here? thanks in advance.
for(ucI = 0u; ucI < (uint8)LUART_NO_OF_CHANNELS; ucI++)
{
/* disable the serial communication block for configuration */
Luart_ktConfig[ucI].tChannelReg->unCTRL.stcField.u1ENABLED = 0u;
/* Program protocol specific information using UART_CTRL registers. */
Luart_ktConfig[ucI].tChannelReg->unUART_CTRL.stcField.u2MODE = 0x00; /* Standard UART submode */
Luart_ktConfig[ucI].tChannelReg->unUART_RX_CTRL.stcField.u3STOP_BITS = 1u;
Luart_ktConfig[ucI].tChannelReg->unUART_RX_CTRL.stcField.u1PARITY = 1u;
Luart_ktConfig[ucI].tChannelReg->unUART_RX_CTRL.stcField.u1PARITY_ENABLED = 1u;
Luart_ktConfig[ucI].tChannelReg->unUART_RX_CTRL.stcField.u1LIN_MODE = 1u;
/* Program generic transmitter (TX_CTRL) and receiver (RX_CTRL) information */
Luart_ktConfig[ucI].tChannelReg->unRX_CTRL.stcField.u5DATA_WIDTH = 7u;
Luart_ktConfig[ucI].tChannelReg->unRX_CTRL.stcField.u1MSB_FIRST = 0u;
/* Program transmitter FIFO (TX_FIFO_CTRL) and receiver FIFO (RX_FIFO_CTRL) information */
Luart_ktConfig[ucI].tChannelReg->unRX_FIFO_CTRL.stcField.u1CLEAR = 1u;
Luart_ktConfig[ucI].tChannelReg->unRX_FIFO_CTRL.stcField.u1CLEAR = 0u;
/* Program CTRL register to enable SCB */
Luart_ktConfig[ucI].tChannelReg->unCTRL.stcField.u1BYTE_MODE = 1u; /* 8-bit FIFO data elements */
Luart_ktConfig[ucI].tChannelReg->unCTRL.stcField.u2MODE = 2u; /* UART Mode */
Luart_ktConfig[ucI].tChannelReg->unCTRL.stcField.u4OVS = 11u; /* over sampling */
/* interrupt source */
Luart_ktConfig[ucI].tChannelReg->unINTR_RX_MASK.stcField.u1NOT_EMPTY = 1u;
/* enable the serial communication block after the configuration is finished.*/
Luart_ktConfig[ucI].tChannelReg->unCTRL.stcField.u1ENABLED = 1u;
}
Solved! Go to Solution.
- Tags:
- m4
- rx interrupt
- uart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Kindly get in touch with Cypress local FAE to test if you have any issue with our uart example.
Best regards,
Amy Wang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Kindly get in touch with Cypress local FAE to test if you have any issue with our uart example.
Best regards,
Amy Wang