AnsweredAssumed Answered

KE06z UART Noise Flag error

Question asked by cody hubman on Jul 17, 2019
Latest reply on Jul 22, 2019 by cody hubman

I am losing it on a UART module. I am using a rx ISR to take in data over the UART. Most of the time it works but whenever I start displaying on my LED modules it acts up. I am running an 8 MHz clock with the following BR settings to achieve a 9600 baudrate

 

u16Sbr = (((8000000)>>4) + (9600>>1))/9600;

u8Temp = UART0_BDH & ~(UART_BDH_SBR_MASK);

UART0_BDH = u8Temp | UART_BDH_SBR(u16Sbr >> 8);
UART0_BDL = (uint8_t)(u16Sbr & UART_BDL_SBR_MASK);

 

I don't think it's the baud rate (although I could easily be wrong). Because when I am not displaying I never get the noise flag. This is partially why I think it has to do with trying to receive data while I am trying to transmit data. 

 

The controller I am communicating with is fixed (im retrofitting it) and has no protocol for handling when noise occurs so I can't resort to trashing the data and requesting what was last sent. Im not sure if it's helpful but I am pulling data from the EEPROM to display and when I quit displaying I also need to get more data from the EEPROM via I2C but I don't think that's it because I am receiving noise before I need to recommunicate with the EEPROM. 

 

Im also curious if there is anyways to test if noise is being thrown into my UART line by having more power around the UART lines when I am displaying. I am using a RS 422 SN75ALS180N tranceiver to communicate with the keypad controller and microprocessor. On the microprocessor we have had in the past (not a kinetis chip AND was programmed in assembly) has no issues with this communication so I am skeptical that I am running too fast to handle with the current baudrate.

 

It might also be helpful if anyone knows how the handle the noise flag errors, what that means for me and how to handle it. I believe the KE06 doesn't have hardware flow control nor DMA. The interrupt works all the time, even when displaying, but if that noise flag is set and it was just transmitting I get a garbage value.

Im using 5 mil traces for the UART communication. I have a .1uf bypass cap on the tranceiver. Below is my UART if anyone can figure out what is going on through that. If you have questions let me know I have been at this for a couple weeks.

Attachments

Outcomes