Hello, if Freejoy recognizes the device name, it proves that there is no problem with the firmware. If it cannot be written when flashing the firmware, it may be a fault of the STM32 main control; So from the beginning, I think you have successfully flashed the firmware and the freejoy software has recognized the device. If the axis has no output, please check the axis connection line and the axis sensor.You can use 2 groups of SPI lines, occupying 6 pins (4 common pins) to realize two CD4021*N. If your device also has axis data, you can use IIC's AD1115 to realize 4 channels. The total link line is 7PIN spi+IIC