How to maximize microcontroller temperature?
Frequency:
You should run your microcontroller at the maximum allowed frequency. Most losses occur while switching a FET.
Voltage:
You should run at maximum voltage
Peripherals:
Turn on and run all peripherals, like UART, SPI, ADC
Power output:
Either drive all remaining pins high, or switch them as fast as possible. You'll have to test what consumes more power.
Either way limit the current via a resistor
Co Processors:
Keep all of them busy, if any are available. Like Floating Point Units
RAM:
Read and Write data to RAM and Flash
7.ALU:
Keep the ALU busy, this is easy as long as you don't use any sleep states