I am a little confused by UART protocol. Can we map it to any layer in OSI model? Certainly, it's not physical layer because it doesn't talk about voltage levels. Is it datalink layer?
Most interfaces that are integrated on microcontrollers only cover the data link layer, with the physical layer being implemented externally (with some exceptions). In some cases one and the same data link layer might be combined with different physical layer implementations to create different interface standards.
The oldest and still most predominant asynchronous interface is the UART (Universal Asynchronous Receiver Transmitter). Some implementations support both a synchronous and asynchronous mode - then it is a USART (Universal Synchronous Asynchronous Receiver Transmitter). The same thing with just a different name is the Serial Communication Interface (SCI). With reference to the OSI model, a UART implements the data link layer (layer 2). The physical layer (layer1) is covered by several driver standards that all utilize the UART data link layer, among the most popular are RS232C, RS485 and RS422.
Please click the link below if you want the rest of the article.