Closed goosst closed 2 years ago
Sorry I closed the issue by mistake. There is no issue with USART variant, there can always be interferences in USART communication, that's why the invalid frames are being discarded.
https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/wiki/Variant-USART
ok so I tried the following:
on UART2:
Nothing works.
Then I changed to UART3: everything works fine from the start ...
I'd be interested to know if you are seeing the dropouts that I am getting with USART3? See issue #162.
I'm currently mechanically rebuilding it, will let you know when it's back alive. I was only commanding relatively constant speeds so far, so I might not have observed the issue.
Maybe for your issue, it's an idea to add an incrementing rolling counter in the feedback structure in the hoverboard firmware. Then you can at least easily filter double messages or know reliably how many messages you've missed at the ESP?
Best I can tell I’m not losing any messages...but every second or so I get the double frame which causes an extra 1 ms to capture the full data. But I modified the UART3 check code to accomplish this. So no significant performance effects so far on controlling motors. I also tried the UART2 ... tx worked fine but rx was dead. Never figured out why since connections were proper and input ports worked with ADC variant.
http://vamfun.wordpress.com Robot musing blog iPhone
On May 14, 2021, at 7:46 AM, goosst @.***> wrote:
I'm currently mechanically rebuilding it, will let you know when it's back alive. I was only commanding relatively constant speeds so far, so I might not have observed the issue.
Maybe for your issue, it's an idea to add an incrementing rolling counter in the feedback structure in the hoverboard firmware. Then you can at least easily filter double messages or know reliably how many messages you've missed?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
So you guys both had a problem with uart2, but one with RX and one with TX?
So you guys both had a problem with uart2, but one with RX and one with TX?
The commands I had sent were very constant, but they didn't time out. So they were working as far as I'm aware. Getting the feedback over uart2 was indeed not working.
So you guys both had a problem with uart2, but one with RX and one with TX? I wrote a better USART test program that uses DMA to recheck my board. USART2 works with the test program now so there is something in the USART2 Rx FOC firmware that is the cause. Maybe I'll get time to look into it again.
Hello,
Thank you for all the nice work, I'm able to control the hoverboard motors through UART2 using an ESP32. So that's a good start :). Also nice to see simulink / matlab models related to FOC ;).
However the feedback signals I'm receiving don't seem to come through reliably. I've tried running the Send and Receive functions from the .ino example at different task rates (copied my esp32 code below). It just varies from a lot of rubbish "Non-valid data skipped" to having strange reported values if they come true once.
Additional information in case it would help:
default_envs = VARIANT_USART
in platformio.iniAny advice how to debug or which firmware variants are recommended for debugging is appreciated, seeing quite some issues were opened related to USART, I might want to avoid reinventing known remedies.
thanks!