LS1021A Early UART Debugging

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

LS1021A Early UART Debugging

1,768 Views
jasonhendrix
Contributor V

What is the virtual address of UART2 in the basic YOCTO build for LS1021ATWR?

Hi, I'm trying to bring up Linux on a custom board based on the LS1021ATWR dev kit and SDK.  However, my console access is UART2 (0x021D0500).  I would like to configure Linux to ouput early debug info on this port.  There's a similar post here for the LS1021A-PB: Early UART Debugging on ttyS0 (Bank-0)  LS1021A-PB.  I've been able to enable DEBUG_LL and compile printasci into head.S, but no output yet.

When configuring DEBUG_LL, it seems I must set the items CONFIG_DEBUG_UART_PHYS and CONFIG_DEBUG_UART_VIRT as well.  How do I determine the address for CONFIG_DEBUG_UART_VIRT?

Labels (1)
0 Kudos
4 Replies

1,334 Views
Pavel
NXP Employee
NXP Employee

If UART2 is needed, the LS1021A RCW should be changed. See the Section 3.4.1 of the LS1021A Reference Manual.

Usually u-boot provides console configuration. NXP SDK for the TWR-LS1021A board, LS1021A-IOT board support LPUART

See attached file. This file is available using the following path in u-boot source folder: /include/configs

Check UART ports under Linux on your board using the following commands:

dmesg | grep tty

and

setserial -g /dev/ttyS*

stty 9600 -F /dev/ttyS1

stty -F /dev/ttyS1

echo "HELLO" > /dev/ttyS1

Test serial ports on your board using the following page:

http://www.armadeus.com/wiki/index.php?title=Serial_ports_usage_on_Linux


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,334 Views
jasonhendrix
Contributor V

Hi Pavel.  Thanks for the info.  U-boot is working fine with UART2, I can actually even output a few lines after "starting kernel".  Of course I can't use any Linux configuration yet because I'm working on booting Linux now.  Do you know of a way to determine the virtual address of UART 2?  It seems like I don't even get to head.S when I enable DEBUG_LL, but I can see my physical and virtual addresses in R1 and R2 when I halt the debugger. 

I'll look into the RCW.

0 Kudos

1,334 Views
jasonhendrix
Contributor V

Regarding the RCWs, I suppose the fact that U-Boot uses UART2 confirms that the pin configuration via RCW is correct for UART2.

0 Kudos

1,334 Views
jasonhendrix
Contributor V

I also get a 'U' out of UART2 before it goes silent.  Could be the beginning of "Unsupported something or other", or could be something else. 

0 Kudos