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.

Regarding getting data

Other Parts Discussed in Thread: MAX3232, EK-TM4C123GXL, TM4C123GH6PM

i have done example program of uart echo  and i tested port A(A0---->rx,A1---->TX)it's fine,y because the two are internally configured with ICDI. and after that i tested on port B (B0----->rx,B1---->TX)here i configured like this

ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

GPIOPinConfigure(GPIO_PB0_U1RX);
GPIOPinConfigure(GPIO_PB1_U1TX);

ROM_GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);

but here i didn't get any data....to the Terminal......please help me i can i find that?.............thank u

  • Hello Surendra,

    The first thing to check is that you have not got a Bus Fault and the GPIO mentioned have been configurred as expected for UART function.

    Can you please confirm the same?

    Regards

    Amit

  • sry amit i didn't get u....please tell me once again

  • Hi, 

    Please specify what board/micro do you use - either LP/123, either LPC/129 or your own. 

    Petrei

  • Hello Surendra,

    After enabling the GPIOB Peripheral, you are configuring the GPIO registers for UART function. It takes some time for the clocks to be enabled. So when the enable function is completed, an early access may cause a Bus Fault. If you put a Delay loop of 3 using SysCtlDelay(3), it should get rid of one of the most common issue. More on the same in the forum link

    http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/374640.aspx

    Now, if that is not the case, then the next debug point is to see that the GPIO register are configured correctly for UART function. Please look at the register AFSEL, DEN, PCTL, ODR to make sure that the values match as expected for configuring a non-GPIO function on the corresponding GPIO Pin.

    Regards

    Amit

  • Might it be that Port_B has no means to connect - quickly/easily - to PC as it's not part of normal ICDI routing?  Seems - at minimum - such should be questioned/confirmed...

  • if i want to communicate with the uart1 in the uart echo exaple ,is it must the RS232 connection in between the PC and TIVA C SERIES launch pad ?and  why it is necessary?

  • Hi,

    First, it would be wise to respond to helper questions, which are important, these are to help you, otherwise the forum will be a deafs dialog.

    I asked you what board do you use - this is because if you have an 129 board, then there are two jumpers to be moved to have communications on UART2 instead UART0. 

    On 123 board there is no such thing.

    Now, each board has two communications channels to PC - one is for debug, the other is for UART0. But both are sent to PC through ICDI chip, which is connected to PC through USB interface and two separate drivers.

    To use another UART with the PC, you need: an interface circuit, typically MAX3232, to change the levels from 3V to standard RS232, which are +/- 7...15V, then to change back to USB levels with an RS232/USB adapter. This is because the actual PCs does not have anymore RS232 interfaces (except you have an old computer which still has such thing).

    Petrei

  • currently i am using EK-TM4C123GXL board.

  • Hello Surendra,

    as there are no more information given, i suspect you are only using the USB Connection of your board. Please correct me if i'm wrong.

    If you do, then please check Page 7 of the following document (http://www.ti.com/lit/ug/spmu296/spmu296.pdf). It is shown on the block diagram that only UART0 is being wired out to the ICDI controller, through which the UART-Communication is being transferred over USB which supports what Petrei said.

    So if you simply serve another UART-module in your software, the data will not be directed through to your PC and therefore no data can be gathered or sent.

    In other words: Only UART0 is able to send/receive data from the USB Connection on that particular board. Why is it so important to use another module anyway? What is the real problem here?

    If you however have additional hardware like a RS232 Line Driver which is connected to your PC, i beg your pardon. Then the problem might be another one.

    Sincerely,

     

    Michel

  • please judge me a correct answer.....

  • Hello Surendra,

    we need information. That includes what you actually want to do. With regards to this Topic (http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/378009/1330576.aspx#1330576) also started by you, i guess you want to send UART-commands via the PC to your GSM module. And since you don't seem to like words, here's a picture.

    PC |--- USB/UART0 ---> | EK-TM4C123GXL | ---- UART1 ----> GSM-Module.

    Is that your system/what you want to achieve?

    Sincerely,

     

    Michel

     

  • Hello Michel Raabe

    I want to interface my micro controller with GSM modem with UART1  like this 

    PC |--- USB/UART1 ---> | EK-TM4C123GXL | ---- UART1 ----> GSM-Module.

    and again why i have to take the UART0.

  • Hello Surendra,

    simply because the UART0 is fixed to your USB Port. There is also no way you can send your Microcontroller data over the same UART module that it uses to communicate with your GSM module. Well, it's possible. But simply not practicable.

    Let's break it down even more.

    The PC talks with the ICDI Chip on your Board per USB.

    The ICDI Chip talks with your Mikrocontroller per UART0 and the Debugging Interface, JTAG.

    PC | ------ USB -----> | ICDI Chip | ------- JTAG ----> Microcontroller

                                                |------------ UART0 ----> Microcontroller

    From what i understood, it would be a lot easier to use the UART0 to send commands to your Microcontroller, which then sends those commands to your GSM module via UART1.

    Again, please have a look at page 7 of the User's Guide (http://www.ti.com/lit/ug/spmu296/spmu296.pdf).

    Sincerely,

     

    Michel Raabe

  • Hello Surendra,

    The forum members have done a great job in helping you out, but the post needs a lot of details, as we can see in the to-fro that has been happening.

    Can you check on the board that the RX and TX lines are High when the UART-1 is idle and connected to the GSM. I would suggest using a scope to ensure that any signalling may also be seen.

    Regards

    Amit

  • surendra malampati said:
    please judge me a correct answer.....

    Might the "real" issue here be, "Please judge the forum the correct and complete, necessary info!"

    Not once does poster mention "how" he expects to liberate those new UART signals - and route them to his remote.  And - we're not told what signal levels are demanded by his remote.

    Some forum guidance (perhaps past suggested) would likely "head-off" such misspent (helper) time/effort...

  • In generally  Tm4C123Gh6PM  launch pad  has 8 uart's in that uart0 is for ICDI. Then how can i activate the reaming Uarts

  • Hai amit

       How can i check the registers AFSEL, DEN, PCTL, ODR in the code composer studio at the debugging stage....

    I am new with code composer studio.

  • Hello Surendra,

    depending on your Version of Code Composer Studio, you should be able to view these registers per

    'View -> Registers -> UART0/UART1'

    That again depends on which module you want to see. But the registers Amit pointed out are registers of your UART module.

    And for activating the other UART-Modules i'd recommend the following checklist:

    1. Provide the UART-Module with a clock.
      1. Example: SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
    2. Provide the used GPIO-Port with a clock.
      1. This depends on which GPIO-Pins you want to use for the UART1. Please check this yourself.
      2. Example: SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
    3. Select the appropriate function, output level etc. for the GPIO-Pins
    1. Example: GPIOPinConfigure(GPIO_PB1_U1TX);
    2. GPIOPinConfigure(GPIO_PB0_U1RX)
    • Select your UART settings with the TivaWare Library Function.
      1. Example: UARTConfigSetExpClk(UART1_BASE, SysCtlClockGet(), 115200,
                   (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE
                   | UART_CONFIG_PAR_NONE));
      2. Settings: 115200baud, 8n1

    This basically applies to all of the 8 UART Modules, however with a little different settings of course. For the information about which Pins you're able to use for them, look in the datasheet for the TM4C123GH6PM. It's all written in there.

    Sincerely,

     

    Michel

  • HAI 

  • Hello Surendra,

    well it seems like your debug port is not connected or something disturbs it from reading out the registers. This could be because it simply isn't connected, can't communicate properly or it tries to access memory which is not available

    Is the Launch Pad connected via USB? Do you have anything else connected to the debug port? Did you select the correct Microcontroller in Code Composer Studio for the Hello World example? Can you debug the code in general?

    I need more information to help you. The complete code would help a lot as well, just add it via the symbol which looks like this "</>" on the top right of your post window here in the forums.

    And no, you should not connect the GSM module via UART0. At least not, if you use UART0 to communicate from your PC to your Microcontroller via Terminal. I really don't know how i can explain it any different than i already did 2 times.

    Sincerely,

     

    Michel

  • Hello Michel

    The issue that is shown in Surendra's post is due to the fact the register or memory browser may be open for the address space for which the clock has not been enabled or has been disabled either by the application or if a System Reset was done in CCS

    Regards

    Amit

  • HAI amit

    I checked in the scope,i didn,t get any data when i enabled the UART1 .For GSM interface.....i am fully struggled with this please help me.Thank u

  • Hey Surendra,

    we. need. information. :-)

    Here's a list what would really help US to help YOU.

    • Source Code to initialize UART1
    • System concept. (What do you want to do? What is failing?)
    • Data concerning the used hardware. (Used GSM Module?)

    Please provide these infos, otherwise it's near impossible to help. Maybe draw a simple picture for your system concept?

    Sincerely,

     

    Michel

  • Thank you for your response Michel

    • Source Code to initialize UART1

         

    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

    GPIOPinConfigure(GPIO_PB0_U1RX);
    GPIOPinConfigure(GPIO_PB1_U1TX);

     ROM_GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);

    ROM_UARTConfigSetExpClk(UART1_BASE, ROM_SysCtlClockGet(), 115200,
    (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
    UART_CONFIG_PAR_NONE));

    UARTFIFOLevelSet(UART1_BASE, UART_FIFO_TX1_8, UART_FIFO_RX1_8);

    UARTTxIntModeSet(UART1_BASE, UART_TXINT_MODE_FIFO);

     ROM_UARTIntEnable(UART1_BASE, UART_INT_RX | UART_INT_RT);

    UARTEnable(UART1_BASE);

    ROM_IntDisable(INT_UART1);

    these are basic initialization what i have done.

    System concept.

     

    I want to interface my GSM module with TM4C123GH6PM micro controller (TIVA C SERIES LAUNCH PAD).

                                                   some body said like this

    First send the data to the controller with the help of UART0 then after send that data to UART1 to connect the GSM modem......

    My problem is after sent the data to the micro controller with the help of UART0(PA0--->rx and PA1------>TX) then again how can i send that particular data to my GSM modem with the help of UART1(PB0--->rx and PB1------>TX).How the data transmitted from portA to port B internally.

    I tried with RS232 communication for UART1,then also i didn't get any data.

    6644.INterfacing GSm module with TIVA C SERIES launch pad.docx

     

     

       

  • Hey Surendra,

    alright, thanks for your efforts. This cleared up things a LOT.

    The data you send down to your microcontroller has to be handled by the firmware of the microcontroller. So by you.

    You have to receive the data via UART0 and then send it to your GSM Module via UART1. There is no real internal connection between PortA/UART0 or PortB/UART1, those are just interfaces. They are tools for you to program the communication You desire.

    But for now you should concentrate on making the UART1 work.

    Please introduce a little delay in between the Clock-Setups as follows:

    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);
      SysCtlDelay(5);
    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
      SysCtlDelay(5);
    

    This gives the modules a little time to actually power up. Dear Amit has stated this in countless posts already as well.

    Apart from that, the code looks good. You should be able to send things on UART1 with that and measure it with a scope.

    Can you receive messages on UART0 as well already? Can you send messages per Terminal to the Microcontroller and read them out correctly?

    EDIT: The communication chain would be as follows:

    1. Receive the Terminal command per UART0 (UARTCharGet(UART0_BASE);)
    2. Interpret the command in software ( On the Microcontroller! )
    3. Send the command per UART1 to the GSM Module ( UARTCharPut(UART1_BASE);)
    4. Receive answer of the GSM Module

    Sincerely,

     

    Michel

  • Hello Surendra

    After being connected to the devie you can go to View->Register option. There you would see GPIO_PORTB as one of the modules. Expanding the same will give you the register view of the module

    Regards

    Amit

  • HAI amit  

     

    could u please tell me,how can i avoid the echo.I want to take the only responses from the handler when i interfaced with my GSM module.I just modfied the uart echo example program,then i send the command AT from my controller.Then in the interrupt i got agian AT but i dont want agsin AT then how can i avoid that echo...please tell me.....

  • Hey Surendra,

    Ever thought about the possibility that your GSM-Module is in echo mode?

    If you can verify with an oscilloscope that your controller can send messages over UART1 and even receive them, then you should start figuring out whats wrong with the GSM-module.

    I hereby give up on this post. Seems like you're not even reading the submissions. Too much of a language barrier for my patience, i apologize. Good Luck.

    Sincerely,

     

    Michel

  • Try ATE0 command.

  • Hai amit.

    i wrote the code for uart1(for port B),and i kept the delay in between uart1 and portB, and while the budding time  t the registers are successfully filled (AFSEL,DEN,PCTL,DR) burt i didn't get any data on portB.what is the problem with this?

    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1);

    SysCtlDelay(5);


    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

    SysCtlDelay(5);

    GPIOPinConfigure(GPIO_PB0_U1RX);
    GPIOPinConfigure(GPIO_PB1_U1TX);

    ROM_GPIOPinTypeUART(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1);

  • I hereby give up on this post. Seems like you're not even reading the submissions. Too much of a language barrier for my patience, i apologize. Good Luck.

    I beg to disagree on a little point here.

    It is less the language, but rather the style of the post, the lack of focus, structure, attention and understanding of the problem, which transpires in unstructured torrents of words (either all capital or lowercase letters, rarely delimiters, no line-ends) without clear expressions of thoughts, actions and problems.

    With some experience in answering fora posts, one realizes it is almost impossible to solve these issues in this context without becoming totally frustated. These guys need an physical mentor, very next to them, and upfront.

    That's why I avoid answering those posts in the first place.

  • f.m. - as most always - observes/weighs & then composes w/precision.

    Surely poster is frustrated and (like some in Gov't) in bit over his head.  Yet "jumping" from issue to issue - rarely a clear response to pointed probings from "helpers" - and an (apparent) lack of logical progression appear not to be the best means to success.

    Long past - this reporter/others proposed (some), formal poster guidelines.   Always "duly noted" yet cast to oblivion - and this series of "unstructured torrents" (credit f.m.) is a (most) predictable outcome.

    Forum reaps what the forum sows...  And that's (unfortunately) especially noted...  And may have been (potentially) much reduced or avoided!
  • Hello Surendra,

    I believe the code is correct here. However just configuring the GPIO for UART operation does not mean UART will work correctly. Take a step back and send in the full updated code for the forum to see.

    Also develop the code in parts. The UART has a LBE (Loopback feature). Use this to test the UART module is working fine by sending the message between the TX and RX of UART-1. This will ensure that when the GPIO is plugged in then there can be only 2 reasons for it not to work

    a. The interface between GPIO and UART is broken (trust me it is not)

    b. The issue is on the outside device.

    We can then look for a method to test the UART from the outside.

    Regards

    Amit

  • Hai amit

            In the UART_CTL register ,both UART_CTL_TXE and UART_CTL_RXE bits are set to one.But UART_CTL_LBE bit is set to 0.

  • Hello Surendra,

    You would need to set the LBE bit for the Internal Loopback. This will connect the TX and RX of the UART-1 internally allowing for the you to test if the TX and RX are properly configured.

    Regards

    Amit

  • Hai 

    what is the function call to set the LBE.

  • cb1- said:
    Surely poster is frustrated and (like some in Gov't) in bit over his head.

     Hi CB1, read better, it sayd FRUSTATED!!! I like that in thinking about politicians, can you help apply to our worst one here? ;)

     Again about oblivion, why not split forum.. or better add EK-TM4C123_Launchpad EK-TM4_1294XL, can this save real trouble from beginner torrent???

  • Hello Surendra,

    There is no function call I believe. However you can do the same using HWREG(UART1_BASE+UART_O_CTL) |= UART_CTL_LBE;

    after you have enabled the UART.

    Regards

    Amit

  • hey Surendra have you developed the code for interfacing gsm with tm4c123.. if please mail it to me at
    iamnarayan@live.com
  • MANISH RAJPUT said:
    hey Surendra have you developed the code ...  please mail it to me

    Absolutely classic!

    This (properly) dead/dying thread - plucked from (it's deserved) scrap-heap fate - now potentially re-animated...  (Frankenstein lives...)

    Newly arrived poster better "hope" such highly thought, precision,  program flow/systematic code design does (not) arrive...

    May pay to read/review over-long thread (somewhat) prior to seeking, "collaboration!"   (to be, "fly on the wall" during that session...)

  • Could not stop smirking while reading that one.

    Can somebody put this thread to rest though?

    I'm scared more grave robbers will exploit the collection of ingenuity and interesting interrogation gathered in this thread.

  • Michel Raabe said:
    Could not stop smirking while reading that one.

    Will take that as high complement (though "smirk" seems miscast) - weaving MCU "exploits" into "sitcom" - not always easy...

    Note the (rather strange) bedfellows: ingenuity, interrogation & "unstructured torrents!"  (credit f.m. that last (inspired) word-play...)

    (and "grave-robbers" have already landed - deepened this well-worn trail...)