meta-iot2050 icon indicating copy to clipboard operation
meta-iot2050 copied to clipboard

Unable to read MMAPed memory location for GPIO

Open RoyBellingan opened this issue 8 months ago • 3 comments

I am trying to read the value of 2 pin (Header X12 pin 5 and 6 the GPIO 18 and 19)

It totally works fine using mraa_gpio_read, but the problem is the high overhead associated. This code will also be moved either in the Cortex®-R5F or the Pruss once the code prototype is ready (which I think I understood how to enable the Pruss but no idea yet for the R5F)

My problem is that following the https://www.ti.com/lit/ds/symlink/am6528.pdf I can not understand which memory location I have to monitor...

I tried with GPIO0_18 0x0011C048 and a few other but no results.

Using gpioinfo I have

gpiochip0 - 16 lines:
...
        line  12: "IO18-enable" "sysfs" output active-high [used]
        line  13: "IO19-enable" "sysfs" output active-high [used]

So I tried also 0x0011C030 (12x0x4 = 0x30) but no signal is detected.

Any idea how can I find the memory location ?

I tried to follow mraa that uses (probably) writer2 2578 root 40u REG 0,22 4096 24634 /sys/devices/platform/bus@100000/bus@100000:bus@28380000/bus@100000:bus@28380000:bus@42040000/42110000.gpio/gpiochip3/gpio/gpio449/value writer2 2578 root 41u REG 0,22 4096 24649 /sys/devices/platform/bus@100000/bus@100000:bus@28380000/40b00000.i2c/i2c-1/1-0021/gpiochip1/gpio/gpio494/value

But I have no idea how to convert this in or track which memlocation it does belong.

RoyBellingan avatar Jun 23 '24 02:06 RoyBellingan