Pin configuration in S32Ds.power

cancel
Showing results for 
Search instead for 
Did you mean: 

Pin configuration in S32Ds.power

827 Views
fixed-term_apar
Contributor II

I am using S32Ds.Power.2017.R1 to program MPC5604P. I have run the default program which was in the file of MTRCKTSPS5604P named MTRCKTSPS5604P_S32DS. But i am facing great difficulty to find the declarations of microcontroller pins in the program code. I want to know where can i find the pin configurations in the code?

And I have tried generating the processor expert code, but it shows there is no active projects.

Also  when i try to run the code it shows a popup as below :

pastedImage_1.png

pastedImage_1.png

Thanks

Aparna

Labels (2)
0 Kudos
9 Replies

261 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

1) I checked the software you use and this is determined for S32 Design Studio 1.2, so it is possible it will not run correct in 2017.R1.

2) And I have tried generating the processor expert code, but it shows there is no active projects.

This is correct, because there is no SDK used in the project. This is the reason, why Processor Expert cannot be used in this project.

3) About pin configuration, this can be used in siu.c file.

Please feel free to write me back if you have any other questions.

Regards,

Martin

0 Kudos

261 Views
fixed-term_apar
Contributor II

Thanks Martin!

So you are suggesting that when i use the S32Ds version 1.2 for programming "3-Phase PMSM Motor Control Kit with the MPC5604P", then i will be able to run the code and generate the processor expert code. i shall try that.

Also i have seen the siu.c file and there is pin configuration but i am still unsure, how i can relate them to the pin number from the MPC5604P MCU. Is there any documentation such as developer guide where i can find how these numbers are related?

My need is to find the pins that take the information from resolver/sincos interface. But i could not find the pins that are shown in the MCU schematic in the program code. The program shows the ports instead. So i want to know how these are programmed. I have attached images for reference.

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

Thanks and Regards,

Aparna

0 Kudos

261 Views
martin_kovar
NXP Employee
NXP Employee

Hello Aparna,

if you use S32DS 1.2, you should be able to compile and download the program correctly.

Unfortunately, Processor Expert (PE) is not available for this project, because PE is available for SDK base projects only. But there is no SDK available for any MPC56xx microcontroller.

When you look into the reference manual, in chapter 3, there is pin description, which tells you, what is the functionality for

each pin (https://www.nxp.com/docs/en/reference-manual/MPC560XPRM.pdf ).

pastedImage_1.png

When you combine this with the figure you shared, you can see, how is every pin configured.

pastedImage_2.png

For example PHASEA0 is A[0] Port pin, so you can check, what is the PCR0 configuration.

Description of the PCR register can be found in chapter 11 SIUL.

pastedImage_4.pngpastedImage_5.png

Regards,

Martin

0 Kudos

261 Views
fixed-term_apar
Contributor II

As you told in stalled the version1.2 but there was no option to open file from the system so i imported the code. And when i try to build the code i get errors such as "no rule to make target all" and "unresolved inclusions". so i tried to add the path of header files in includes but i found the header files are not available in the directory any more.  Is it because i have both versions running in my system and both versions used the code from same file.

Also i would like to know if there is a possibility to get signals from an external sensor other than resolver and encoder through the pins in µc board. If so which pins can i use for this purpose?

0 Kudos

261 Views
martin_kovar
NXP Employee
NXP Employee

Hello Aparna,

including project into the S32DS is correct. There is no other simple way. First of all, please be sure, you have independent workspaces for both versions. Path to the workspace should not contain any special characters or spaces etc. Also, please be sure you have copied the project into the workspace for S32DS 1.2.

Could you please eventually show me the errors you receive? From my point of there, it is not necessary to modify project settings like paths, it should work by default. You can try to clean project before compiling it again.

Also i would like to know if there is a possibility to get signals from an external sensor other than resolver and encoder through the pins in µc board. If so which pins can i use for this purpose?

It depends on the interface the sensor uses. If there is no communication interface like SPI or IIC, and only general GPIO pins are used, you can choose any free GPIO pin available in the microcontroller. If you tell me which sensor you use, I can tell you, what pins could be used.

Regards,

Martin

0 Kudos

261 Views
fixed-term_apar
Contributor II

Thanks for the reply!

The workspace for both versions were different. and Both versions are showing the same error now.

S32DS.Power.2017.R1

pastedImage_1.png

pastedImage_2.png

S32.DSv1.2

pastedImage_3.png

It depends on the interface the sensor uses. If there is no communication interface like SPI or IIC, and only general GPIO pins are used, you can choose any free GPIO pin available in the microcontroller. If you tell me which sensor you use, I can tell you, what pins could be used.
I am planning to use a motor position sensor which has sin cos output and can be used at end of the shaft such as the one from hella electronics. I want to observe the difference between the outputs of resolver and motor position sensor. Instead of the resolver signals i want to use the signals from the motor position sensor. So the output from the sensor i use should go as an input to the micro controller (PHASE A and PHASE B). Is there any particular pin i can use for this.

Thanks

Aparna

0 Kudos

261 Views
martin_kovar
NXP Employee
NXP Employee

Hello Aparna,

unfortunately, your question regarding motor position sensor is out of my technical knowledge, and it is not related to the original question, so I created another thread and some colleague of mine will handle this thread.

https://community.nxp.com/message/1127504 

Thank you for understanding.

Regards,

Martin

0 Kudos

261 Views
martin_kovar
NXP Employee
NXP Employee

Hello Aparna,

I checked on my side again and it works correct to me. I will describe the steps I did.

1) I downloaded application software from the link below

https://www.nxp.com/webapp/Download?colCode=MTRCKTSPS5604P_SW&appType=license 

2) I installed the software including AMMCLIB

pastedImage_2.png

3) I installed S32DS v 1.2 and Update 3

S32 Design Studio for Power v1.2 - Update 3 available 

4) I opened S32DS, click File->Import->Existing project into workspace (Workspace is in path C:/Workspaces/workspaceS32DS.Power1.2)

pastedImage_4.png

5) I chose the installed project and clicked Finish

pastedImage_8.png

6) I chose the project in the workspace and clicked Build.

pastedImage_9.png

As you can see in the figure below, projects is compiled correct.

pastedImage_10.png

Regards,

Martin

261 Views
fixed-term_apar
Contributor II

Thanks Martin that was very detailed explanation. I shall go through it.

Regards

Aparna

0 Kudos