Skip to main content
Associate II
March 21, 2024
Solved

SPC58NH FPU exception

  • March 21, 2024
  • 4 replies
  • 4478 views

Hi all,

I'm trying add FPU exception to my project and I'm bit confused because two sources points two different interrupt vectors for this. Book E says, FPU exception is under IVOR33 but SPC58xH manual points IVOR10. And SPC5Studio libraries have "decrementer support" under IVOR10. I suspect SPC58xH is right for me but I want to be sure. 

 

regards

Michal

This topic has been closed for replies.
Best answer by Giuseppe DI-GIORE

Hello,

SPC58xH Reference Manual is right.

SPC58xH implements two FPU exceptions:

  • EFPU Data Exception (offset 0xA0)
  • EFPU Round Exception (offset 0xB0)

Each entry in the exception table is 16 bytes.

Considering the exception table as an array with 16 bytes for each entry:

  • offset 0xA0 is at index 10 (decimal): IVOR10
  • offset 0xB0 is at index 11 (decimal): IVOR11 

In SPC5Studio, exception table implementation uses align 4 directive to have 16 bytes displacement.

SPC5Studio implements the exception table up to entry 15 (IVOR15)

IVOR10 implementation, in SPC5Studio, refers to the decrementer as defined on Book-E but the code is commented, just a matter of porting the exception handlers form a previous device (which implements the decrementer at IVOR10).

 

Best Regards.

4 replies

Erwan YVIN
ST Employee
March 22, 2024

Hello , 

i am checking the mismatch between booke and SPC58Hx Ref Manual

by default , take Chorus_10M Reference Manual ;)

           Best regards

                       Erwan

Associate II
March 29, 2024

Hi Erwan,

I've found bug in application note AN5549 where figures 6 and 10 should be swapped. 

Hardware vector mode require vector table at offset 0x1000 so fig. 10 is incorrect.

regards

Michal

Giuseppe DI-GIORE
ST Employee
April 13, 2024

Hello,

SPC58xH Reference Manual is right.

SPC58xH implements two FPU exceptions:

  • EFPU Data Exception (offset 0xA0)
  • EFPU Round Exception (offset 0xB0)

Each entry in the exception table is 16 bytes.

Considering the exception table as an array with 16 bytes for each entry:

  • offset 0xA0 is at index 10 (decimal): IVOR10
  • offset 0xB0 is at index 11 (decimal): IVOR11 

In SPC5Studio, exception table implementation uses align 4 directive to have 16 bytes displacement.

SPC5Studio implements the exception table up to entry 15 (IVOR15)

IVOR10 implementation, in SPC5Studio, refers to the decrementer as defined on Book-E but the code is commented, just a matter of porting the exception handlers form a previous device (which implements the decrementer at IVOR10).

 

Best Regards.

Associate II
April 16, 2024

Is it necessary switch to hardware vector mode to support FPU exception in IVOR10?

 

regards

Michal

Giuseppe DI-GIORE
ST Employee
April 16, 2024

Hello Michal,

there is no need to switch to hardware mode interrupt to handle IVOR10 exception.

Please have a look at SPC58NH Reference Manual rev4, at page 450.

 

Regards,