UART parity always None?
-
Hi guys, I'm currently trying to get the uart of my Wipy 2.0 working, but I can't change the parity of the UART object. I tried setting the parity in the constructor and also with init method. Neither UART.ODD nor UART.EVEN worked, I always ended up with parity=None when printing the uart object to the console. My firmware version is 1.5.0.b2
Can anybody help? -
Just for fun, did you try changing bits number also ?
-
Yes I tried different combination with data, parity and stop bits, but no effect. Even with UART(0, parity=UART.ODD) I get parity=None returned.
-
Yes, there is a small bug on esp32/mods/machuart.c
// parity uint32_t parity; if (args[2].u_obj == mp_const_none) { parity = UART_PARITY_DISABLE; } else { uint parity = mp_obj_get_int(args[2].u_obj);Last line (350) should not have the
uintas that is shadowing the intented parity variable defined above. -
Many thanks! So I will wait for the next update..
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login