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.

LP-MSPM0G3507: LP-MSPM0G3507

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: MSPM0G3507

Tool/software:

Hello, 

I would like to know what configurations are needed to perform square root, for example the square root of the number 9

  MATHACL->CTL = MATHACL_CTL_FUNC_SQRT | /// Do square root
MATHACL_CTL_OPTYPE_UNSIGNED | /// the operand is unsigned
MATHACL_CTL_QVAL_Q0; /// no fractional

MATHACL->OP1 = 9U;

MATHACL->OP2 = 0U;

 while ((MATHACL->STATUS & MATHACL_STATUS_BUSY_MASK) ==
           MATHACL_STATUS_BUSY_NOTDONE) {
        ;
    }
result = MATHACL->RES1;
best regards 
Ali