Dec 19, 2017
11:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 19, 2017
11:48 PM
Hi,
im using this basic uart configuration:
XMC_GPIO_CONFIG_t rx_pin_config;
XMC_GPIO_CONFIG_t tx_pin_config;
XMC_UART_CH_CONFIG_t uart_config;
/* UART configuration */
uart_config.data_bits = 8U;
uart_config.stop_bits = 1U;
uart_config.baudrate = 9600U;
//uart_config.baudrate = 115200U;
//uart_config.oversampling = 16U;
uart_config.frame_length = 8U;
uart_config.parity_mode = XMC_USIC_CH_PARITY_MODE_NONE;
/* Configure UART channel */
XMC_UART_CH_Init(XMC_UART0_CH0, &uart_config);
/* Start UART channel */
XMC_UART_CH_Start(XMC_UART0_CH0);
/* Configure input */
XMC_UART_CH_SetInputSource(XMC_UART0_CH0,XMC_UART_CH_INPUT_RXD,USIC0_C0_DX0_P2_1);
/* Configure RX pin */
rx_pin_config.mode = XMC_GPIO_MODE_INPUT_PULL_UP;
XMC_GPIO_Init(UART_RX_PIN, &rx_pin_config);
/* Configure TX pin */
tx_pin_config.output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH;
tx_pin_config.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT6;
XMC_GPIO_Init(UART_TX_PIN, &tx_pin_config);
This configures the fifo registers for receive and transmit. I need to configure this peripheral without fifo. How i can do that?
thanks.
im using this basic uart configuration:
XMC_GPIO_CONFIG_t rx_pin_config;
XMC_GPIO_CONFIG_t tx_pin_config;
XMC_UART_CH_CONFIG_t uart_config;
/* UART configuration */
uart_config.data_bits = 8U;
uart_config.stop_bits = 1U;
uart_config.baudrate = 9600U;
//uart_config.baudrate = 115200U;
//uart_config.oversampling = 16U;
uart_config.frame_length = 8U;
uart_config.parity_mode = XMC_USIC_CH_PARITY_MODE_NONE;
/* Configure UART channel */
XMC_UART_CH_Init(XMC_UART0_CH0, &uart_config);
/* Start UART channel */
XMC_UART_CH_Start(XMC_UART0_CH0);
/* Configure input */
XMC_UART_CH_SetInputSource(XMC_UART0_CH0,XMC_UART_CH_INPUT_RXD,USIC0_C0_DX0_P2_1);
/* Configure RX pin */
rx_pin_config.mode = XMC_GPIO_MODE_INPUT_PULL_UP;
XMC_GPIO_Init(UART_RX_PIN, &rx_pin_config);
/* Configure TX pin */
tx_pin_config.output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH;
tx_pin_config.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT6;
XMC_GPIO_Init(UART_TX_PIN, &tx_pin_config);
This configures the fifo registers for receive and transmit. I need to configure this peripheral without fifo. How i can do that?
thanks.
- Tags:
- IFX
0 Replies