Interrupt not working on MAC57D54 for S32DS latest releases

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

Interrupt not working on MAC57D54 for S32DS latest releases

Jump to solution
1,996 Views
ankur_vcns_apps
NXP Employee
NXP Employee

A bare metal example project enabling peripheral interrupt (eg. PIT) generated on S32DS for ARM v 1.3 does not work on S32DS for Arm v 2.0 and S32DS for Arm 2018.R1. AjeshKumar

1 Solution
1,664 Views
stanish
NXP Employee
NXP Employee

Hi Ankur,

I'd suggest you to update vector file (vt_MAC57D54H_M4.s):

        .section .vt,"a"           /* place vectors into .vt linker section */
vt:    
        .word _stack_e               /* initial SP */
        .word exception_trap         /* Reset */

        /* exceptions*/
        .word exception_trap                /* 2 NMI */
        .word exception_trap                /* 3 HardFault */‍‍‍‍‍‍‍‍

...

        .section .text   /* exception_traps, interrupt_trap goes into .text */
 .thumb
exception_trap:
        b exception_trap

interrupt_trap:
        b interrupt_trap‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

now adjust the linker file:

SECTIONS
{
    
    /* Interrupt vectors area */
    .intvec : 
    {
      M4_0_VECTOR_TABLE = .;
      M4_0_VECTOR_RAM = .;
      KEEP(*(.vt*))  /* avoid removing the section if vt is not referenced */
      M4_0_VECTOR_SIZE = .;
      } > GRAM‍‍‍‍‍‍‍‍‍‍‍

In the .map file you should see now vector table placed at address 0x3F000100:

.intvec      0x3f000100      0x200
             0x3f000100      M4_0_VECTOR_TABLE = .
             0x3f000100      M4_0_VECTOR_RAM = .
 *(.vt*)
 .vt         0x3f000100      0x200 ./Project_Settings/Startup_Code/vt_MAC57D54H_M4.o
             0x3f000100      vt
             0x3f000300      M4_0_VECTOR_SIZE = .‍‍‍‍‍‍‍

Hope it helps.

Stan

View solution in original post

6 Replies
1,664 Views
stanish
NXP Employee
NXP Employee

Hi Ankur,

Could you possibly send us the project you are trying to open in a newer S32DS version?

This will help us to resolve this issue much faster.

Thanks!

Stan

0 Kudos
1,664 Views
ankur_vcns_apps
NXP Employee
NXP Employee

Hi Stanislav, 

Attached is the project with which I am experiencing the issue. When the project is build/debug through S32DS ver 2.0 I see repeated resets on the hardware and this is always the case. When the same project is build/debug through S32DS ver 1.3 all works well. I will wait for your response.

Regards,

Ankur

0 Kudos
1,664 Views
ankur_vcns_apps
NXP Employee
NXP Employee

Hi stanish‌,

Do we have any progress on this?

Regards,

Ankur

0 Kudos
1,665 Views
stanish
NXP Employee
NXP Employee

Hi Ankur,

I'd suggest you to update vector file (vt_MAC57D54H_M4.s):

        .section .vt,"a"           /* place vectors into .vt linker section */
vt:    
        .word _stack_e               /* initial SP */
        .word exception_trap         /* Reset */

        /* exceptions*/
        .word exception_trap                /* 2 NMI */
        .word exception_trap                /* 3 HardFault */‍‍‍‍‍‍‍‍

...

        .section .text   /* exception_traps, interrupt_trap goes into .text */
 .thumb
exception_trap:
        b exception_trap

interrupt_trap:
        b interrupt_trap‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

now adjust the linker file:

SECTIONS
{
    
    /* Interrupt vectors area */
    .intvec : 
    {
      M4_0_VECTOR_TABLE = .;
      M4_0_VECTOR_RAM = .;
      KEEP(*(.vt*))  /* avoid removing the section if vt is not referenced */
      M4_0_VECTOR_SIZE = .;
      } > GRAM‍‍‍‍‍‍‍‍‍‍‍

In the .map file you should see now vector table placed at address 0x3F000100:

.intvec      0x3f000100      0x200
             0x3f000100      M4_0_VECTOR_TABLE = .
             0x3f000100      M4_0_VECTOR_RAM = .
 *(.vt*)
 .vt         0x3f000100      0x200 ./Project_Settings/Startup_Code/vt_MAC57D54H_M4.o
             0x3f000100      vt
             0x3f000300      M4_0_VECTOR_SIZE = .‍‍‍‍‍‍‍

Hope it helps.

Stan

1,665 Views
ankur_vcns_apps
NXP Employee
NXP Employee

Thanks Stanislav. However I would have liked to see this as by default integrated in the IDE. Under present circumstances, it makes difficult for users to work on interrupts.

Regards,

Ankur

0 Kudos
1,665 Views
stanish
NXP Employee
NXP Employee

Ankur,

Thanks for the feedback,

let me log this issue into our defect tracking database.

Stan

0 Kudos