Daniel, I discovered my problem.
At the beginning of my program I was disabling the watchdog.
__disable_interrupt(); // disable global interrupt
WDOG->CNT=0xD928C520; /* Unlock watchdog */
WDOG->TOVAL=0x0000FFFF; /* Maximum timeout value */
WDOG->CS = 0x00002100; /* Disable watchdog */
__enable_interrupt(); // enable global interrupt
But then after the settings of pwms, analog inputs, timers, I enabled.
I think that by being disabled when I enabled it it did not work.
Excluding the disable function, it started to work.
Thanks for your help.
Regards.