IrDA Configuration Arduino Due

I am trying to set up USART for IrDA communication. The pin TX3 is connected to pin RX2. The signal pattern of the transmission is correct. But on the receiving end the frame is not received. I assume it is because of the configuration of IrDA FILTER Register (US_IF) and the FI DI RATIO Register (US_FIDI).

I had two interpretations of the information from the data sheet:

  • the IrDA filter counter uses the mcu clock (84MHz) US_IF = 1776
  • an addtional oversampling frequency is set with US_FIDI = 16 AND US_IF = 12

Both of them do not work. Can someone please explain me how USART should be configured correctly for IrDA.

#include <chip.h>
#include <include/usart.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  uint32_t mode = US_MR_USART_MODE_IRDA |
                          US_MR_USCLKS_MCK | 
                          US_MR_CHRL_8_BIT | 
                          US_MR_PAR_NO | 
                          US_MR_NBSTOP_1_BIT;
  pmc_enable_periph_clk(ID_USART2);
  USART_Configure(USART2, mode, 38400, 84000000);
  USART_SetReceiverEnabled(USART2, 1);
  pmc_enable_periph_clk(ID_USART3);
  USART_Configure(USART3, mode, 38400, 84000000);
  USART_SetTransmitterEnabled(USART3, 1);
  USART2->US_IF = 12;
  USART2->US_FIDI = 16;
  USART2->US_CR = US_CR_RSTSTA;
  USART3->US_IF = 12;
  USART3->US_FIDI = 16;
  USART3->US_CR = US_CR_RSTSTA;
  
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("Start:");
  Serial.println("USART3:");
  Serial.print("Status: ");
  Serial.println(USART3->US_CSR, BIN);
  USART_PutChar(USART3, 65);
  Serial.print("\n");
  Serial.println("USART2:");
  Serial.print("Status: ");
  Serial.println(USART2->US_CSR, BIN);
  Serial.print("RX: ");
  Serial.println(USART2->US_RHR);
  Serial.print("\n");  
  Serial.print("\n");

  delay(3000);
}