2022-09-18 12:49 PM
Hello, has anyone ever used UART to read arrow key?
I tried using STM32 MCU on CubeIDE, but can only get two characters ASCII number 27 and 91 and couldn't get the third character which is supposed to be 'A' for Up key, 'B' for Down key, 'C' for right key or 'D' for left key.
I tried using GNC compiler on PC and it worked.
2022-09-18 01:42 PM
Depends what your Terminal application actually sends.
The STM32 UART is agnostic about what you transmit in the 8-bit data byte
2022-09-18 02:26 PM
Ok. I tried PuTTY and Tera Term. They are same.
2022-09-18 04:34 PM
Perhaps your code is losing characters, the STM32 is capable of doing this without data loss, and seeing all characters on the wire.
2022-09-18 09:23 PM
Ok, let me check where the issue comes from. Thanks a lot Tesla!