KE06z UART Noise Flag error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KE06z UART Noise Flag error

ソリューションへジャンプ
1,501件の閲覧回数
codyhubman
Contributor III

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.

0 件の賞賛
返信
1 解決策
1,396件の閲覧回数
codyhubman
Contributor III

I figured out(ish) the problem to the UART. I disabled my NVIC when I transmit in the writeTx. This helped, however the biggest ailment in my code was my ADC converter. Does anyone know anything about ADC causing noise on your UART line (UART0 but it seemed to be the same for the others). To give more details it was because in my display loop where I spend a good part of the time was constantly checking the temperature to turn on a fan. It appears to be that because I was performing so many conversions it was causing noise on the UART line. Again, if anyone has any idea why this might be an issue or what I should do to fix that let me know

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,397件の閲覧回数
codyhubman
Contributor III

I figured out(ish) the problem to the UART. I disabled my NVIC when I transmit in the writeTx. This helped, however the biggest ailment in my code was my ADC converter. Does anyone know anything about ADC causing noise on your UART line (UART0 but it seemed to be the same for the others). To give more details it was because in my display loop where I spend a good part of the time was constantly checking the temperature to turn on a fan. It appears to be that because I was performing so many conversions it was causing noise on the UART line. Again, if anyone has any idea why this might be an issue or what I should do to fix that let me know

0 件の賞賛
返信