Hi
Any one tried Stellaris Boot loader on UART1, If yes can you please help me to configure to UART1.
I tried changing UART0 to UART1 in bl_main.c and bl_config.h bl_uart.c
but its not working, it works fine with UART0
Thank you,
Regards
Paddy
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
Any one tried Stellaris Boot loader on UART1, If yes can you please help me to configure to UART1.
I tried changing UART0 to UART1 in bl_main.c and bl_config.h bl_uart.c
but its not working, it works fine with UART0
Thank you,
Regards
Paddy
Poster Petrei "spot on" (per usual). Can confirm that LX4F (our older, 64 pin ver) supports PB0, PB1 as UART1.
Along w/ SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
you'll need: GPIOPinConfigure() and GPIOPinTypeUART()
and (one last - far too often missed!) UARTConfigSetExpClk() (you must "tailor" this for UART1) This - not a true "enable..."
Indeed these 4 functions should restore UART1 to, "On the Air" Status...
Hi I am using UART1 with PB0 and PB1 as RX and TX pins
following are the init and usage functions, please help me in verifying these.
Crystal init
// // Since the crystal frequency was specified, enable the main oscillator // and clock the processor from it. // HWREG(SYSCTL_RCC) &= ~(SYSCTL_RCC_MOSCDIS); Delay(524288); HWREG(SYSCTL_RCC) = ((HWREG(SYSCTL_RCC) & ~(SYSCTL_RCC_OSCSRC_M)) | SYSCTL_RCC_OSCSRC_MAIN);
// // Set the flash programming time based on the specified crystal frequency. // HWREG(FLASH_USECRL) = ((CRYSTAL_FREQ + 999999) / 1000000) - 1;
UART1 init
HWREG(SYSCTL_RCGC2) |= SYSCTL_RCGC2_GPIOB; HWREG(SYSCTL_RCGC1) |= SYSCTL_RCGC1_UART1;
// // Set GPIO B0 and B1 as UART pins. // HWREG(GPIO_PORTB_BASE + GPIO_O_AFSEL) |= UART_PINS; ROM_GPIOPinTypeUART(GPIO_PORTB_BASE, UART_PINS);// GPIO_PIN_0 | GPIO_PIN_1);
// // Set the pin type. // HWREG(GPIO_PORTB_BASE + GPIO_O_DEN) |= UART_PINS;
// // Set the baud rate. //
HWREG(UART1_BASE + UART_O_IBRD) = ulProcRatio >> 6; HWREG(UART1_BASE + UART_O_FBRD) = ulProcRatio & UART_FBRD_DIVFRAC_M;
// // Set data length, parity, and number of stop bits to 8-N-1. // HWREG(UART1_BASE + UART_O_LCRH) = UART_LCRH_WLEN_8 | UART_LCRH_FEN;
// // Enable RX, TX, and the UART. // HWREG(UART1_BASE + UART_O_CTL) = (UART_CTL_UARTEN | UART_CTL_TXE | UART_CTL_RXE);
in Updater function
HWREG(SYSCTL_RCGC1) &= ~SYSCTL_RCGC1_UART1; HWREG(SYSCTL_SRCR1) = SYSCTL_SRCR1_UART1;
in UARTReceive function
while((HWREG(UART1_BASE + UART_O_FR) & UART_FR_RXFE)) { }
*pucData++ = HWREG(UART1_BASE + UART_O_DR);
in UARTSend Function
while((HWREG(UART1_BASE + UART_O_FR) & UART_FR_TXFF)) #endif { }
HWREG(UART1_BASE + UART_O_DR) = *pucData++;
in Flush function
while(!(HWREG(UART1_BASE + UART_O_FR) & UART_FR_TXFE)) { }
// // Wait for the FIFO to not be busy so that the shifter completes. //
while((HWREG(UART1_BASE + UART_O_FR) & UART_FR_BUSY))
{ }
Regards
Paddy
Perhaps some/any answering response to detailed, prior post was, "too much to expect." Absence of such feedback - and always vague, "did not work" (initial post's "crafting") are not especially compelling to even dedicated, remote "helpers."
Situation is then compounded by your exclusive use of direct Register transactions. (which fly in the face of far simpler, exhaustively known & test/verified StellarisWare functions - suggested earlier)
Always painful to see "over-complication" - with zero support/justification - followed by the all too predictable, "did not work!"
Sorry,
I have been trying this from past 15 days, I tried all the ways, and most pain full thing is I am unable to put breakpoints any where in code, dont know reason exactly why,
Editor is taking breakpoints but non of them are working real. its not stopping at any place.
I am totally confused of code's behaviour, UART0 working fine, I have done conditional compilinng for both UART0 and 1 selectable,
UART0 works fine, but to analyze that, again Breakpoints not working.
I am testing this on Stellaris Launch Pad.
Please help if possible,
Let me know if any more information required / code required.
regards
Paddy
My friend - no one wants your sorrow - we wish only for your/others success.
By straying far from StellarisWare (which makes most minimal use of ASM or Direct Register) you flee from Safe Harbor - often into rough, uncharted seas - never good!
Your initial post strongly suggested that a simple, missed initialization was sole culprit. But now - plot has really thickened - likely extends to your IDE and much of your set-up and installation.
Vendor experts are available to assist in these areas - you will benefit from a good read of, "Sticky post - detailing "How to ask a question?" I'd switch to fresh post - focus on getting your IDE to work properly...
UART1 is merely "tip of iceberg" - and this reporter barely able to captain aged sloop - confined to warmer, more hospital So. Cal. seas...
Hi
I am unable to get breakpoints work for this application only,
Rest other applications like usb/uart/any such able to use break points,
may be they disabled breakpoints for this, or I am doing wrong.
I am able to run application of UART1 echo program/command line program using stellaris libraries, so hope hardware of mine is fine
ny how let me try again... :-)
Thanks for your suggestions,
Regards
Paddy
While your "doubt" continues - has such doubt considered the rather large difference between UART_FR values - UART0 vs UART1.
Settings shown for UART1 (doubt uart) suggest that you've forced this Uart into HW Control (i.e. CTS setting among others) - and thus must enable & match your external Uart to your (doubt Uart).
Suspect that even vendor Apps will be less than thrilled by your persistent use of Direct Register - rather than far easier, extensively documented StellarisWare. Doubt absent cooperation may be sub-optimal in solution generation...
Thanks a lot,
Problem got resolved, there was some multiple problems of clock setting and UART init,
Now I am able to use boot loader through UART1, and I can configure now to any other UART,
Thanks a lot for support,
Regards
Paddy
Hi Paddy,
I have read carefully of your email. And I'm afraid I have met the same issue w/ you and can not work it out. I also use LM4F232 EVM board.
Coud you pls share detailed info where you changed in the code to get UART1 boot loader run? Or can you share your source code with me? I have worked it for several days but no progress.......
Hope you can see this message......
Regards,
Holly