10-Apr-2023, 03:05 AM
Back in 2020, inspired by Umma95's build, I bought this Betafpv F405 V1.3 FC + ESC 2-4S 16A set. This week, I finally decided to build a drone. I know, I'm not fast lol
Betaflight identifies it as "AIRB/OMNIBUSF4SD(STM32F405), version: 0"
It seems like it has three UARTs:
But unfortunately, I couldn't find the RX6 pad on the board; there was only TX6. I really needed RX6 for GPS because I reserved UART1 and UART3 for CRSF and Vista.
In the resources, I found that RX6 is mapped to pin C07:
I looked up the CPU datasheet for the pin location and then found out that the pin seemingly wasn't connected to anything.
So, I soldered a thin wire to C07 and connected the GPS module's TX to it:
(I really don't need TX6 because I configured the GPS module manually, so I don't really need Betaflight to mess with it; I just want it to read the GNSS data stream.)
And it works well, even on 57600 bps! The CPU load didn't increase, so I guess it's not any kind of emulated serial UART.
But before I came to the solution described above, I had several failed attempts:
1) The most obvious idea was to free the resource for TX6 and use the already connected pin C06 as RX6:
It didn't work. Why?
2) I found out that pin B12 seemingly was intended for an SD card that I don't use, and it was connected to a convenient pad near the flash chip. So I freed B12 and mapped RX6 to it:
But this also didn't work. Why?
3) Then I read Oscar's "The Missing UART6" and tried all of the above with Serial UART: enabled it in the configuration, and tried to map SERIAL_RX 11 to C06 and then to B12. That also didn't work.
For each of the attempts above, I used a GPS configured to 9600 bps with a slow update rate of 500ms and set the speed manually in "Ports" to exclude any speed-related issues. And none of this helped. At the same time, the module worked well with UART1 or UART3.
So yeah, I figured it out, but it was a lot of work, and I'm still confused about how resource mapping works (to me it simply don't).
I hope the first part will help someone out there.
Betaflight identifies it as "AIRB/OMNIBUSF4SD(STM32F405), version: 0"
It seems like it has three UARTs:
But unfortunately, I couldn't find the RX6 pad on the board; there was only TX6. I really needed RX6 for GPS because I reserved UART1 and UART3 for CRSF and Vista.
In the resources, I found that RX6 is mapped to pin C07:
Code:
resource LED_STRIP 1 B06
resource SERIAL_TX 1 A09
resource SERIAL_TX 3 B10
resource SERIAL_TX 6 C06 <------------
resource SERIAL_RX 1 A10
resource SERIAL_RX 3 B11
resource SERIAL_RX 6 C07 <------------
So, I soldered a thin wire to C07 and connected the GPS module's TX to it:
(I really don't need TX6 because I configured the GPS module manually, so I don't really need Betaflight to mess with it; I just want it to read the GNSS data stream.)
And it works well, even on 57600 bps! The CPU load didn't increase, so I guess it's not any kind of emulated serial UART.
But before I came to the solution described above, I had several failed attempts:
1) The most obvious idea was to free the resource for TX6 and use the already connected pin C06 as RX6:
Code:
resource SERIAL_TX 6 none
resource SERIAL_RX 6 C06
It didn't work. Why?
2) I found out that pin B12 seemingly was intended for an SD card that I don't use, and it was connected to a convenient pad near the flash chip. So I freed B12 and mapped RX6 to it:
Code:
resource SERIAL_RX 6 B12
But this also didn't work. Why?
3) Then I read Oscar's "The Missing UART6" and tried all of the above with Serial UART: enabled it in the configuration, and tried to map SERIAL_RX 11 to C06 and then to B12. That also didn't work.
For each of the attempts above, I used a GPS configured to 9600 bps with a slow update rate of 500ms and set the speed manually in "Ports" to exclude any speed-related issues. And none of this helped. At the same time, the module worked well with UART1 or UART3.
So yeah, I figured it out, but it was a lot of work, and I'm still confused about how resource mapping works (to me it simply don't).
I hope the first part will help someone out there.