lis3mdl magnetometer
-
@Eric-Katzfey Hello again, question on accessing things plugged into the j19 i2c port, how would I access them outside of px4? I saw this https://forum.modalai.com/post/13604 so I'm guessing I can't use /dev/i2c-0 to acccess that port, however looking through the px4 for referenec it seems like it does use the app proc https://github.com/modalai/px4-firmware/blob/7fbbdc31e8a61525777d8edcf8f339a738abf138/src/lib/drivers/device/posix/I2C.cpp#L87 So is this the correct way to do it or is there something else I have to do?
-
@mkriesel That is the i2c driver code for the "posix" px4 platform, or apps side. That won't help with J19 which is only available to the dsp. We don't currently provide a way to access those i2c outside of px4.
-
@Eric-Katzfey is it possible for you to provide me the code that interfaces with the j19 i2c in px4 so I can look at if I wanted to write my own interface with that port?
-
@mkriesel At a high level it is a driver like: https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/magnetometer/isentek/ist8310. This, on the Qurt platform, will end up using this low level driver: https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/drivers/device/qurt/I2C.cpp
-
@Eric-Katzfey Hello
I've looked through px4 and I'm alittle lost on how exactly this all works maybe you can give alittle more detail. I understand the the ports are configured to the spli proc to be used on the dsp but where extacly does this interface, In I2C.cpp you showed above it sets all the functions to null and then they get decalred on init but I can't find where they actually interface with the i2c registers.After that would I need to compile my program with Hexagon SDK or is it possible at all to interface with this i2c port in the normal Ubuntu environment at all?My understanding is that the uart on the same J19 is configured in the same way but I can access those through the libqrb5165-io and voxl-io.h so is there something similar available for i2c or could I implement my own in a similar way and if I could how would I go about doing this?
-
@mkriesel The low level driver is Qualcomm proprietary so we cannot share it. But you don't need to look at that code to use an i2c port. You just need to use the interface functions provided by px4.
-
@mkriesel Yes, you would need to compile the DSP code with the Hexagon SDK.
-
@mkriesel You cannot access the DSP i2c ports from the applications processor.
-
@mkriesel We don't have any immediate plans to add dsp i2c access to libqrb5165-io.
-
@Eric-Katzfey Hi again, sorry for all the questions but for an update, I was able to get the compass working for my application by using the mavlink pipe and for now this is sufficient, however if I wanted to reconfigure the port to have it on the application processor instead could I do that? Again, it doesn't matter if I lose functionality in px4 because I don't plan to use it if I don't have to but if those GPIO pins are available I would like to explore that option.
Thanks for all the help so far.
-
@mkriesel The VOXL 2 does not have any i2c brought out to connectors for the applications processor. However, there are some add-on boards that do include this. For example: https://docs.modalai.com/usb2-type-a-breakout-add-on/
-
@Eric-Katzfey I undertand you do not have any Voxl 2 mini schematics open to the public but is it possible for you to share with me the gpio pins that J19 are on for the QRB5165 board?
-
https://docs.modalai.com/voxl2-mini-connectors/#j19---external-sensors-2x-uart-2x-i2c
here is a link for voxl2 (not mini) : https://docs.modalai.com/voxl2-connectors/
does this help?
-
@Alex-Kushleyev @mkriesel , I just updated that table to include the raw GPIO numbers.
However, I'm certain that they are unusable as GPIOs due to Trust Zone settings we have applied using them as I2C/UART etc. -
Hi @mkriesel
Have you seen this product we offer? This may be something that interests you:
https://docs.modalai.com/voxl2-dev-test-board/Our purchase link is buried in our beta section due to the risk of such product:
https://www.modalai.com/pages/beta-voxl-2-b2b-breakout-board
It includes a lot of extras not posted such as a tray to hold everything together, an SD Card, many cables, and several jumpers to get you going.
Hope this helps! -
@Vinny Thanks for the help on this I really appreciate it. I'll take a look.