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.

How to write to DBGIER register in run time?

Other Parts Discussed in Thread: CONTROLSUITE

When I put the instruction DBGIER.INT1 = 1 the compiler don't recognize the DBGIER register, but the watch window accepts  this instruction.  

  • Ari -

    In run-time real-time emulation mode, use the IER register instead of the DBGIER register. Writes to DBGIER are valid only when the processor is halted during debug.

    See the System control guide for your device (section which describes the IER and DBGIER registers):

    "The Debug Interrupt Enable Register (DBGIER) is used only when the CPU is halted in real-time
    emulation mode
    . An interrupt enabled in the DBGIER is defined as a time-critical interrupt. When the CPU
    is halted in real-time mode, the only interrupts that are serviced are time-critical interrupts that are also
    enabled in the IER. If the CPU is running in real-time emulation mode, the standard interrupt-handling
    process is used and the DBGIER is ignored
    ."

  • In controlSUITE there is a file "DSP2803x_DBGIER.asm", which if included in your project, can allow you to use the function SetDBGIER(0x0000) to set certain DBGIER bits in code for compilation. You will need to get the right ASM file for your controller and change the hex value 0x0000 to the value you need, which for you should be 0x0002.

    File can be found in ...\controlSUITE\device_support\f2803x\v122\DSP2803x_common\source, which again may be slightly different depending on which controller you are using.

    Nishant

  • Another option during runtime is inline assembly:

    DINT;

    asm("    PUSH IER");

    asm("     POP DBGIER");

    EINT;

    This option assumes that interrupts are disabled (for example during the initialization phase) and that you would like to service all of your IER interrupts also in real-time halt mode.

     Regards