Hello. I would like to know the relation of GPIOx_DR and GPIOx_IMR in i.MX6SL.
GPIOx_IMR was all cleared by GPIOx_DR register.
1. Set GPIO5_IMR = 0x000000c0 // To use the GPIO5 & GPIO5
2. Set GPIO5_DR =0x0000f000 // Set the 12 to 15 bit
--> As a result, GPIO5_IMR = 0x00000000 (All cleared! masked.)
Why is GPIOx_IMR cleared by setting GPIOx_DR?