cancel
Showing results for 
Search instead for 
Did you mean: 

SPC5 compiling MCS code for SPC572L

Larsa
Associate II

We have a project running with TIM input signal and ATOM outputs and are now trying to use the MCS, we have looked at the GTM DPLL Test application and done some modification to the MCS program. Are there any tricks or options needed to compile the MCS program with SPC5?

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee

Hello Lhase ,

You can check the rules.mk located in spc5_gtm_component_rla.

Best regards

Erwan

0693W00000DmRQJQA3.png

View solution in original post

4 REPLIES 4
Erwan YVIN
ST Employee

Hello Lhase ,

You can check the rules.mk located in spc5_gtm_component_rla.

Best regards

Erwan

0693W00000DmRQJQA3.png

Larsa
Associate II

Thanks for the quick reply Erwan,

Yes we found the rules and have it up and running with the compiler now.

Are there any limits to code size or anything else that we need to keep in mind?

/Lars

ECAST.1
Associate II

Hello Lars,

Please see the document at link: https://www.st.com/resource/en/reference_manual/rm0361-generic-timer-module-specification-revision-1551-stmicroelectronics.pdf

This is the reference manual for GTM on SPC572L ST MCU.

The number of MCS instance on this micro is 2 (mcs0 - mcs1).

The chapter 14 of GTM RM describes the MCS memory configuration, in the available SPC5Studio test application a "default" memory configuration have been used.

Best Regards,

Emanuele

Thanks for the help Emanuele,

I quick look in the reference manual and the registers when running shows that in GTM_DPLL_CTRL_3 it´s not possible to enable AEN15 however we try.

It turns out that the gtm_dpll.c file need a slight adjustment < 15UL should be changed to < 16UL (attached picture)

Now everything is up and running as it should, and yes 2 mcs on this one but we plan to use all 3 mcs on the SPC574K soon.

0693W00000Dn1E4QAJ.jpgBest Regards,

Lars