Interrupt mode implementation sending data serial port driver

xiaoxiao2021-04-08  4

I have found a lot of serial ports online, and the domestic information does not mention how to use the interrupt mode to implement serial port data. In fact, the process of implementing serial port data transmission and using interrupt mode implementation of serial port data reception is similar, and all of the 8259 IRQ3 or IRQ interrupts are required, and set the MODEM control register to output the OUT2 to the low level, set interrupt allow registers. Open transmission and reception interrupt. Here, it is important to note that "The Art of Assembly Language Programming" is mentioned that the serial port will generate an interrupt when the send register is empty, but only one, the solution used in the book is to write directly to the Send Register through the IO port. At this time, the serial port will generate the "send hold register as empty" interrupt. There is also a method, I see when analyzing the serial port driver of VxWorks, the VxWorks uses the method of refreshing the interrupt to allow registers (which is an interrupt allowed register before each transmission), which is ok from the actual effect.


New Post(0)