Why it always display garbled code in terminal when i add the LinFlexD_uart to my FreeRTOS project?

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

Why it always display garbled code in terminal when i add the LinFlexD_uart to my FreeRTOS project?

1,448 Views
timwang
Contributor II

捕获.PNG捕获.PNG

Just like this,after initializing all the components,i send a"Hello world"message to the terminal by LinFlexD[1],but it display garbled code!

0 Kudos
Reply
10 Replies

1,181 Views
B46399
NXP Employee
NXP Employee

Hi,

I used to face a similar problem in the past; for some reason, when routing the LINFLEXD tx signal to the pin, the logic state of the pin is not correctly driven by the module, instead it remains on a logic 0, so spurious bits may be detected by the terminal interface. A workaround for this issues was to enable the pull up function for the tx pin, so the serial communication bus remains on logic 1 when idle (detecting a 0 actually means the start bit of a character, which is the right behavior). 

To enable pull up function, select PinSettings component, go to Functional properties tab, filter the pin name and select the two options as highlighted below:

pastedImage_1.png

Please let us know if this fixes the issue!

Regards,

Vlad

0 Kudos
Reply

1,180 Views
timwang
Contributor II

Hi Vlad,

I did as you told me, but i can't even generate code successfully.捕获.PNG

here are the errors:捕获1.PNG

Regards

0 Kudos
Reply

1,182 Views
B46399
NXP Employee
NXP Employee

Hello,

Can you please confirm that you are using SDK 0.8.0? We recently released SDK 0.8.1, the update for Design Studio should be available these days; I recommend updating to the newer version, the pinsettings component was not fully functional in the first release. In the meanwhile, you could try to access directly the appropriate MSCR register in SIUL2 and set the pullup function in the code. Please let me know if this fixes the issue.

Regards,

Vlad

0 Kudos
Reply

1,182 Views
timwang
Contributor II


Hi Vlad,

I'm sure that my SDK version is 0.8.0.In fact,I already access directly the appropriate MSCR register in SIUL2 and set the pullup function in the code,but it doesn't work for me

捕获.PNG

This is my pin initialization function.

Regards

0 Kudos
Reply

1,183 Views
B46399
NXP Employee
NXP Employee

Hi,

Can you please share your project? I can't figure out why you get this behavior, I must take a closer look.

One more question: which word length did you configure for UART? 8-bits or 7-bits+parity?

Thanks,
Vlad

0 Kudos
Reply

1,183 Views
timwang
Contributor II

Hi Vlad,

Thanks for your reply!

I used the world length of 8 bits for UART.

Here is my projrct.

Regards

0 Kudos
Reply

1,182 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

which do you use?

If you use MPC5748G DEVKIT DEVKIT Evaluation Board for MPC574xG|NXP there is a bug in OpenSDA interface, which causes this issue.

Regards,

Martin

0 Kudos
Reply

1,183 Views
timwang
Contributor II

Hello Martin,

I use this board,and i known this bug in OpenSDA interface,so i use another LinFlexD_uart which connect to the pin pc[6] and pc[7],but when i transmit data,i still run into this problem!

I found that when i choose display the data in HEX,the 57 became D7,61 became E1,62 became E2,64 became E4,and so on.

When i use the same configuration debugging project without FreeRTOS,i can achieve the correct data.

How can i solve this problem?

I transmit this message to the terminal捕获1.PNG

 

The result in FreeRTOS project is捕获.PNG

The result in a single LinFlexD_uart project is捕获2.PNG

Both the project are MPC57xx EAR SDK v0.8.0 Example Project,and i generate the code by PE.

Regards

0 Kudos
Reply

1,183 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

thanks for your report. It is possible, there is a bug in FreeRTOS module. I will contact SDK development team to investigate this behavior.

Regards,

Martin

0 Kudos
Reply

1,183 Views
timwang
Contributor II

Hi Martin,

Thanks for your attention.Hope  to receive your reply about the solution as soon as possible.

Regards

0 Kudos
Reply