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.

CCS ver5.2.0.00069 Not able to access UART0 on target board.

Other Parts Discussed in Thread: LM3S1968

Hi

I am using LM3S1968 controller on my target board. I tried to debug program and observed it is not reading from UART0 port of target board.

Initialization script  ..\..\emulation\gel\lm3s1968.gel

Program and hardware is fully tested and it works fine if I debug using Keil uVision3. 

  • Hi Mahesh, 

    could you please provide more information?  What error do you get?  What steps have you taken?  

    Also, I would strongly recommend moving to the latest version, v5.4.  (I would do this as a full fresh parallel installation)

    Best Regards,
    Lisa 

  • Hi Lisa

    In Debug mode, absolutely no error gets displayed. I am sending 0x20 character from PC to microcontroller through RS232 port. Microcontroller remains in loop expecting data  from PC. But actually PC transmits 0x20 data over serial port.

    Same program works fine with Keil uVision3.

    Regards

    Mahesh 

  • Hi Mahesh,

    does an example work as expected?   How was the port from Keil made?    

    This may actaully be better in the stellaris forum, but for now as much information as possible would help.

    Best Regards,
    Lisa 

  • Hi Lisa

    Initialization code for UART0 as given below-

    void
    uart0_init(void)
    {
    GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); //UART-0 pins of controller

    //configured UART for 8 data bits - 2 stop bits-no parity.Variable baud rate.Here baud rate is 115200. 

    UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), 115200,
    (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |UART_CONFIG_PAR_NONE));

    //receive interrupt after 2 bytes ((1/8) * 16 = 2 bytes)
    UARTFIFOLevelSet(UART0_BASE,UART_FIFO_TX7_8,UART_FIFO_RX1_8);
    IntEnable(INT_UART0); //interrupt enabled in interrupt controller.

    UARTIntEnable(UART0_BASE, UART_INT_RX | UART_INT_RT);//UART time-out & receive interrupts are enabled here.
    } //uart_init(void)

    Same code is compiled in Keil uVision3 and CCS V5.2

    No compilation errors or warnings with both compilers. In debug mode, with Keil uVision3 microcontroller receives data from PC. But with CCS debug mode it is not accepting any data sent by PC.

    One more doubt- Even though I remove initialization script i.e. 'lm3s1968.gel' from target_config.ccxml, while initiating debug mode, CCS shows following messages in Console -

    CORTEX_M3_0: GEL Output:
    Memory Map Initialization Complete
    CORTEX_M3_0: GEL Output: Watchdog Timer Enabled
    CORTEX_M3_0: GEL Output: UARTs Enabled

    I really don't know why and how both watchdog and UARTs gets unable in CCS debug mode.

    Actually I am using both watchdog and UART0 in my program. Is there any conflict? How to avoid enabling watchdog and UARTs by CCS debugger?

    I also tried to download CCS 5.4, but often there is error while downloading. Also software is very big for download. From where I can get CD? I reside in India.

    Regards

    Mahesh 

  • Hi Mahesh,

    I would still recommend doing the full v5.4 download and installation.   I do not believe it is available to get on CD.

    Regarding your problem.  It is possible there is some conflict with the GEL initialization script.  In the ccxml target configuration, you should see the option to bypass initialization script.  Have you tried that?

    Best Regards,

    Lisa

  • I already tried bypassing initialization script. But still CCS shows following messages as soon as I start debugger -

    CORTEX_M3_0: GEL Output: 
    Memory Map Initialization Complete
    CORTEX_M3_0: GEL Output: Watchdog Timer Enabled
    CORTEX_M3_0: GEL Output: UARTs Enabled

    I don't know from where this GEL code gets executed. How to stop execution of these GEL commands? 

    As I am trying to receive data over UART0, I need to avoid UARTs getting enabled by GEL command so that there should not be any conflict.

    For the same project, in Keil uVision3, I have changed stack size to 0x1000. How to set/alter stack and heap size in CCS?

    Thanks for your quick response.

    Best Regards

    Mahesh Chindhade 

  • Hi Mahesh,

    would you be able to share your ccxml file to just verify there is no reference to a GEL script.  It seems that is a GEL running in the background, as you are aware.

    Best Regards,
    Lisa 

  • <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
        
    
        
    
        
    
        
    
        
    
        
    
    
    
    
    
    
    
    <configuration XML_version="1.2" id="Stellaris In-Circuit Debug Interface_0">
            <instance XML_version="1.2" desc="Stellaris In-Circuit Debug Interface_0" href="connections/Stellaris_ICDI_Connection.xml" id="Stellaris In-Circuit Debug Interface_0" xml="Stellaris_ICDI_Connection.xml" xmlpath="connections"/>
            <connection XML_version="1.2" id="Stellaris In-Circuit Debug Interface_0">
                <instance XML_version="1.2" href="drivers/stellaris_cs_dap.xml" id="drivers" xml="stellaris_cs_dap.xml" xmlpath="drivers"/>
                <instance XML_version="1.2" href="drivers/stellaris_cortex_m3.xml" id="drivers" xml="stellaris_cortex_m3.xml" xmlpath="drivers"/>
                <platform XML_version="1.2" id="platform_0">
                    <instance XML_version="1.2" desc="Stellaris LM3S1968_0" href="devices/lm3s1968.xml" id="Stellaris LM3S1968_0" xml="lm3s1968.xml" xmlpath="devices"/>
                <device HW_revision="1" XML_version="1.2" description="" id="Stellaris LM3S1968_0" partnum="LM3S1968" simulation="no">
                        <router HW_revision="1.0" XML_version="1.2" description="CS_DAP Router" id="CS_DAP_0" isa="CS_DAP">
                            <subpath id="subpath_0">
                                <cpu HW_revision="1.0" XML_version="1.2" desc="CORTEX_M3_0" description="Cortex M3 CPU" deviceSim="false" id="CORTEX_M3_0" isa="CORTEX_M3">
                                    <property Type="choicelist" Value="0" id="bypass"/>
                                <property Type="filepathfield" Value="" id="GEL File"/>
                                </cpu>
                            </subpath>
                        </router>
                    </device>
                </platform>
            </connection>
        </configuration>
    </configurations>
    

    Hi Lisa

    I have attached target_config.ccxml file. For attachment, file renamed as text file.

    Regards

    Mahesh Chindhade

  • Hi Mahesh,

    your ccxml looks fine so we may need to dig a bit to see where the script is being pulled in from.     WHen in debug mode, could you please go to the "scripts" menu and see what (if any) GEL files are listed/loaded.

    Best Regards,

    Lisa

  • Hi Mahesh,

    just wanted to check for any updates with your enquiry.

    Best Regards,

    Lisa

  • Hi Lisa,

    Sorry for my delayed response.

    In Debug mode, I checked script menu and observations are as below -

    sub-menu StatUp -> Memory map initialization

    sub-menu Peripherals -> uart_enable, watchdog_enable

    sub-menu MPU -> Enable MPU, Disable MPU

    But its not clear from where GEL code is getting executed.

    But certainly, memory initialization, uart enable and watchdog enable GEL code gets executed when I start Debug. Pl inform further steps for resolving issue.

    Regards

    Mahesh Chindhade

  • Hi Lisa

    Can you suggest further checkpoints to resolve issue?

    Regards

    Mahesh Chindhade

  • Hi Mahesh,

    Somehow, some GEL file is getting loaded.

    Could you try this experiment - specify a GEL file in your target configuration. But have that GEL file blank/empty. Then try again and see if that blank file gets loaded in addition to the other one you keep seeing.

    Thanks

    ki