Giter Club home page Giter Club logo

Comments (4)

Supowang1989 avatar Supowang1989 commented on August 16, 2024

Thanks for your question. We use tos_at_uart_input_byte() to read char data in uart interrupt,this function will push data into fifo. So you can do it like this https://github.com/Tencent/TencentOS-tiny/blob/master/board/TencentOS_tiny_EVB_MX_Plus/BSP/Src/stm32l4xx_it_module.c
#include "tos_at.h"
...

/* USER CODE BEGIN 1 */
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
extern uint8_t data;
if (huart->Instance == LPUART1) {
HAL_UART_Receive_IT(&hlpuart1, &data, 1);
tos_at_uart_input_byte(data);
}
}

from tobudos.

txaty avatar txaty commented on August 16, 2024

Thank you so much for your guidance! I have modified my program and it can work properly now.
By the way, I noticed that if I use the configuration in the example above, I have to call HAL_UART_Receive_IT() once after MX_USARTx_UART_Init(), perhaps in tos_hal_uart_init() in /kernel/hal/tos_hal_uart.c. (I am using stm32f103 MCU)

from tobudos.

Supowang1989 avatar Supowang1989 commented on August 16, 2024

Yes we must call HAL_UART_Receive_IT() once after MX_USARTx_UART_Init(), This is determined by the use of the STM32 HAL library. We will not merge your PR, because we will update the code of the AT framework in the next month to improve the overall performance.

from tobudos.

txaty avatar txaty commented on August 16, 2024

Well noticed with thanks~

from tobudos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.