Garbage on the MX51 uart

cancel
Showing results for 
Search instead for 
Did you mean: 

Garbage on the MX51 uart

Jump to solution
572 Views
allenkll
Contributor III

Hello,

  I have search and seen this topic brought up before, but have seen no solutions.

I am having trouble with the mxc_uart.c driver for linux.  u-Boot initializes the

uart properly, and the kernel's mxc_uart_early.c driver works fine, but when the console

is switched from the early driver to the "main" driver, the serial port just starts spitting out garbage.  Usually in the form of FF, but sometimes FE, ans sometimes just other junk.

if I hold down the 'a' key, I will see 0x61 come back some of the time, but usually it's some garbage.

I've tried the "change the kernel to use pll3 instead of pll2" trick to no avail.  I have tried putting printK's to see what's going on, but as soon as the peripheral is reset in the driver code, I lose print ability, understandably.

I have checked the output on a oscilliscope.  The timing seems to be correct for the garbage data that is coming out.

Where do I go from here?  I don't have JTAG, so I can't debug in that way.  I'm sort of at a loss.

ideas?

thanks,

-Allen

Labels (1)
Tags (2)
0 Kudos
1 Solution
265 Views
allenkll
Contributor III

I found the answer.  It was the cable I was using to connect between the RS232 cable and the Boards 5 pin connector.

I have never seen a hardware failure manifest itself in this way.  I believe the cts/rts pins may have been shorting together or to ground which was causing issues in the uart hardware/driver to go a little crazy.. Which I wouldn't have expected when I was not using hardware flow control.  I would have expected this to be ignored.

Either way.  I appreciate everyone's help and feel relieved that I can move on to the rest of the problems.

Thanks again.

-Allen

View solution in original post

0 Kudos
9 Replies
266 Views
allenkll
Contributor III

I found the answer.  It was the cable I was using to connect between the RS232 cable and the Boards 5 pin connector.

I have never seen a hardware failure manifest itself in this way.  I believe the cts/rts pins may have been shorting together or to ground which was causing issues in the uart hardware/driver to go a little crazy.. Which I wouldn't have expected when I was not using hardware flow control.  I would have expected this to be ignored.

Either way.  I appreciate everyone's help and feel relieved that I can move on to the rest of the problems.

Thanks again.

-Allen

View solution in original post

0 Kudos
265 Views
fabio_estevam
NXP Employee
NXP Employee

Allen,

Are you using the bootloader version provided by the BSP version you are using?

I saw cases for mx51/mx53 that using a bootloader version that is different then the one provided in the BSP resulted in the garbage serial output as you mentioned.

I would suggest you to try 2013.04 U-boot. I tested it here and I managed to boot mx51evk using 2.6.35 11.09 kernel and also a 3.9-rc7 kernel.

If you are interested, meta-fsl-arm can generate a sdcard image for you with bootloader/kernel/rootfs so that you can quickly try to adapt it for your board. I also tested it and it is working fine.

Which serial port do you use on your custom board? On mx51evk we use UART1 for the console.

Regards,

Fabio Estevam

265 Views
allenkll
Contributor III

Fabio,

  Yes I am using the same version of bootloader and linux, although I cannot see what difference that would make.

I do not see the 2013.04 U-boot anywhere on the mx51 website.  The only thing it has is the 10_11 version, which appears to be the latest.

  I am using UART 1.  I will look into the meta-fsl-arm tool.

Also I think I had a bit of a breakthrough.  I was able to scrounge up a mx51 evk kit, and ran my bootloader and kernel on it and the serial worked!  Since the schematic for the custom board was lifted mainly from the dev board, with a few small changes, I think this is probably a driver issue.  Not a serial driver mind you, but some other driver stepping on the serial port.  Or perhaps a DMA issue, I'm not sure at this point.

  I think I'll close this discussion, as I do have something sort of working on the dev kit, so it's a matter of due diligence to disable and re-enable different features of the kernel until I see what breaks or fixes it.

  Thanks all for your help.

0 Kudos
265 Views
jimmychan
NXP TechSupport
NXP TechSupport

What BSP and board are you using?

0 Kudos
265 Views
allenkll
Contributor III

Jimmy,

  Thanks for replying.  I'm using linux-2.6.35.3-imx_10.11.01, and a custom board.

-allen

0 Kudos
265 Views
YixingKong
Senior Contributor IV

Allen, please click Correct Answer if your question has been answered.

Thanks,

Yixing

0 Kudos
265 Views
allenkll
Contributor III

Yixing,

   I will be happy to click correct answer when one is provided.  Thanks for the reminder.

-Allen

0 Kudos
265 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Allen,

     Please don't use  BSP for i.mx51_bbg board directly, you can create one for your board accroding to schematic, just as you develope a new evk board based i.mx51, then recompile it .

     Actually, Those Garbage you mentioned above is disorder characters.

Regards,

Weidong

0 Kudos
265 Views
allenkll
Contributor III

Weidog,

    I did not use the i.mx51_bbg board directly.  I did create a custom board.

What is meant by "disorder characters"  Can you please explain, or point me to a reference on what disorder characters are?

thank you,    

0 Kudos