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.

BIOS6 Idle for C64x+

Other Parts Discussed in Thread: SYSBIOS

In BIOS 6, when a C64x+ core is idle and has no functions to run, will it run the IDLE instruction? I would like to know so that cores can be put to sleep when they are not needed.


  • No, the CPU is not idled by default in the SYS/BIOS Idle loop.  But you can add your own Idle function to do this.  For example, you can create a C function like this:

    Void IdleCPU()
    {
        asm(" IDLE");
    }

    And then add this function to the Idle loop, e.g., with the following configuration script code:

    Idle = xdc.useModule('ti.sysbios.knl.Idle');
    Idle.addFunc('&IdleCPU');
         
    If you do this, the list of Idle loop functions will execute until the IdleCPU() function is called, and invokes the IDLE instruction.  The CPU will stay idled until the next (enabled) interrupt occurs and pulls the CPU out of idle.  Once execution returns to the Idle loop, the loop will continue thru the list of Idle functions, starting after the point where the IDLE instruction was previously invoked.  This happens until the Idle loop gets preempted, or again invokes IdleCPU(), at which time the CPU will be idled again waiting for the next interrupt.  The main point: doing the above will mean your Idle loop does not spin continuously, but will 'pause' when this function is invoked, waiting for the next interrupt. 

    Regards,
    Scott