Wrong data transmited/received via SCI

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

Wrong data transmited/received via SCI

2,850 Views
Aminah007
Contributor I

Hello, I am trying to send a byte from one MCU to another with the SCI module, I verify that something is sent, but what appears or interprets is not the character that I wanted to send. For example, if I send an 'A' I cannot know exactly what I am receiving. I would like to use RecvChar or OnRxCharExt.

What seems strange to me is that I migrated all the code from codewarrior version v6.3 to v11.1 and the SCI stopped working, but I already checked everything again and again.

I hope you can help me and first of all thank you very much.

0 Kudos
Reply
2 Replies

2,580 Views
scottm
Senior Contributor II
Hi,
The first thing I would check is the clock configuration. You've got it running from the internal oscillator. If it's untrimmed, it's way too inaccurate for running a UART reliably. Even if it's trimmed you'll want to make sure the clock error between the sending and receiving devices is not more than the 4.5% that the SCI can tolerate.
Processor Expert makes it easy to shoot yourself in the foot in that respect. I've migrated a project and didn't realize it wasn't running from the external oscillator. I still got the frequency I needed, but it wasn't stable and any temperature variation would degrade performance.
Beyond that, I'd suggest hooking up a logic analyzer to see what's actually coming out of the SCI, and see if it matches your expected baud rate.
0 Kudos
Reply

2,841 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Are you trimming the clock?

 

I have a sample code for the SCI on the SH family, but without processor expert 

 

Please let me know if you need it

Regards

 

0 Kudos
Reply