UART interrupt Arduino Due ?

Yes and...no. Inside the interrupt function, Serialx.available is updated, BUT, Serialx.available is tested Inside Loop().
If you want a 100% USART3 received buffer interrupt driven, you will have to write your own

I guess. Serialx.available() is a pretty tiny and light-weight function; if you can't call it within you main loop without slowing things down too much, it probably means that there are other aspects of your code logic that need to be re-thought. (for example, I'm pretty sure that having an actual serial ISR serviced die to arriving data is more expensive than checking serial.available.) (perhaps you should post of of that code...)
In any cases, Serial3 should be pretty much the same as Serial (assuming "Serial" hasn't been redirected to the native USB peripheral.) Serial3 is a USART rather than a UART, but AFAIK that only results in some minor changes at initialization time. To replace the stock interrupt handler with your own, you should remove the USART3_Handler from variant.cpp and replace it with a similarly named function off in your own code.
Note that USART2 is not used as a serial port by the Arduino code.

AFAIK The interrupt handlers defined in the Arduino library call each a hook function which is weakly defined with a default behavior. These definitions can be found in the Arduino standard library files cortex_handlers.c and hooks.c.

/*
  Copyright (c) 2012 Arduino.  All right reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include "Arduino.h"
#include "Reset.h"

#ifdef __cplusplus
extern "C" {
#endif

static void __halt() {
  // Halts
  while (1)
    ;
}

extern void svcHook(void);
extern void pendSVHook(void);
extern int sysTickHook(void);

/* Cortex-M3 core handlers */
void NMI_Handler       (void) __attribute__ ((weak, alias("__halt")));
void HardFault_Handler (void) __attribute__ ((weak, alias("__halt")));
void MemManage_Handler (void) __attribute__ ((weak, alias("__halt")));
void BusFault_Handler  (void) __attribute__ ((weak, alias("__halt")));
void UsageFault_Handler(void) __attribute__ ((weak, alias("__halt")));
void DebugMon_Handler  (void) __attribute__ ((weak, alias("__halt")));
void SVC_Handler       (void) { svcHook(); }
void PendSV_Handler    (void) { pendSVHook(); }

void SysTick_Handler(void)
{
  if (sysTickHook())
    return;

  tickReset();

  // Increment tick count each ms
  TimeTick_Increment();
}

/* Peripherals handlers */
void SUPC_Handler       (void) __attribute__ ((weak, alias("__halt")));
void RSTC_Handler       (void) __attribute__ ((weak, alias("__halt")));
void RTC_Handler        (void) __attribute__ ((weak, alias("__halt")));
void RTT_Handler        (void) __attribute__ ((weak, alias("__halt")));
void WDT_Handler        (void) __attribute__ ((weak, alias("__halt")));
void PMC_Handler        (void) __attribute__ ((weak, alias("__halt")));
void EFC0_Handler       (void) __attribute__ ((weak, alias("__halt")));
void EFC1_Handler       (void) __attribute__ ((weak, alias("__halt")));
void UART_Handler       (void) __attribute__ ((weak, alias("__halt")));
#ifdef _SAM3XA_SMC_INSTANCE_
void SMC_Handler        (void) __attribute__ ((weak, alias("__halt")));
#endif
#ifdef _SAM3XA_SDRAMC_INSTANCE_
void SDRAMC_Handler     (void) __attribute__ ((weak, alias("__halt")));
#endif
void PIOA_Handler       (void) __attribute__ ((weak, alias("__halt")));
void PIOB_Handler       (void) __attribute__ ((weak, alias("__halt")));
#ifdef _SAM3XA_PIOC_INSTANCE_
void PIOC_Handler       (void) __attribute__ ((weak, alias("__halt")));
#endif
#ifdef _SAM3XA_PIOD_INSTANCE_
void PIOD_Handler       (void) __attribute__ ((weak, alias("__halt")));
#endif
#ifdef _SAM3XA_PIOE_INSTANCE_
void PIOE_Handler       (void) __attribute__ ((weak, alias("__halt")));
#endif
#ifdef _SAM3XA_PIOF_INSTANCE_
void PIOF_Handler       (void) __attribute__ ((weak, alias("__halt")));
#endif
void USART0_Handler     (void) __attribute__ ((weak, alias("__halt")));
void USART1_Handler     (void) __attribute__ ((weak, alias("__halt")));
void USART2_Handler     (void) __attribute__ ((weak, alias("__halt")));
#ifdef _SAM3XA_USART3_INSTANCE_
void USART3_Handler     (void) __attribute__ ((weak, alias("__halt")));
#endif
void HSMCI_Handler      (void) __attribute__ ((weak, alias("__halt")));
void TWI0_Handler       (void) __attribute__ ((weak, alias("__halt")));
void TWI1_Handler       (void) __attribute__ ((weak, alias("__halt")));
void SPI0_Handler       (void) __attribute__ ((weak, alias("__halt")));
#ifdef _SAM3XA_SPI1_INSTANCE_
void SPI1_Handler       (void) __attribute__ ((weak, alias("__halt")));
#endif
void SSC_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC0_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC1_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC2_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC3_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC4_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC5_Handler        (void) __attribute__ ((weak, alias("__halt")));
#ifdef _SAM3XA_TC2_INSTANCE_
void TC6_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC7_Handler        (void) __attribute__ ((weak, alias("__halt")));
void TC8_Handler        (void) __attribute__ ((weak, alias("__halt")));
#endif
void PWM_Handler        (void) __attribute__ ((weak, alias("__halt")));
void ADC_Handler        (void) __attribute__ ((weak, alias("__halt")));
void DACC_Handler       (void) __attribute__ ((weak, alias("__halt")));
void DMAC_Handler       (void) __attribute__ ((weak, alias("__halt")));
void UOTGHS_Handler     (void) __attribute__ ((weak, alias("__halt")));
void TRNG_Handler       (void) __attribute__ ((weak, alias("__halt")));
#ifdef _SAM3XA_EMAC_INSTANCE_
void EMAC_Handler       (void) __attribute__ ((weak, alias("__halt")));
#endif
void CAN0_Handler       (void) __attribute__ ((weak, alias("__halt")));
void CAN1_Handler       (void) __attribute__ ((weak, alias("__halt")));

#ifdef __cplusplus
}
#endif
/*
  Copyright (c) 2012 Arduino.  All right reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

/**
 * Empty yield() hook.
 *
 * This function is intended to be used by library writers to build
 * libraries or sketches that supports cooperative threads.
 *
 * Its defined as a weak symbol and it can be redefined to implement a
 * real cooperative scheduler.
 */
