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.

C674x Register save on context switch

Other Parts Discussed in Thread: SYSBIOS

Hi!

Is there a list of registers that need to be saved upon a context switch on a 674x DSP?

Currently i do save these which seems to work:

  • AMR
  • CSR
  • IRP
  • A0-A15
  • B0-B15

The compiler handbook lists some more for the C6740 family:

  • FADCR   Floating-point adder configuration register
  • FAUCR   Floating-point auxiliary configuration register
  • FMCR    Floating-point multiplier configuration register
  • ICR     Interrupt clear register
  • IFR     Interrupt flag register. (IFR is read only.)
  • ISR     Interrupt set register
  • ISTP    Interrupt service table pointer
  • NRP     Nonmaskable interrupt return pointer

do these, or any other registers need to be saved/restored?

Thank you!

 

 

 

  • Though this is a device related question, I think this question might be better answered on the BIOS or a compiler forum where they might be able to explain to you what DSP registers are being saved when a task switch occurs in BIOS or  when an interrupt occurs. At the moment, I am inclined to say that you might want to save all of the above just to be sure you don`t miss anything but if size of memory used in context saving is an issue, you might need the specifics.

    Also refer following, for memory requirements during context switching.

    http://processors.wiki.ti.com/index.php/TSK_stack_content_during_context_switching

    Regards,

    Rahul

  • Rahul --

    Does the following table help?   This is included in the family-specific section of the API doc in the product.

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_32_03_43/exports/bios_6_32_03_43/docs/cdoc/index.html

    -Karl-

  • Thank you Karl!

    Following the link you posted if found this page:

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_32_03_43/exports/bios_6_32_03_43/docs/cdoc/ti/sysbios/family/c62/doc-files/c6xregconv.html

    which shows which registers are being saved upon a context switch by ti bios.