Native USB port, keyboard, how to toggle VBOF (5V native USB) at PB10 UOTGVBOF

conradelektro:
@Markus:

Wow, your code

UOTGHS->UOTGHS_CTRL = UOTGHS_CTRL_VBUSPO;

turns off the+5V at the native USB port (while the Arduino Due is getting power from the programming USB port). We are on the right track.

Now, please tell me how to toggle the UOTGVBOF the other way.

Thank you, Conrad

Try this

UOTGHS->UOTGHS_CTRL = ~UOTGHS_CTRL_VBUSPO;