Colibri iMX8X on a Aster carrier board with TorizonCore accessing Raspberry PI header

Hi,
We are trying to port our current setup from a raspberry pi to a Colibri iMX8X and a Aster carrier board.
The product description says “The Aster Carrier Board has headers compatible with Arduino Uno and Raspberry Pi (RPi) maker boards, thus enabling users to use a variety of 3rd party modules/add-on boards like Arduino Shields and Raspberry Pi adapter boards.”… however we are struggling to find any straightforward documentation on this.

We seem to understand that the the GPIO pins can be accessed through sysfs which would make the port quite easy. We can see the GPIO seems to be mapped differently (see GPIO (Linux)). But even using the method described there, we don’t seem to be able to access the correct pins.

  • Is there somewhere at some layer of the OS where the GPIO pinout is mapped?

  • Also we have some drivers for a raspberry pi hat that communicates via SPI through the GPIO headers. Would this need to be recompiled with the Toradex toolchain?

  • Is there any other useful resource that can help with the transition from RPI to the Aster carrier board?

Thank you in advance for any help.

Dear @morlandi,

Welcome to Toradex Community :rocket: ! Please feel free to roam around.

Could you please share a bit more details of your intended setup?

  • Which Version of the Colibri iMX8X are you going to use?
  • Which Version of the Aster Carrier Board are you going to use?
  • Which OS do you plan to have on the system and which version?

Also, about your points,

Please try to refer to the new developer website at developer.toradex.com. Some articles on developer-archives may have outdated information.

The GPIO pinouts are mapped on the device trees. You can find for instance here the definition of lsio_gpio0 https://github.com/toradex/device-trees/blob/toradex_5.4-2.3.x-imx/dts-arm64/imx8x-colibri.dtsi#L1120. You can learn more about device trees here: High performance, low power Embedded Computing Systems | Toradex Developer Center

You can check the available drivers on your image by running zcat /etc/config.gz | grep -i driver_name. If your driver names are not listed there, you’ll probably need to recompile the image. Do you know which drivers would you need already?

I’ll try to find articles and posts on the community on the meantime.

Please tell me if this helps.

Best regards,

thank you for your quick response @gclaudino.tx!

We are currently testing with:

  • Colibri iMX8X v. 1.0D module
  • Aster board v. 1.1B
  • TorizonCore os

We are using lora_gateway and packet_forwarder to drive a Laird RG186-M2 module (https://www.mouser.co.uk/datasheet/2/986/Product_Brief_-_Sentrius_RG1XX-M.2_Concentrator_Ca-1730524.pdf) installed on a custom made rpi hat. We currently have cross compiled the software for arm 64bit and works fine on a RPI. It also seem to run on our new Toradex setup, but we need to toggle a gpio line when the module starts up, in order for it to initialise and that’s where we got a bit stuck.

Thank you again for all the useful information provided - we’ll continue digging into it.

Dear @morlandi,

As you’re using Torizon, I’d suggest you to have a link at these links:

This is an overview of GPIO usage on TorizonCore. The page has even sample codes written in Python and C++ on the page.

Would this help you or you’d need more information?

1 Like

Hi @gclaudino.tx thank you very much for that.

Yes we are able to access GPIO using the suggested method!

However we have now the problem that it seems like there is no driver for the spi controller on the TorizonCore kernel for the our Aster/iMX8Xsetup. Do we need to build our own image of TorizonOS to enable it?

Hi @morlandi,

Thanks for the update!

Do you know what drivers would you need on the Kernel? I can try to double-check it for you. If they’re indeed not enabled, the best option would be for you to compile your own image of TorizonCore to test and check if everything works Building External Kernel Modules With Torizon | Toradex Developer Center. Then, we can ask the team to enable them by default on the next builds.

Best regards,

Hi @morlandi, do you have any other information on the topic?

Best regards,

Hi @gclaudino.tx,

Sorry for the delay - we managed to make the spi comms work.

The issue was that the spi device would not show up at all under /dev/ …

we managed to test spi comms reflashing the unit with the Embedded Linux image and then manually edit the overlay file under /boot/overlays.txt adding colibri-imx8x-eval_spidev_overlay.dtbo to it. And it all seems to work well.

In the long run, we want to use TorizonCore, but we will have to create a ad-hoc image with the right overlays.
We were just hoping to be able to quickly prototype and test the hardware using the default image, without having to build our own…but we managed somehow! :slightly_smiling_face:

1 Like

Hi @morlandi,

Thanks a lot for the update. I’m glad you could make it work. If you have any problems while building your custom image please feel free to come back again :smiley:

Best regards,