reboot from software (soft reset)

how can i do a software reset, which works with 4809?

i tried:

void reboot()
{

wdt_disable();
wdt_enable(WDTO_15MS);
while (true);
}

but this doesn’t work.

void reboot()
{
CPU_CCP = 0xD8;
WDT.CTRLA = 0x4;
while (true)
{
}
}

works for me

The 4809 also has a built-in “soft reset” feature. See the datasheet.

It should look something like:

 RSTCTRL_SWRR = RSTCTRL_SWRE_bm;