2019-08-08 05:15 AM
hi I have an encoder that has channel A channel B 5 volt output only and I wonder if it is possible to read gpio interrupt with a cortex m4 since it works at 3.3 volts? Do you need a logic level converter, some resistor or read it anyway?
2019-08-08 06:16 AM
Most pins on the STM32 family of parts are 5V compatible when used as input pins (like you would with the encoder). Check the data sheet for your processor, there is a chart that lists every pin and will show it as "FT" if it is 5V tolerant. Using pins as outputs they cannot drive above 3.3V, so some tricks or level shifting is needed. You might also look at the various timers on your chip as it is likely that at least one of them can be configured in "encoder" mode and do all/most of the work for you.
2019-08-08 06:21 AM
Thanks