Hello,
I ran the comparator example for the MIMXRT1020-EVK from SDK_2_9_1_MIMXRT1021xxxxx/boards/evkmimxrt1020/driver_examples/cmp/polling/cmp_polling.c and it works as expected for the default GPIO_AD_B0_14 pin on the eval board.
I am trying to use pin GPIO_AD_B0_10 instead for my project and I cannot get it to work. The user LED stays off when I connect J19-6 (GPIO_AD_B0_10) to J19-8 (VCC) or J19-7 (GND).
I changed the following in pin_mux.c:
// From
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_14_GPIO1_IO14,0U);
// To
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10,0U);
and cmp_polling.c:
// From
#define DEMO_CMP_BASE CMP1
// To
#define DEMO_CMP_BASE CMP3
According the reference manual, GPIO_AD_B0_10 is on cmp 3.
I also tried GPIO_AD_B0_11 with cmp 4 without any luck.
I added some more input parameters in pin_mux.c as well:
gpio_pin_config_t inputGPIO = {
.direction = kGPIO_DigitalInput,
.outputLogic = 0U,
.interruptMode = kGPIO_NoIntmode
};
GPIO_PinInit(GPIO1, 10U, &inputGPIO);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, 0x01B0A0U);
This wasn't working on our custom board so that is why I'm trying this on the eval board to make sure it wasn't an issue on our side.
Any help would be appreciated