Replies: 2 comments
-
|
Did you found any solution?
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @ArielElb, This discussion thread might help: #90108 Cheers! Loïc |
Beta Was this translation helpful? Give feedback.
-
|
Did you found any solution?
|
Beta Was this translation helpful? Give feedback.
-
|
Hi @ArielElb, This discussion thread might help: #90108 Cheers! Loïc |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hi! I have been using zephyr recently, and i found some issues while debugging the serial port (UART),I attempt to call the asynchronous serial port in the following order. However, the serial port does not have any data output and cannot accept data.
and uart_tx and uart_rx_enable both returns "-19", I don't understand what this return value represents, how should i solve it?
for more detailed information, i am using STM32G070KBT6 and the zephyr version is 3.3.0, I have already set the CONFIG_UART_CONSOLE=y
CONFIG_UART_ASYNC_API=y
CONFIG_UART_USE_RUNTIME_CONFIGURE=y
at the MyPrj_defconfig
Here is my rough code:
/* code start */
static uint8_t rx_buf[10] = {0};
uint8_t another_rx_buf[10] = {0};
static uint8_t tx_buf[] = {"Test Zephyr Uart Transmit Func Success! \n\r"};
void uartInterrupt(const struct device *uart, struct uart_event *evt, void *user_data){
}
int main(void)
{
uart_config my_config;
my_config.baudrate = 460800;
my_config.parity = UART_CFG_PARITY_NONE;
my_config.stop_bits = UART_CFG_STOP_BITS_1;
my_config.data_bits = UART_CFG_DATA_BITS_8;
my_config.flow_ctrl = UART_CFG_FLOW_CTRL_NONE;
}
/* code end */
Beta Was this translation helpful? Give feedback.
All reactions