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
SDA/SCL On A UART?
#1
Hey everyone, I just received a new quad https://www.hglrc.com/collections/freest...el-version (HGLRC Sector 5 BNF) today.  It came with their Zeus F722 FC and a basic GPS (M80) installed.  It also has Betaflight installed but I’ve always used iNav so I’ll be installing iNav on it.  I have this FC on two other quads and they have a dedicated six pin plug for the GPS which I REALLY like.  I was planning to replace the M80 with a Beitian BN-880 to also have a compass.  I figured I’d be able to simply unplug the M80 and plug up the BN-880 but....NOT!  For some strange reason HGLRC doesn’t have the GPS port on the F722 board they use on the BNF Sector 5 AND there’s no pads for SDA/SCL.  So...since I don’t use DJI on UART 4 it’s not being used and I was hoping there was a way to remap SDA/SCL to UART 4 so I have a compass and GPS.  Is that possible with iNav?  If not maybe I’ll just leave Betaflight on this quad.  Any help would be greatly appreciated!

JW
Reply
Login to remove this ad | Register Here
#2
It looks like there are a few different versions of the Zeus F722 FCs. Can you take some clear pictures of the board?
Reply
#3
I have an older version of this FC without the SCL/SDA pads.

HGLRC has a newer version of the FC with dedicated SCL/SDA pads which are maps to resources B09 and B09 respectively. These pads are not broken out on the previous versions of the FC.

For most FC's UART 1 and UART 3 are common candidates to be remapped as SCL/SDA pads but in the case of this FC you only have a T3 pad which means just half of UART 3 making this useless. 

I did see several people mention this issue with the older boards on reddit and rcgroups and no one seems to have confirmed any success connecting a I2C device to the FC, which is why HGLRC came out with a newer version of the board since it always had a Barometer making it an ideal candidate for iNav builds.

If you were to try as a last attempt then I suggest you try UART 1 (T1/R1) or UART 4 (T4/R4) but this will mean moving the receiver wires to another UART. (Do not forget to do the resource mapping via the CLI).
Reply
#4
From the STM32F722RET6 datasheet, the following pins can be mapped to I2C resources:
B06 I2C1 SCL, B07 I2C1 SDA
B08 I2C1 SCL, B09 I2C1 SDA
B10 I2C2 SCL, B11 I2C2 SDA
A08 I2C3 SCL, C09 I2C3 SDA
   

From the Betaflight target, we can see the following resources are assigned:
Code:
# resources
resource BEEPER 1 C13
resource MOTOR 1 B04
resource MOTOR 2 B05
resource MOTOR 3 B00
resource MOTOR 4 B01
resource MOTOR 5 A15
resource MOTOR 6 B03
resource MOTOR 7 B06
resource MOTOR 8 B07
resource PPM 1 A03
resource PWM 1 A02
resource PWM 2 A01
resource PWM 3 A00
resource LED_STRIP 1 A08
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 A02
resource SERIAL_TX 3 B10
resource SERIAL_TX 4 A00
resource SERIAL_TX 6 C06
resource SERIAL_RX 1 A10
resource SERIAL_RX 2 A03
resource SERIAL_RX 3 B11
resource SERIAL_RX 4 A01
resource SERIAL_RX 6 C07
resource I2C_SCL 1 B08
resource I2C_SDA 1 B09
resource LED 1 A14
resource LED 2 A13
resource SPI_SCK 1 A05
resource SPI_SCK 2 B13
resource SPI_SCK 3 C10
resource SPI_MISO 1 A06
resource SPI_MISO 2 B14
resource SPI_MISO 3 C11
resource SPI_MOSI 1 A07
resource SPI_MOSI 2 B15
resource SPI_MOSI 3 C12
resource ADC_BATT 1 C02
resource ADC_RSSI 1 C00
resource ADC_CURR 1 C01
resource BARO_CS 1 A04
resource PINIO 1 C08
resource PINIO 2 C09
resource FLASH_CS 1 D02
resource OSD_CS 1 B12
resource GYRO_EXTI 1 C04
resource GYRO_CS 1 B02
resource USB_DETECT 1 C14
B06 and B07 are mapped to motors 7 and 8. Are these broken out on your FC? They'd likely be labeled S7 and S8. To use these as I2C in iNav, you'd need to compile a custom build with updated pin definitions. 

B08 and B09 are already assigned to I2C, but these pads aren't broken out on you board. You could always solder directly to the legs of the MCU if you feel comfortable and I2C would work without any other configuration. 

B10 and B11 are broken out as UART3. If both TX3 and RX3 are broken out on your board you should be able to map them to I2C, but this will require a custom iNav build as well.

A08 and C09 are mapped to LED_STRIP and PINIO 2, respectively. If LED_STRIP is broken out on this board you'd only have to make one solder connection to the MCU at C09. You'd lose whatever PINIO functionality is assigned to USER2, and again this would require a custom iNav build.
[-] The following 2 users Like V-22's post:
  • JoyMonkey, lownslow
Reply
#5
(09-Jun-2021, 04:09 PM)V-22 Wrote: From the STM32F722RET6 datasheet, the following pins can be mapped to I2C resources:
B06 I2C1 SCL, B07 I2C1 SDA
B08 I2C1 SCL, B09 I2C1 SDA
B10 I2C2 SCL, B11 I2C2 SDA
A08 I2C3 SCL, C09 I2C3 SDA


From the Betaflight target, we can see the following resources are assigned:
Code:
# resources
resource BEEPER 1 C13
resource MOTOR 1 B04
resource MOTOR 2 B05
resource MOTOR 3 B00
resource MOTOR 4 B01
resource MOTOR 5 A15
resource MOTOR 6 B03
resource MOTOR 7 B06
resource MOTOR 8 B07
resource PPM 1 A03
resource PWM 1 A02
resource PWM 2 A01
resource PWM 3 A00
resource LED_STRIP 1 A08
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 A02
resource SERIAL_TX 3 B10
resource SERIAL_TX 4 A00
resource SERIAL_TX 6 C06
resource SERIAL_RX 1 A10
resource SERIAL_RX 2 A03
resource SERIAL_RX 3 B11
resource SERIAL_RX 4 A01
resource SERIAL_RX 6 C07
resource I2C_SCL 1 B08
resource I2C_SDA 1 B09
resource LED 1 A14
resource LED 2 A13
resource SPI_SCK 1 A05
resource SPI_SCK 2 B13
resource SPI_SCK 3 C10
resource SPI_MISO 1 A06
resource SPI_MISO 2 B14
resource SPI_MISO 3 C11
resource SPI_MOSI 1 A07
resource SPI_MOSI 2 B15
resource SPI_MOSI 3 C12
resource ADC_BATT 1 C02
resource ADC_RSSI 1 C00
resource ADC_CURR 1 C01
resource BARO_CS 1 A04
resource PINIO 1 C08
resource PINIO 2 C09
resource FLASH_CS 1 D02
resource OSD_CS 1 B12
resource GYRO_EXTI 1 C04
resource GYRO_CS 1 B02
resource USB_DETECT 1 C14
B06 and B07 are mapped to motors 7 and 8. Are these broken out on your FC? They'd likely be labeled S7 and S8. To use these as I2C in iNav, you'd need to compile a custom build with updated pin definitions. 

B08 and B09 are already assigned to I2C, but these pads aren't broken out on you board. You could always solder directly to the legs of the MCU if you feel comfortable and I2C would work without any other configuration. 

B10 and B11 are broken out as UART3. If both TX3 and RX3 are broken out on your board you should be able to map them to I2C, but this will require a custom iNav build as well.

A08 and C09 are mapped to LED_STRIP and PINIO 2, respectively. If LED_STRIP is broken out on this board you'd only have to make one solder connection to the MCU at C09. You'd lose whatever PINIO functionality is assigned to USER2, and again this would require a custom iNav build.

Hmm, since I’m not that terribly comfortable writing a custom iNav build I’m probably just going to order the Zeus F722 board with the GPS connector and be done with it.  Thanks so much for researching this and all the information!

JW
Reply
#6
(09-Jun-2021, 04:09 PM)V-22 Wrote: From the STM32F722RET6 datasheet, the following pins can be mapped to I2C resources:
B06 I2C1 SCL, B07 I2C1 SDA
B08 I2C1 SCL, B09 I2C1 SDA
B10 I2C2 SCL, B11 I2C2 SDA
A08 I2C3 SCL, C09 I2C3 SDA


