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
L2c mamba stack
#1
Hi

This DJI Mamba Stack doesn’t have an I2C pad but I’ve heard that some flight controllers have uarts with shared resource so you can use one of the UARTs as i2c

Anyone have any experience with this?

This is the stack

https://www.diatone.us/collections/mamba...ller-stack
Reply
Login to remove this ad | Register Here
#2
You might have to email Diatone to ask.
Reply
#3
I just took a look at the the unified target resource mappings for the Mamba F722 boards and cross referenced those with the F722 MCU datasheet.

There are 4 MCU pins for the Mamba F722 FC's that have been mapped to physical breakout pads on the Mamba F722 board which also have I2C capabilities according to the datasheet. Those pins are as follows:-
  • UART1 TX (MCU Pin B6) ----> can be remapped to an I2C SCL resource
  • UART1 RX (MCU Pin B7) ----> can be remapped to an I2C SDA resource
  • UART3 TX (MCU Pin B10) ----> can be remapped to an I2C SCL resource
  • UART3 RX (MCU Pin B11) ----> can be remapped to an I2C SDA resource
So in a nutshell you can remap either or both UART1 and UART3 pads to I2C resources on the mamba F722 flight controllers Smile
Reply
#4
Good job Snow.
Reply
#5
Yeah, navigating datasheets for MCUs can seem daunting because they are usually hundreds of pages long, but if you know exactly what type of information you're looking for it's not actually too bad finding what you need Smile
Reply
#6
(07-Jul-2020, 10:24 PM)SnowLeopardFPV Wrote: I just took a look at the the unified target resource mappings for the Mamba F722 boards and cross referenced those with the F722 MCU datasheet.

There are 4 MCU pins for the Mamba F722 FC's that have been mapped to physical breakout pads on the Mamba F722 board which also have I2C capabilities according to the datasheet. Those pins are as follows:-
  • UART1 TX (MCU Pin B6) ----> can be remapped to an I2C SCL resource
  • UART1 RX (MCU Pin B7) ----> can be remapped to an I2C SDA resource
  • UART3 TX (MCU Pin B10) ----> can be remapped to an I2C SCL resource
  • UART3 RX (MCU Pin B11) ----> can be remapped to an I2C SDA resource
So in a nutshell you can remap either or both UART1 and UART3 pads to I2C resources on the mamba F722 flight controllers Smile

Snow you are a hero as always but i am actually asking about this board....

https://www.diatone.us/collections/mamba...ller-stack

Not the F722

Any chance you could look for that?
Reply
#7
You might be out of luck. It looks like the same pin assignment as the F7. But on the F405, there is not a full UART break out for UART 1 or UART 3.
Reply
#8
Doh  I'll make sure I read the requirements properly next time.

You could make use of the UART1 pads (remapped as per my previous post) as long as you also disable the software controlled inverter on that UART. The "RC" pad is effectively the SBUS pad or an RX1 pad if you disable the inverter. The (TBS)TX1 pad is the normal TX1 pad with no inverter on it. If you did this you would need to use a different UART for your receiver, and if you are using an FrSky receiver you would also then need to do the uninversion hack for that.

Alternatively, if you think you can fly on just two motors then you can remap the MOTOR 2 and MOTOR 3 resources to I2C SCL and I2C SDA resources respectively ROFL
Reply
#9
Total drop the ball on this one. Good catch. I think I am going to step away. Haha.
Reply
#10
There doesn’t seem to be an i2c resource option unless I’m missing something?

Using firmware 4.0.5

Can post a pic in the morning but in CLI when I type “resource” then it shows the options of what I can type i2c is not there
Reply
#11
Just update the FC to Betaflight 4.2. The way resources work was changed in Betaflight 4.1 (and Betaflight 4.2) with the implementation of unified targets. Instead of used resources, you now get a list of all available resources including unused ones.
Reply
#12
(08-Jul-2020, 10:28 PM)SnowLeopardFPV Wrote: Just update the FC to Betaflight 4.2. The way resources work was changed in Betaflight 4.1 (and Betaflight 4.2) with the implementation of unified targets. Instead of used resources, you now get a list of all available resources including unused ones.

