Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART1 has wrong Rx pin #1

Closed
arthurwolf opened this issue Oct 5, 2012 · 0 comments
Closed

UART1 has wrong Rx pin #1

arthurwolf opened this issue Oct 5, 2012 · 0 comments

Comments

@arthurwolf
Copy link

Hi !

I think I found a bug in MRI. I'm trying to use the SPI port on smoothieboard ( also UART1 ) to do MRI debugging. Not sure yet it's a bug though. Basically when using MRI_UART_MBED_P13_P14, the RX pin never receives anything from the host.

In here : https://github.com/adamgreen/mri/blob/master/mri/platforms/devices/lpc176x/lpc176x_uart.c
When using the MRI_UART_MBED_P13_P14 option, that means it's using the second element in the config array, that is :

{
    &(LPC_SC->PCLKSEL0),
    &(LPC_PINCON->PINSEL0),
    &(LPC_PINCON->PINSEL1),
    (LPC_UART_TypeDef*)LPC_UART1,
    1 << 4,
    3 << 8,
    3 << 30,
    3 << 0,
    0x55555555
},

Now it is supposed to set pin 15 to be TXD1 ( I don't get the 3 but it's everywhere so I trust yout here ) and pin 16 to be RX1.
You are using 3<<8 and 3<<30 respectively. But according to the datasheet I think it should be 3<<30 and 3<<0.
The fact that 3<<30 is TX and TX works but not RX, and here it's the only one that is in agreement makes me suspect I'm correct.

Now the weird thing is, I was previously trying to use UART1 as my main UART for smoothie coms, and UART0 for MRI, and when I did that, I had the same problem ( I think, not sure ), so maybe something weird else is going on here.

Cheers !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant