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.

Detecting UART interrupt, multiple UART scenario

Other Parts Discussed in Thread: TM4C123GH6PM

I am using Tivaware launchpad, 'am new to TI micro controller family too, so kindly excuse me if it is a silly question.

I am using UART1, UART2 (RX int) and UART3(RX Int) in my application. along with Timer0.

Please let me know how to find out which interrupt occurred.  I know how to process the interrupt  once found.  What register (or API) to be used for reading the interrupt status.

 Thanks in Advance

- samp

  • Hi Sampoornam,

    Every peripheral has a dedicated interrupt which is mapped in the interrupt vector table. If you are using CCS for example, then the startup_ccs.c file in the CCS Project has the vector table.with a place holder for every interrupt. The place holder is the interrupt routine that would be called when the corresponding interrupt is asserted.

    The processing of the interrupt is done in the interrupt routine. So when the interrupt is asserted the interrupt routine is called and effectively you do not need to find which interrupt occurred.

    If the question is on which interrupt cause within the interrupt then you can read the Peripherla's MIS register which can be called by a API e.g. UARTIntStatus(BaseAddess, true) for getting the MIS Status.

    Regards

    Amit

  • Thanks Amit,

    I do use CCS, 

    I use the UART Int status to verify RX int ISR routine.

    Do I need to modify the startup_ccs.c file for various ISRs for each project?????

    Thank you.

    - samp

  • Hi Sampoornam,

    It would be simpler doing it via the startup_ccs.c There are other methods as well but would make debugging some what tough if not done properly.

    Regards

    Amit

  • Thanks Amit I got it,

    Only issue is the startup_ccs.c file is not getting created automatically when I create a new project.

    (Do I need to name it as startup_ccs.c or tm4c123gh6pm_startup_ccs.c)

    Thanks a lot for your support.

    - thanks and regards

    - samp

  • Hi Sampoornam

    When you would have created a new project then the tm4c123gh6pm_startup_ccs.c would have been creared. As long as this file gets compiled there is no need to rename it.

    I created a project and it created the tm4c123gh6pm_startup_ccs.c

    When creating the Project Select the following in the Device Section

    Family ARM

    Variant: Tiva TM4C123GH6PM

    In the Project templates and examples

    Empty Project -> Empty Project (with main.c)

    Regards,

    Amit

  • If I creat a new project, the file  tm4c123gh6pm_startup_ccs.c is not getting created, but it creates the .cmd file. am I missing something???

     

  • Hi Sampoornam

    I have given the steps in my previous post? Is it not working? I am able to create the same. Otherwise you can open any of the existing projects and copy-paste-rename it as well.

    Regards

    Amit

  • yes Amit, because my earlier projects were not having interrupts, didn't notice the startup file, now I noticed none of my project files has this startup file.

    I will copy and rename it, as you advised.

    Thanks Amit

    - regards

     - samp

  • Hi Sampoornam,

    So if none of your projects had this startup file then where will you copy it from. Also can you send one of your projects (zipped and attached) as I am wondering how the boot of the TM4C device is occurring.

    Regards

    Amit

  • Now I get list of errors as below,


    unresolved symbol ROM_FPUEnable, first referenced in ./function.obj RFID_GPS_SMS C/C++ Problem
    unresolved symbol ROM_FPULazyStackingEnable, first referenced in ./function.obj RFID_GPS_SMS C/C++ Problem
    unresolved symbol GPIOPinConfigure, first referenced in ./function.obj RFID_GPS_SMS C/C++ Problem

    How do I resolve it??

    - thanks

    - samp

  • Hi Sampoornam,

    The header files and the defines are missing.

    I think you need to load one of the existing TivaWare examples to understand which headers need to be included, and then compile and load the same example code on the existing EK/DK board you may have to get conversant with the device.

    Regards

    Amit