Anyone have FrSky SmartPort telemetry working on a Matek F405 Wing?

It took some serious trail and error before I got it running on my board. So I thought it would make sense to document it in this thread, even though is old. I’ve noticed that some other earlier replies never got it working with the same receiver so I hope you’ll find it useful.

Board: Matek F405-SE (version 4.2.1 stable)
Receiver: FrSky ACCST R-XSR
Connections:
Non-inverted S.Port (named P on the receiver) connected to TX5
Inverted (green cable in the connector) SBUS connected to Sbus
Settings (remember to restart controller after setting the settings):
SERIAL5_BAUD=57
SERIAL5_OPTION=4
SERIAL5_PROTOCOL=10
SERIAL7_BAUD=57
SERIAL7_OPTION=0
SERIAL7.PROTOCOL=23