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.

TMS320F280049: is there any assembly instruction to read GPADAT in CLA?

Part Number: TMS320F280049

Customer is asking whether there is a similar assembly instruction as "TBIT" in C28 CPU in CLA, to read GPADAT? Or any other simple instructions to deal with this? Thank you.

  • There is no direct TBIT equivalent in the CLA instruction set.  You would have to do an 32-bit integer read of GPADAT into a CLA register, then AND it with a mask and do a conditional test on the result.  It's pretty straightforward to do.  Something like:

    MMOVI16     MAR0, #0x7FFF     ; load MAR0 with GPADAT address
    MNOP
    MNOP
    MNOP
    MNOP
    MMOV32     MR1, *MAR0[0]++     ; read GPADAT into MR1 as integer
    MMOVI32     MR2, #0x00000001     ; set up mask
    MAND32     MR3, MR1, MR2     ; AND with bit0
    MMOV32     MR2, MR0, EQ     ; conditional move (for example) based on result

    Regards,

    Richard