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.

TM4C123BE6PM: How to use the BOR1 as *interrupt* source

Part Number: TM4C123BE6PM

Hello,

Could you please tell us how to use the BOR1 as interrupt source?

My customer asked a couple of questions:

Q1. Which is the interrupt vector for BOR1? (I think it is System control, but let me confirm.)

Q2. How to use the BOR1 as *interrupt* source ?

We would be glad if there is a sample code or a procedure.

As long as I check the following bits would be used in the procedure..

PBORCTL.BOR1 = 0 /* BOR1 to trigger an interrupt */

RIS.BOR1RIS bit to know the BOR1.

MISC.BOR1MIS bit to know that the BOR1 has triggered an interrupt.

MISC.BOR1MIS =1 /* clear the interrupt flag. */

- - -

p.s.  I'm aware of the another thread, https://e2e.ti.com/support/microcontrollers/other/f/908/t/842037 , which discuss that it is preferable to use BOR1 for reset. Not for interrupt.

  • There are no examples on how to change the brown out 1 detect from reset to interrupt because this is not recommended. At that low voltage, the device may not operate properly. With that said, here is code that disables the reset, clears any pending brownout flags and enables the local interrupts:

    #include "inc/hw_memmap.h"
    #include "inc/hw_sysctl.h"
    

    ...

        // Disable reset on brown out
        HWREG(SYSCTL_PTBOCTL) = 0;
        // Clear any lingering brownout flags
        HWREG(SYSCTL_MISC) = SYSCTL_IMC_BOR0IM | SYSCTL_IMC_BOR1IM;
        // Enable brown out 1 interrupt
        HWREG(SYSCTL_IMC) = SYSCTL_IMC_BOR1IM;
    

    The interrupt vector is the system control vector. It is in line 109 of the standard startup_ccs.c file:

        IntDefaultHandler,                      // System Control (PLL, OSC, BO)
    

  • Bob,

    Thank you for your comment and code. Very kind.