Hello Darnai,
What do you mean about self-test? In the MCU are many registers that let you know the state of the peripherals if there's an error in the communications, access to memories, etc. Is this what are you looking for?
Best Regards,
Alexis Andalon