Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Turning Off Inversion Circuit on F4 Flight Controller
#1
I was inspired by another member (bbffigjam) to look into turning off the hardware inversion circuit on F4 flight controller.  And credit goes to teralift from a different forum for the information.

As many of you know, unlike F3 and F7, F4 MCU do not have a built-in inverter.  Most manufacturers are adding an inversion circuit to one or two of their UART for use with Frsky SBUS and S.Port.  In some cases, you can turn this inverter off.  Any FC that uses a GPIO pin to trigger the inversion, this method below should work.  Not everyone uses Frsky, this way they can reclaim back at least UART RX, if not also a UART TX.

I have only tested this on my CL Racing F4 which I have on hand.

The first thing to do is go to your target source code and see if your FC has a control pin for the inverter.
Goto Github betaflight source code.
Go into "src" folder.
Then "main"
And then "target" or click the link below

https://github.com/betaflight/betaflight...ain/target

Now look for the folder containing your target firmware and go into that folder.
Look for a file "target.h" and click on the file.
Look for the line

Code:
#define INVERTER_PIN_UART1        PC0 // PC0 used as inverter select GPIO

Note the pin number, in this case PC0 (pin C00).  Also note the comment "PC0 used as inverter select GPIO".  If you don't have the comment notation, I don't know if it will work or not.  In my case, I only have one inverter that is selectable, even though my CL Racing also have a second inverter for the telemetry.  I have not tested whether this inverter is used for both UARTs.  When I am not too tired, I will test the inverter on telemetry.

Now that you have the information, connect your FC to Betaflight configurator.
Goto CLI
Type "resource".  You should see a line like below.  Remember my pin is C00, yours will likely be different.

Code:
resource INVERTER C00

Free the resource

Code:
resource INVERTER none
save

That should turn the inverter off.  But for some reason, the inverter is still on.

Code:
resource PINIO 1 C00
save

If you want to turn the inverter back on, you can reassigned the resource INVERTER back to C00, or you can manually trigger the PINIO

Code:
set PINIO_CONFIG = 129, 1, 1, 1
save

If you want to turn if off again

Code:
set PINIO_CONFIG = 1, 1, 1, 1
save
[-] The following 8 users Like voodoo614's post:
  • Green_Weedle, V-22, Pedro28july, kaitylynn, SnowLeopardFPV, Drone0fPrey, Oscar, bffigjam
Reply
Login to remove this ad | Register Here
#2
Glad you got it figured out, it can definitely be handy when you're short a UART!
I'm really IntoFPV
Youtube|Instagram|Facebook|Steam
Don't forget to rate people who have helped you!
Reply
#3
That's great to know! Thanks for sharing Voodoo!
Don't be a LOS'er, be an FPV'er :)  My Gear - Facebook - Instagram - Twitter
Reply
#4
Awesome this should do the trick
Reply
#5
Hi, anybody tested the above? Eager to know.
Reply
#6
(29-May-2019, 07:54 AM)gcl_2000 Wrote: Hi, anybody tested the above? Eager to know.

I tested it. Otherwise I would have not posted it.
Reply
#7
(29-May-2019, 08:39 AM)voodoo614 Wrote: I tested it. Otherwise I would have not posted it.

Thank you very much
Reply
#8
This worked on my CLRacing F4S running Betaflight 4.2, but I had to use this command to free the inverter:

Code:
resource INVERTER 1 none
save
[-] The following 1 user Likes jseaber's post:
  • kaligola
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Why not run flight controller under Linux? enok71 22 961 28-Feb-2024, 06:49 AM
Last Post: Pathfinder075
  Beta flight settings caddx vista... whatever 19 9,456 22-Jun-2023, 03:10 PM
Last Post: mattyfleischfpv
  Using a old aio fc as a wireless sim controller Rob Axel 7 823 06-Sep-2022, 02:06 AM
Last Post: Rob Axel
  Flight data / Telemetry K.Flucas@937 5 2,977 14-Nov-2020, 10:42 PM
Last Post: EVILsteve
  Mavic Pro Controller Hack Treetops 5 1,717 03-Apr-2020, 11:11 AM
Last Post: SnowLeopardFPV


Login to remove this ad | Register Here