It is weird to have this delay, Could you change the period of osal_start_timerEx to 20000 and count from 1 to 30. The report cycle keeps at 10 minutes and see if you still have this problem. I revise your codes as the followings:
static uint8 con = 1; // counter variable
if(events & FLAG_TEST)
{
con--;
if( !con )
{
enviarTrama(0x9876, MsjEj, 4,0, POTENCIA_MAX_TRANSMISION, 1); // it sends a message each 10 min.
con = 30;
}
osal_start_timerEx(PROY_SincTaskId, FLAG_TEST,20000);
return events ^= FLAG_TEST;
}