Comunicación Serie - Capitulo 3 -Comunicación vía UART método polling y algo más

Comunicación Serie - Capitulo 3 -Comunicación vía UART método polling y algo más

Communication via UART in LPC845: Polling Strategies

Overview of UART Configuration

  • The chapter discusses configuring the UART for communication with another device, emphasizing that correct parameters are crucial for data transmission.
  • It highlights the importance of analyzing UART registers while operating without interrupts, focusing on polling methods instead.

Data Reception Process

  • The receiver shift register accumulates bits as they are received; an example is given with 8-bit frames at a baud rate of 19200 and even parity.
  • Upon receiving the start bit, the UART transitions from idle to receiving state, utilizing a counter to track incoming bits until eight data bits are collected.

Parity and Stop Bit Verification

  • After receiving all data bits, the parity bit is checked against expected values; if matched, a parity OK flag is raised.
  • The stop bit's timely arrival confirms successful reception; however, the receiver buffer must be cleared for subsequent data.

Application Layer Interaction

  • In polling mode, application code must check the Data Ready flag within the status register to read received data correctly.
  • If Data Ready is active, it indicates new data in the reception buffer; reading this clears the flag automatically in many cases.

Error Handling During Reception

  • If new data arrives before previous data is read, an overrun error occurs. Application code should handle such errors by checking relevant flags.
  • Errors like incorrect parity or missing stop bits activate specific error flags; these need to be monitored for effective communication management.

Memory Map and Register Access

  • Registers RXD (received data register) and STAT (status register) are essential for monitoring received characters and their associated error flags.
  • Some status bits are read-only while others can be cleared by writing a one to them. Understanding these behaviors is critical for proper operation.

Transmission Process Overview

  • The process of transmitting involves using both transmitter holding registers and shift registers. Writing to TXD initiates transmission without waiting for prior transmissions to complete.
  • Flags indicate whether writing can occur without overwriting existing data. Proper management ensures smooth operation during continuous transmissions.

This structured summary captures key insights from each section of your transcript while adhering strictly to your formatting requirements.

Overview of Transmission Code

Implementation of Polling Transmitter

  • The discussion begins with the transmission process, focusing on TX ready flags and how to implement a polling transmitter method that receives data for transmission.
  • It is noted that if the TX ready flag is set, the data will be written to txd, and the return value will be modified accordingly.

Signal Verification

  • The importance of considering the BC signal is highlighted, suggesting an additional line for its verification in the code implementation.
  • Acknowledgment that more code may be required to handle this signal effectively.

Registers and Flags in Communication

Common Registers and Flags

  • An overview of classic registers and flags used in transmission and reception processes across various microcontroller families is provided.
  • Emphasis on how these registers and flags are essential for communication involving three threads: TX, RX, and others.

LPC 845 State Indicators

  • Introduction to additional indicators present in the LPC 845 state register similar to txid, which indicates when data reception is occurring.
  • The Start signal's purpose is explained as allowing wake-up from deep sleep mode; it resets by writing a one according to documentation.

Conclusion on Reception Process

RX Break Signal

  • Discussion about Delta RX break being similar to a break signal but requiring manual reset by writing a one once conditions change.

Noise Detection

  • Explanation of RX noid indicating noise detection during reception; it activates when any sample differs from expected values during bit processing.

Future Topics

  • Mention of upcoming content focused on handling this same process through interrupts in future videos.

Turn any video into a summary like this

YouTube links, meetings, lectures. With transcripts, search, and chat.

Video description

Analizamos los registros y flags utilizados en la comunicación vía UART. En el siguiente enlace encontrarán el manual utilizado en este vídeo. https://drive.google.com/file/d/1XDqR-8Fr7r_DbrPzOxC6xCKIe3txndaa/view?usp=sharing