Hello Gnichi,
Do you use the KSDK ? If yes, there is a UART callback demo, you can refer to.
it write under KSDK1.2 , while KSDK1.3 demo is the same method to configure,
and pay attention to the bug which Ningning Yu mentioned .
https://community.freescale.com/thread/359899#538622
Hope it can helps
Alice