From the Betaflight target, we can see the following resources are assigned:
Code:
# resources
resource BEEPER 1 C13
resource MOTOR 1 B04
resource MOTOR 2 B05
resource MOTOR 3 B00
resource MOTOR 4 B01
resource MOTOR 5 A15
resource MOTOR 6 B03
resource MOTOR 7 B06
resource MOTOR 8 B07
resource PPM 1 A03
resource PWM 1 A02
resource PWM 2 A01
resource PWM 3 A00
resource LED_STRIP 1 A08
resource SERIAL_TX 1 A09
resource SERIAL_TX 2 A02
resource SERIAL_TX 3 B10
resource SERIAL_TX 4 A00
resource SERIAL_TX 6 C06
resource SERIAL_RX 1 A10
resource SERIAL_RX 2 A03
resource SERIAL_RX 3 B11
resource SERIAL_RX 4 A01
resource SERIAL_RX 6 C07
resource I2C_SCL 1 B08
resource I2C_SDA 1 B09
resource LED 1 A14
resource LED 2 A13
resource SPI_SCK 1 A05
resource SPI_SCK 2 B13
resource SPI_SCK 3 C10
resource SPI_MISO 1 A06
resource SPI_MISO 2 B14
resource SPI_MISO 3 C11
resource SPI_MOSI 1 A07
resource SPI_MOSI 2 B15
resource SPI_MOSI 3 C12
resource ADC_BATT 1 C02
resource ADC_RSSI 1 C00
resource ADC_CURR 1 C01
resource BARO_CS 1 A04
resource PINIO 1 C08
resource PINIO 2 C09
resource FLASH_CS 1 D02
resource OSD_CS 1 B12
resource GYRO_EXTI 1 C04
resource GYRO_CS 1 B02
resource USB_DETECT 1 C14
B06 and B07 are mapped to motors 7 and 8. Are these broken out on your FC? They'd likely be labeled S7 and S8. To use these as I2C in iNav, you'd need to compile a custom build with updated pin definitions. 

B08 and B09 are already assigned to I2C, but these pads aren't broken out on you board. You could always solder directly to the legs of the MCU if you feel comfortable and I2C would work without any other configuration. 

B10 and B11 are broken out as UART3. If both TX3 and RX3 are broken out on your board you should be able to map them to I2C, but this will require a custom iNav build as well.

A08 and C09 are mapped to LED_STRIP and PINIO 2, respectively. If LED_STRIP is broken out on this board you'd only have to make one solder connection to the MCU at C09. You'd lose whatever PINIO functionality is assigned to USER2, and again this would require a custom iNav build.

I picked up a couple of these FC's on clearance recently, and ran into the very same issue trying to get I2C for a compass on an iNav LR build. I spent a while working out what pins were used and what was broken out where before I stumbled across this thread. The only real option does seem to be some delicate solder surgery on the F722 pins.
Here's a copy of my homework if it's of any use to others.
[Image: DQa7XFwl.png]
Reply
#7
That FC you have is the older version of the HGLRC F722 Mini. I have one on my Explorer LR 4" build.

The newer version comes with the individual I2C pads broken out.

Sad thing is that UART 3 which can be reassigned I2C functions is not available as a full UART on the FC and only T3 is available. You will need to solder at least 1 wire to the PB11 pin to be able to use RX3.

Or solder 2 wires to PB8 and PB9.
Reply
#8
(09-Jun-2022, 07:00 AM)kafie1980 Wrote: That FC you have is the older version of the HGLRC F722 Mini. I have one on my Explorer LR 4" build.

The newer version comes with the individual I2C pads broken out.

Sad thing is that UART 3 which can be reassigned I2C functions is not available as a full UART on the FC and only T3 is available. You will need to solder at least 1 wire to the PB11 pin to be able to use RX3.

Or solder 2 wires to PB8 and PB9.

Yup. The clearance FC's even came with diagrams showing the board with the I2C pads broken out, just to taunt me!
I got some 30awg kynar wrapping wire soldered on. I used the kapton tape to hold the wires in place during soldering, then dabbed everything with some conformal coating sealant afterwards to hopefully prevent the wires from trying to pull away from the IC legs. Fingers (and other appendages) crossed!
[-] The following 1 user Likes JoyMonkey's post:
  • Suros
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Kakute F7 and settings UART for ESC comunication Tomatos666 3 1,371 21-Apr-2020, 03:57 PM
Last Post: Tomatos666
  Uart issues on Omnibus f4 v3 [email protected] 0 1,394 01-Aug-2018, 02:54 AM
Last Post: [email protected]


Login to remove this ad | Register Here