A method for controlling at least one peripheral component by a secure element, in a portable electronic device comprising a microcontroller, the secure element, and the peripheral component, the method comprising the steps of:
- connecting the secure element to the microcontroller through a first serial data link,
- connecting the secure element to the peripheral component through at least one second serial data link,
- connecting at least one digital input of the peripheral component to at least one digital input/output of the microcontroller,
- configuring the secure element to send to the microcontroller, via the first data link, control commands of said digital input/output of the microcontroller so that said digital input/output provides a specified signal to the digital input of the peripheral component, and
- configuring the microcontroller to execute the control commands of its digital input/output received from the secure element.