cancel
Showing results for 
Search instead for 
Did you mean: 

SPC58NH FPU exception

Michal Polrola
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Giuseppe DI-GIORE
ST Employee

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.

View solution in original post

5 REPLIES 5
Erwan YVIN
ST Employee

Hello , 

i am checking the mismatch between booke and SPC58Hx Ref Manual

by default , take Chorus_10M Reference Manual ;)

           Best regards

                       Erwan

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

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.

Michal Polrola
Associate II

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

 

regards

Michal

Giuseppe DI-GIORE
ST Employee

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,