I am using an i.MX93 with Linux on the Cortex-A55 and bare-metal MCUXpresso SDK firmware on the Cortex-M33.
I want both cores to use different pins of GPIO2:
Linux: touchscreen and buttons. The touchscreen uses GPIO2_IO11/IO12 for IRQ/reset.
M33: GPIO2_IO22 as an interrupt input (RANin) and GPIO2_IO27 as an output (RANout).
Problem
Without starting the M33 firmware, the Linux touchscreen works, buttons also. When the M33 firmware runs, touch and buttons no longer work, and the touchscreen interrupt counter in /proc/interrupts does not increase:
on M33 I use this configuration:
#define PIN_IN_RGPIO GPIO2
#define PIN_OUT_RGPIO GPIO2
#define PIN_IN_RGPIO_PIN 22U
#define PIN_OUT_RGPIO_PIN 27U
#define M33_PIN_MASK ((1U << PIN_OUT_RGPIO_PIN) | (1U << PIN_IN_RGPIO_PIN))
#define EXAMPLE_RGPIO_CLOCK_ROOT kCLOCK_Root_BusWakeup
#define EXAMPLE_RGPIO_CLOCK_GATE kCLOCK_Gpio2
const clock_root_config_t rgpioClkCfg = {
.clockOff = false,
.mux = 0,
.div = 1
};
CLOCK_SetRootClock(EXAMPLE_RGPIO_CLOCK_ROOT, &rgpioClkCfg);
CLOCK_EnableClock(EXAMPLE_RGPIO_CLOCK_GATE);
CLOCK_EnableClock(kCLOCK_Gpio2);
PIN_OUT_RGPIO->PCNS &= ~M33_PIN_MASK;
GPIO2->ICNS = 0x0;
RGPIO_SetPinInterruptConfig(GPIO2, 22U,
kRGPIO_InterruptOutput0,
kRGPIO_InterruptRisingEdge);
EnableIRQ(GPIO2_0_IRQn);
I would appreciate a support for that.
Bests