static void __empty() {
  // Empty
}
void yield(void) __attribute__ ((weak, alias("__empty")));

If the programmer defines his own symbol (typically a function) with
the same name than a weak symbol, instead of complaining "multiply defined symbol", the
compiler will use the user's one instead of the default one.

E.g You can modify in your own code ADC_Handler(void), DACC_Handler(void), etc...
but the issue is that USART3_Handler is already redefined to give Serial3. USART2_Handler is not redefined (although it could be to give Serial4), hence you can redifine this interrupt Handler without any complain from the compiler.
Of course, you will need to declare its GPIOs as driven by the peripheral, power the peripheral (PMC), and so on.

I think this is the easiest way to do what you are willing to do.

Maybe i found out something or its just coincidence. On slave due I have i2c lcd 20x4 to printout some states where i use Wire and LiquidCrystal_I2C library.
When i comment libraries on slave and i dont use them it looks that timeout errors for Serial3 disappear on slave and also on master.
Can use of LiquidCrystal_I2C or Wire library affect Serial3 communication?
I tried change speed for i2c but its the same.

Yes, essentially any piece of code you add to a project affects its run time and thus can change the way other speed sensitive aspects work. It takes time to send things over any serial bus so the use of I2C will cause additional delays in your program. That could cause serial timeouts elsewhere. The solution here is to keep better track of all your serial comm and service it all rapidly enough. Yes, that's a lot easier for me to say than for you to do.

There are a variety of options.

You could do what I said before and modify the arduino core to allow for overriding the serial3 interrupt handler. Then you'd be able to respond to serial3 traffic much more rapidly.

You could call your routine to handle serial3 traffic right before you do a write out to I2C and then right afterward and see if that's fast enough.

You could break up your I2C calls and check the serial3 data in between.

You could use FreeRTOS or something to create a multi-tasking environment. in FreeRTOS you can modify the interrupt handler to use a queue and then create a task that spinlocks on the queue and processes it. Then when you get traffic FreeRTOS will automatically realize that the queue is not empty and schedule the consumer task to process it.

There are lots and lots of ways to fix your problem. The issue is that they all are a bit more complicated and require that you can accurately figure out what your problem is and how to fix it. That's something that takes a lot of time and experience. But, give it a shot and I'm sure you'll learn something. You can always ask questions about anything you don't know or can't figure out how to do.

For me it looks like seding data to i2c is bigger priority than serial3 so its waiting to finish lcd update.
Luckily lcd is not important this time so i wil just probably not use it.

But i try to refresh it by parts after each sent message i have like 4 ms time to do something.

Yes i see im limited by my possibilities but important is not to give up and at the end it will work :slight_smile:

LCD code tends to have delays, waiting for the slow LCD controller. I would have thought that an I2C LCD would have additional intelligence, but that might depend on the exact model...

You are right. I checked that LiquidCrystal_I2C.cpp and there are delays for "waiting" so to use lcd i would definitely need interrups for Serial3.