Kinetis K22 Serial_LDD Framing Errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis K22 Serial_LDD Framing Errors

1,722 Views
kwebster83
Contributor II

When using the Serial_LDD component on a Kinetis MK22FN1M0AVLH12, I get framing errors when transmitting any sequence of characters. Are there any known compatibility issues with this particular device or component?

The default component configuration was used, a number of baud rates were tried yet each time only the starting character from the sequence was received on the host machine.

Looking on a logic analyser (with UART decoder), the first character is fine yet all the subsequent characters were reported as having a framing error. The baud rate also seemed to be pretty off too.

I know that this particular device works fine as I have some C++ UART code which works without any issue. The K22 is running at 120MHz, with a 16MHz crystal - I've tried UART0 and UART2 and both have exactly the same issue in this Processor Expert generated code.

0 Kudos
Reply
2 Replies

1,329 Views
RachelGomez123
Contributor I

That is precisely the reason. A "framing error" means that the USART saw a low when it was expecting a high (in the middle of the STOP bit pulse).
This means one of:
[1] Your baud rate at sender and receiver are very different, so the receiver (i.e. the PIC) is sampling each bit earlier and earlier, so it sometimes sees the end of the 8th bit instead of the middle of the stop bit.
[2] Your sender is sending 9 bits of data, not 8. This could be if it is set to send 8 data bits + a parity bit.
[3] You have a lot of noise on the signal.

 

Regards,

Rachel Gomez

0 Kudos
Reply

1,709 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @kwebster83 ,

I don't find any report about Serial_LDD compatible issue. I think this should be a Serial_LDD configuration problem. Please refer to serial_LDD an PE documents. You can also refer to the TWR-K21F120M UART examples which do not use serial_LDD.

 

Regards,

Jing

0 Kudos
Reply