Skip to main content
Larsa
Associate II
September 6, 2021
Solved

SPC5 compiling MCS code for SPC572L

  • September 6, 2021
  • 3 replies
  • 2013 views

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?

    This topic has been closed for replies.
    Best answer by Erwan YVIN

    Hello Lhase ,

    You can check the rules.mk located in spc5_gtm_component_rla.

    Best regards

    Erwan

    0693W00000DmRQJQA3.png

    3 replies

    Erwan YVIN
    Erwan YVINBest answer
    ST Employee
    September 7, 2021

    Hello Lhase ,

    You can check the rules.mk located in spc5_gtm_component_rla.

    Best regards

    Erwan

    0693W00000DmRQJQA3.png

    Larsa
    LarsaAuthor
    Associate II
    September 7, 2021

    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
    Visitor II
    September 13, 2021

    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

    Larsa
    LarsaAuthor
    Associate II
    September 13, 2021

    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