Dear Experts,
I'm working on the IMX93 board bring-up. During testing of the RS485 peripherals, we used one of the GPIO pins (i.e., GPIO2_IO00) to toggle between logic 0 and logic 1.
While researching resources about GPIO configuration for the IMX93, I came across the method to find GPIO numbers using:
Our board is based on the IMX9352 processor. For GPIO2_IO00, I used the GPIO number 512,
and it worked correctly for the board. but, I would like to understand how this GPIO is configured. How is the GPIO number calculated for the IMX93 processor? Is there a specific formula for determining this? If so, could you please provide it?
Thanks & Regards
Ravikumar
解決済! 解決策の投稿を見る。
Hello @Embedded-world
I hope you are doing very well.
Linux kernel base the GPIO number based on the index, in this case:
But as I said, Linux kernel take as reference the index, so Real index:
You can use this formula to calculate your desired pin:
GPIO_NUMBER = GPIO_BASE_INDEX + PIN_INDEX
As example, we can take the GPIO2_IO00:
GPIO_NUMBER = (512) + (0) = 512.
Also, you can take a look to the gpiod tool installed by default in our BSP. It is easy to use (gpiodetect, gpioset, gpioget, etc.):
I hope this can helps to you.
Best regards,
Salas.
Hello @Embedded-world
I hope you are doing very well.
Linux kernel base the GPIO number based on the index, in this case:
But as I said, Linux kernel take as reference the index, so Real index:
You can use this formula to calculate your desired pin:
GPIO_NUMBER = GPIO_BASE_INDEX + PIN_INDEX
As example, we can take the GPIO2_IO00:
GPIO_NUMBER = (512) + (0) = 512.
Also, you can take a look to the gpiod tool installed by default in our BSP. It is easy to use (gpiodetect, gpioset, gpioget, etc.):
I hope this can helps to you.
Best regards,
Salas.