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/TM4C123GH6PM: disabling IRQ using CCS

Part Number: TM4C123GH6PM

Tool/software: Code Composer Studio

Hello All, 

I am trying to follow a "textbook" and it is using uVision Compiler but I decided to use Code composer Studio. In the textbook its using C prototype __disable_irq. I am not sure what it would translate in CCS but I think it means to disable all interrupts and I don't know how to achieve that command.  

If anyone can help me understand what I would have to do in CCS that equates to that prototype, I would greatly appreciate the help.

Thank you.

  • Your discovery & regular read/review of the, "Tivaware Peripheral Driver Library"  (SW-TM4C-DRL-UG-2.1.4.178) reveals:

    17.2 API Functions

    Functions

    These 2 API  functions disable or enable 'all' interrupts:

    • bool IntMasterDisable (void)
    • bool IntMasterEnable (void) 

    And these 2 functions operate upon specific interrupts:

    • void IntDisable (uint32_t ui32Interrupt)
    • void IntEnable (uint32_t ui32Interrupt)

    That manual fully details the use, application & parameters employed for all API functions.   Even the source code is provided - to maximize understanding...

  • I looked into the manual and applied as instructed but I am getting errors. I included <hw_types.h> as it stated to do so before declaring <interrupt.h> and it stated an error "identifier "bool" is undefined" in the interrupt header file. Why would it cause that and/or what can I do to fix it?

    How I listed everything in my main.c file

    #include <stdint.h>
    #include <C:\ti\TivaWare_C_Series-2.1.4.178\inc\tm4c123gh6pm.h>
    #include <hw_types.h>
    #include <interrupt.h>
    /* Function Prototypes */
    bool IntMasterDisable(void);
    int main (void)
    {
    Thank you for the help!!!!
  • My friend - your original question has been well answered.    You've now moved to, 'C programming' - which is both a 'different' and 'far broader' beast.

    You  should be able to run the 'Window's Search Function' - seeking 'bool' - targeting your Tivaware directory - and locate several example programs which deploy that 'bool' as identifier.   (really - would not your review of (any) identifier's implementation - answer your (new) question?)

  • Hello Orlando, 

    You also need this:

    #include <stdbool.h>
    

  • cb1_mobile,

    Yes, the information you gave me on the previous message did solve my problem. I really appreciate the help. I had been stuck on the issue for a while and couldn't figure it out. 

    Again, Thank you!!!

  • Ralph,

    That was it. My program is up and running. 

    Thank you for the information, I really appreciate it.