I can send and receive on hardware (if not relying on IRQ)
I narrowed down my UART model to a 16550A.
Here is my Init Code
Code: Select all
void setBaudRate(uint16_t COM, uint32_t RATE)
{
uint8_t LO_RATE, HI_RATE;
LO_RATE = (uint8_t) ((115200 / RATE) & 0xFF);
HI_RATE = (uint8_t) ((115200 / RATE) >> 8);
IER_handle(COM, false, false, false, false); //Disable IRQ
write(COM, FCR, (FCR_ClearRX | FCR_ClearTX)); //Disable FIFO
write(COM, LCR, LCR_DLAB); //DLAB
write(COM, DLL, LO_RATE); //Data Rate Low
write(COM, DLH, HI_RATE); //Data Rate High
write(COM, LCR, LCR_8Bits); //Line Control
write(COM, FCR,(FCR_Enable | FCR_ClearRX | FCR_ClearTX | FCR_16_1)); //Enable FIFO - 1 BYTE BUFFER NOTIFY
write(COM, MCR, (MCR_DataTermRdy | MCR_RequestSend | MCR_AuxOut2));
IER_handle(COM, true, true, true, true);
}
Code: Select all
outb(0x3F9, 0);
outb(0x3FA, 6);
outb(0x3FB, 0x80);
outb(0x3F8, 1); //DATA RATE = 115200
outb(0x3F9, 0);
outb(0x3FB, 3);
outb(0x3FA, 7);
outb(0x3FC, 0xB);
outb(0x3F9, 0xF); //ENABLE ALL INT
If you need more information ask or check the link in signature (DRIVERSRC/HARDWARE/RS232.C\H)
I've been comparing to many others on the forum and I cannot, as of yet, find what is wrong.