this is the output shown by the M4 side
/* Power on Peripherals. */
if (sc_pm_set_resource_power_mode(ipc, SC_R_GPIO_3, SC_PM_PW_MODE_ON) != SC_ERR_NONE)
{
PRINTF("Error: Failed to power on GPIO\r\n");
}
from the message, I’m a little confused where the problem is because according to the .c gpio example code snippet that I customized, it seems like there is a problem in the SC_R_GPIO_3 resource. Then after I checked also the ownership of the resource also has a false output.
sc_bool_t owned = sc_rm_is_resource_owned(ipc, SC_R_GPIO_3);
if (!owned)
{
PRINTF("GPIO3 not owned...\r\n");
}
Then on
$ dmesg
I found that there was a failure on pinctrl. But I still don’t know the cause why, because it’s not all gpio that doesn’t work but after I checked only gpio 1 - 6 are dead (because the UART that I use for serial debug and gpiofan is running properly).
[ 0.216244] imx8qm-pinctrl system-controller:pinctrl: initialized IMX pinctrl driver
[ 0.218176] imx8qm-pinctrl system-controller:pinctrl: pin_config_set op failed for pin 13
[ 0.218183] imx8qm-pinctrl system-controller:pinctrl: Error applying setting, reverse things back
[ 0.218198] imx8qm-pinctrl system-controller:pinctrl: failed to select default state