Voxel2 GPIO Repurposing
-
@Ritwik-Majumdar No, the GPIO reconfiguration requires low-level access to the trustzone and then modification of the device tree. It is not supported in a general sense. I recommend connecting an arduino or something to perform your processing and then communicating with it over UART. It will be significantly more straight-forward to do so
-
Hi @Ritwik-Majumdar
Yup!
The Developer Test Board is exactly what you want for this test. It'll help you pick the GPIOs which are already "free" to make sure they work for you.
https://docs.modalai.com/voxl2-dev-test-board-user-guide/
It does not allow you to "remap" their trust zone settings (that is a software mapping), but this will basically let you try all options first to make sure they are available, so you will not need to have a unique trust-zone image for your purpose....
If you find some GPIOs are already blocked, then the post by the Moderator is correct.Here is a purchase link, but what is not clear is all the extra goodies you get with it. We include a nice tray/holder for your VOXL 2 plus this board, include a bunch of cables, SD Card, and some jumpers to get you started.
https://www.modalai.com/pages/beta-voxl-2-b2b-breakout-board
The orderable part number should be MDK-M0144-1-01It also includes an MCBL-00022-2 so you can connect an Alfa USB Dongle to the USB port.
https://docs.modalai.com/cable-datasheets/#mcbl-00022
Hope this helps! -
@Vinny Thanks for the response! So with the board, I can attempt to write to the pins, if they do nothing, they are blocked and unable to be used. If they do something, I am free to safely use the pin for my purpose.
On a second note, is the best way to have wifi and use the gpio pins to just use an arduino connected to J5 and the expansion board connected to J3? If so, how does the software work to send commands to the arduino via UART?
-
@Ritwik-Majumdar said in Voxel2 GPIO Repurposing:
@Vinny Thanks for the response! So with the board, I can attempt to write to the pins, if they do nothing, they are blocked and unable to be used. If they do something, I am free to safely use the pin for my purpose.
Yes, which is where the Dev test board will shine to help you determine the best course of action before committing to a firm solution.
On a second note, is the best way to have wifi and use the gpio pins to just use an arduino connected to J5 and the expansion board connected to J3? If so, how does the software work to send commands to the arduino via UART?
J3 and J5 are both connected at the same time to the Dev test Board and most of our products. We make a few small boards that just connect to J3, but not J5. So, that being said, you want to envision your final solution picking up both J3 and J5 at the same time. We can help you review any schematics if you make any custom HW that plugs into J3/J5.
For the Software question, I am not the one that can answer that.
You might be best starting a new Forum topic specifically for that and a SW team member will respond.
Hope that helps!
-
if you wanted to use UART from J3 to talk to an Arduino, see here : https://docs.modalai.com/voxl2-connectors/#j3-pin-out , pins 3,5 are UART7 which are mapped to
/dev/ttyHS1
in the linux subsystem. you can use it as regular UART port. HS stands for High Speed.J5 has another UART which is mapped to
/dev/ttyHS2
.Since you need wifi + uart, perhaps what you need is this :
- https://www.modalai.com/products/m0141?variant=46829445284144 (breakout board + wifi module)
- expansion board doc: https://docs.modalai.com/usb2-type-a-breakout-add-on/, schematic : https://storage.googleapis.com/modalai_public/modal_schematics/M0141_Schematic_REVA.pdf
- this provides uart via
/dev/ttyHS1
(3.3V levels)
Is there anything else you would need?
Alex
-
@Vinny @Alex-Kushleyev This is all really helpful. Thank you! But I want to make clear what I need.
I have a VOXL 2 that I want to connect to a device with the following requirements:
- This device requires 16 GPIO Pins at 3.3V to operate.
- The VOXL2 also needs to have a constant connection to WiFi.
- Minimal time between function call and actuation of the GPIO Pin
- Minimal additional software (drivers, etc) that needs to be written (ideally there is an SDK I can use with the board(s))
The controller code for the device on the VOXL2 makes the following function call: "Pin X to Hi/Lo". For a bit clearer understanding, here is a rough schematic of what I need:
The Developer Test Board will do the entire thing for me without any additional software or B2B connections provided it has enough available GPIO pins at the required voltage. If it cannot acheive this, I need some insight into the following:
- A connector that adapts the proprietary connectors on the VOXL 2 to something more widely used (USB Mini B is an example).
- The correct port (JX) that will allow me to directly command the GPIO board (Like J5 or J3, etc)
- Advice on which boards will play well with the VOXL2 and can be commanded from the VOXL2 like gpio_write(PIN,HI/LO) with minimal additional software. (An example of what I need could be this board.
I understand that this sounds a lot like UART which could be a viable solution. However, I do not know if UART-enabled boards are fast and require no custom software scripts to be setup.
Please let me know if you need anything clarified. Thanks again!
-
@Ritwik-Majumdar
To be honest, it seems as if you may need custom Hardware to mate with VOXL 2.
We made this site to help folks along, so please let me know if you need any extra help.
https://docs.modalai.com/expansion-design-guide/
We can provide a courtesy SCH review for you.
Thanks!
Vinny -
@Vinny How about https://docs.modalai.com/usb2-type-a-breakout-add-on/? Would this work to get a USB-A output from the VOXL2? This would be perfect for my application. I would also need one for the WiFi. It seems that this uses the J3 port, is is possible to get one that uses the J5 port instead? If not, could I use a usb splitter or something else to connect the WiFi dongle?
-
@Ritwik-Majumdar said in Voxel2 GPIO Repurposing:
I would also need one for the WiFi. It seems that this uses the J3 port, is is possible to get one that uses the J5 port instead?
We do not have one for J5, hence you might need to design a custom hardware solution for your application.
-
An alternative to designing your own board, as I mentioned already is the following:
Since you need wifi + uart, perhaps what you need is this :
- https://www.modalai.com/products/m0141?variant=46829445284144 (breakout board + wifi module)
- expansion board doc: https://docs.modalai.com/usb2-type-a-breakout-add-on/, schematic : https://storage.googleapis.com/modalai_public/modal_schematics/M0141_Schematic_REVA.pdf
this provides uart via /dev/ttyHS1 (3.3V levels)
This will give you one USB port which will be used by the wifi dongle. Also on M0141 you also have UART that is mapped to VOXL2 cpu. The only other thing you would need is a UART to GPIO bridge. You could use a Raspberry Pi Pico (which has several uarts and plenty of GPIO) and simply send a ASCII command from the VOXL2 via UART to the Pico, which will update the GPIO ports. You will need to write some code for Raspberry Pi Pico to receive UART command and control the GPIO.
The connector for UART on m0141 is JST GH, which is easy to find.
Finally, if that does not work for you, you can still use the M0141 and attach a USB hub to it, and then use the USB hub for the wifi dongle and another USB device (usb to gpio device). Perhaps this is the best solution for you.
Alex
-
The diagrams may be helpful to explain the two options we proposed which do not require you to design any custom boards to plug into VOXL2. You will need to take care of interfacing to a GPIO board either using UART or USB.
Option1:
Option2: