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.

TDA4VM-Q1: TDA4VM MCU R5F

Part Number: TDA4VM-Q1

Hi, Expert, 

Division by zero can caused data abnormal. So customer need to detect the error and deal with exception. 
Once the Division by Zero happened , Do we have any registers to check or any method to check that ? 
 
I have seen kip give some comments here. Customer need  more details. Please help to give your comments. Thanks. 
Regards, 
Fredy Zhang
 
  • Hi Fredy, 

    Reference to Cortex-R5 Technical Reference Manual r1p2 (arm.com), the DZ bit in SCTLR can be set to generate an Undefined Instruction exception when a divide by zero occurs.

    Please note that some compilers use __aeabi_uidivmod API for division operation and this API checks the value of divisor and if it is set to 0, it ignores division operation. 

    Regards,

    kb