AN4561 (3-Phase PMSM Motor Control Kit with the MPC5604P) to TRK-MPC5604P port

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

AN4561 (3-Phase PMSM Motor Control Kit with the MPC5604P) to TRK-MPC5604P port

Jump to solution
1,256 Views
jasminrouleau
Contributor II

Hi,

 

I trying to "port" the AN4561 code for the MTRCKTSPS5604P board to the TRK-MPC5604P. Hardware-wise I think I'm okay but for the application I'm quite unsure... The things is that the app note code is for Green Hills Multi-Ide and I'm using Codewarrior 10.5.

 

I created a bareboard project for the MPC5604P and added the AN4561 sources to my project. After a lot of changes (newer AMMCLIB, different declaration in jdp_0100_CUT2.0.h vs MPC5604P.h) I manage to get the code to compile. I can start the debugger on run it a bit, but when the interrupts are enabled my code goes to serve the INTC interrupt and dies and the NMI trap.

 

The handler looks like that:

 

void INTC_INTCInterruptHandler(void)

{

    INTCInterruptFn *handlerFn = (INTCInterruptFn*)(*(unsigned int*)&INTC.IACKR.R);

    (**handlerFn)();

    INTC.EOIR.R = 0;

}

 

The location reached by the call " (**handlerFn)();" is clearly wrong. I wonder if the interrupt vector table for GHS and Codewarrior (gnu) compiler are compatible. Any ideas ?

 

Regards,

 

Jasmin

Labels (1)
1 Solution
1,019 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I am not sure if 1.0.3 was released, but we have it.

Peter

View solution in original post

5 Replies
1,019 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I have send you the version of this application code for CW with latest libraries used.

Peter.

1,019 Views
Luke_Chun
NXP Employee
NXP Employee

Hi petervlna

Could you provide the example code(MPC5604 PMSM based on CW 2.XX) for me?

I could not find it on web..

Thank you.

0 Kudos
1,019 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I have spoken to AN owner and he has the code for CW 2.xx also.

Peter

1,019 Views
jasminrouleau
Contributor II

Thanks Peter,

I've installed CW 2.10.

The AMMCLIB I have are v1.0.2, v1.0.4 and v.1.1.0. Did v1.0.3 was released ? Also the lib file (.a) I have are either for Green Hill, Diab or CW10x. The lib file MPC560xP_AMMCLIB_v1.0.3.PPCEABI.V.UC.A is not part of the available AMMCLIB release on freescale website.

Regards.

Jasmin

0 Kudos
1,020 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

I am not sure if 1.0.3 was released, but we have it.

Peter