Did you set up your Raspberry Pi (I assume you use one) like this:
https://wiki.recalbox.com/en/tutorials/controllers/gpio/gpio-controllers
Look at the "Configuration" Part
https://wiki.recalbox.com/en/tutorials/controllers/gpio/set-until-4-features-on-each-gpio-port