Ok updating betaflight did sort that issue out, but i cannot get it working.  It could be that i am not disabling the inverter correctly. But this has two TX1 pads. one inverted and one not. I've tried both (at least i think i have).

I have tried setting the addresses to 118 (usually for BMP180) and 119 (usually for the 280 which is what i am using) but still when i enable the barometer and reboot it turns its self back off. So its not seeing it. 

Here is a diff dump


Code:
# version
# Betaflight / STM32F405 (S405) 4.2.0 Jun 14 2020 / 03:04:22 (8f2d21460) MSP API: 1.43
# config: manufacturer_id: DIAT, board_name: MAMBAF405US, version: cdb02aa1, date: 2020-05-24T03:18:53Z

# start the command batch
batch start

board_name MAMBAF405US
manufacturer_id DIAT

# resources
resource INVERTER 1 NONE
resource I2C_SCL 2 B06
resource I2C_SDA 2 B07

# serial
serial 0 0 115200 57600 0 115200
serial 3 0 19200 57600 0 115200

# master
set acc_calibration = -40,21,-61,1
set baro_bustype = I2C
set baro_spi_device = 2
set baro_i2c_device = 2
set baro_i2c_address = 118
set baro_hardware = AUTO
set serialrx_provider = CRSF

profile 0

rateprofile 0

# end the command batch
batch end


and here is a dump of my resources

Code:
# resource
resource BEEPER 1 C13
resource MOTOR 1 A09
resource MOTOR 2 A08
resource MOTOR 3 C09
resource MOTOR 4 C08
resource PPM 1 B09
resource LED_STRIP 1 B03
resource SERIAL_TX 1 B06
resource SERIAL_TX 2 A02
resource SERIAL_TX 3 B10
resource SERIAL_TX 4 A00
resource SERIAL_TX 5 C12
resource SERIAL_TX 6 C06
resource SERIAL_RX 1 B07
resource SERIAL_RX 2 A03
resource SERIAL_RX 3 B11
resource SERIAL_RX 4 A01
resource SERIAL_RX 5 D02
resource SERIAL_RX 6 C07
resource I2C_SCL 2 B06
resource I2C_SDA 2 B07
resource LED 1 C15
resource LED 2 C14
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 B05
resource ESCSERIAL 1 B09
resource CAMERA_CONTROL 1 B08
resource ADC_BATT 1 C01
resource ADC_RSSI 1 C02
resource ADC_CURR 1 C03
resource PINIO 1 B00
resource FLASH_CS 1 A15
resource OSD_CS 1 B12
resource GYRO_EXTI 1 C04
resource GYRO_CS 1 A04


What am i missing here?
Reply
#13
(09-Jul-2020, 08:46 AM)ITGeekLondon Wrote: What am i missing here?

You need to release the UART resource assignments for those two MCU pins because only one resource can use the pins and UART ownership takes precedent over I2C ownership. So run the following commands...

Code:
resource SERIAL_TX 1 NONE
resource SERIAL_RX 1 NONE
save
Reply
#14
(09-Jul-2020, 11:24 AM)SnowLeopardFPV Wrote: You need to release the UART resource assignments for those two MCU pins because only one resource can use the pins and UART ownership takes precedent over I2C ownership. So run the following commands...

Code:
resource SERIAL_TX 1 NONE
resource SERIAL_RX 1 NONE
save

That still didnt work. Just going to try soldering to the other pad and try again.
Reply
#15
Can you please also run the "resource show all" CLI command and post the results back here.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Mamba Stack - DJI F405 MK2 FC with ibus mj451971 7 537 03-Jun-2024, 10:01 PM
Last Post: SnowLeopardFPV
  Mamba Mk5 F435 Stack - Anyone running one? Pathfinder075 7 890 18-Apr-2024, 02:55 PM
Last Post: punkkone
  GEPRC TAKER F722 BLS 50A STACK hawk01 1 234 28-Mar-2024, 10:33 PM
Last Post: hawk01
  GOKU F722 PRO V2 50A BLS 30X30 Stack (MPU6000) husafreak 2 242 03-Mar-2024, 05:09 PM
Last Post: husafreak
  Diatone stack current sensor problem Myman 10 1,723 27-Dec-2023, 12:02 AM
Last Post: Birbal


Login to remove this ad | Register Here