Hello,
I post here today to ask you for help, I need to know how Arduino IDE uses polling (serial.available) I search and find the code but I do not understand how is adapt on a STM32 , I would like to use polling on an STM with CubeMX so use a command like serial.available().
Thank you for your help !
Use Serial.available with CubeMX
Re: Use Serial.available with CubeMX
Usually it doesnt use polling. Serial.available returns amount of unread data in the rx buffer. That buffer filled by reading serial with serial interrupt handler.
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: Use Serial.available with CubeMX
Actually, this is polling (the read buffer)
https://forum.arduino.cc/index.php?topic=468340.0
You will find your answer quicker on: community.st.com
For example:
https://community.st.com/s/question/0D5 ... -interrupt
https://community.st.com/s/question/0D5 ... age-length
https://stm32f4-discovery.net/2017/07/s ... using-dma/
Code: Select all
while (!Serial.available())
;
Serial.print(timer);
}
You will find your answer quicker on: community.st.com
For example:
https://community.st.com/s/question/0D5 ... -interrupt
https://community.st.com/s/question/0D5 ... age-length
https://stm32f4-discovery.net/2017/07/s ... using-dma/
-
- Posts: 1
- Joined: Mon Apr 10, 2023 1:35 am
Re: Use Serial.available with CubeMX
The code exists, but I can't figure out how to modify it for usage on an STM32. I'd want to implement polling on an STM using CubeMX, but I'm not sure how to do so ().