How to handle divide by zero exception in FPU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to handle divide by zero exception in FPU

593 Views
Kiran_Gowda
Contributor I

Hi All,

I'm working on S32k358 .I see the exception bit is set in the FPSCR for division by zero exception but i don't see any exception handler  is being triggered on that. I could see the vdiv.f32 instruction. 

Thank you

0 Kudos
Reply
3 Replies

550 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, It apparently should not trigger an exception, it is rather expected to test status register after operation.

davidtosenovjan_1-1675178321029.png

 

 

0 Kudos
Reply

545 Views
Kiran_Gowda
Contributor I
Hi,
Is there any sample code to return value from the divide by zero operation upon checking the status register. Please share

Thanks
0 Kudos
Reply

505 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Unfortunately I don't have example code to share. I is just needed to test FPSCR register after operation.

0 Kudos
Reply