Using PB22 pin as Serial RX

OK i managed this myself,

i changed the above to

/*

  • Serial interfaces
    */
    // Serial (EDBG)
    #define PIN_SERIAL_RX (30ul)
    #define PIN_SERIAL_TX (20ul)
    #define PAD_SERIAL_TX (UART_TX_PAD_0)
    #define PAD_SERIAL_RX (SERCOM_RX_PAD_2)

and i am using the Serial object and its working now....

Have fun!