2017-01-21 09:58 PM
Hello, I configured in enhanced mode for system clock generation, our input clock is 40Mhz external crystal and need to generate 150Mhz system clock. Since hardware is not supported to check CLKOUT pin for system clock, we configured SCK clock for calculating system clock.
NOTE: For above configuration the parameters values EPREDIV, ERFD and EMFD is not satisfying for 150Mhz system clock generation if we substitute in enhanced mode formula. Im confused!!!!!
Please do needful and give us solution resolve this issue, the project is in critical condition. If any documents related to issue please do share to my ID below mentioned.
Regards
Mahesh chamaraja
Office ID :
mailto:mahesh.chamaraja@kpit.com
Phone No : +917259205624
##clock ##spc56 ##fmpllSolved! Go to Solution.
2017-01-31 12:43 AM
Hello Mahesh ,
For this , you should contact TRACE32 Lauterbach in parallel.
I have no issue with PLS UDE using your configuration
See my clock configuration below
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
/**
* @brief Disables the clocks initialization.
*/
#if !defined(SPC5_NO_INIT) || defined(__DOXYGEN__)
#define SPC5_NO_INIT FALSE
#endif
/**
* @brief Clock bypass.
* @note If set to @p TRUE then the PLL is not started and initialized, the
* external clock is used as-is and the other clock-related settings
* are ignored.
*/
#if !defined(SPC5_CLK_BYPASS) || defined(__DOXYGEN__)
#define SPC5_CLK_BYPASS FALSE
#endif
/**
* @brief Disables the overclock checks.
*/
#if !defined(SPC5_ALLOW_OVERCLOCK) || defined(__DOXYGEN__)
#define SPC5_ALLOW_OVERCLOCK FALSE
#endif
/**
* @brief External clock pre-divider.
* @note Must be in range 1...
*/
#if !defined(SPC5_CLK_PREDIV_VALUE) || defined(__DOXYGEN__)
#define SPC5_CLK_PREDIV_VALUE 2U
#endif
/**
* @brief Multiplication factor divider.
* @note Must be in range ..
*/
#if !defined(SPC5_CLK_MFD_VALUE) || defined(__DOXYGEN__)
#define SPC5_CLK_MFD_VALUE 75U
#endif
/**
* @brief Reduced frequency divider.
*/
#if !defined(SPC5_CLK_RFD) || defined(__DOXYGEN__)
#define SPC5_CLK_RFD RFD_DIV2
#endif�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
/**
* @brief SPC563 clocks and PLL initialization.
* @note This function must be invoked only after the system reset.
*
* @special
*/
void spc_clock_init(void) {
#if (SPC5_NO_INIT == FALSE)
/* PLL activation.*/
FMPLL.ESYNCR1.B.EMODE = 1; /* Enhanced mode on. */
FMPLL.ESYNCR1.B.CLKCFG &= 1U; /* Bypass mode, PLL off.*/
#if (SPC5_CLK_BYPASS == FALSE)
FMPLL.ESYNCR1.B.CLKCFG |= 2U; /* PLL on. */
FMPLL.ESYNCR1.B.EPREDIV = (uint8_t)SPC5_CLK_PREDIV;
FMPLL.ESYNCR1.B.EMFD = SPC5_CLK_MFD;
FMPLL.ESYNCR2.B.ERFD = SPC5_CLK_RFD;
while (FMPLL.SYNSR.B.LOCK == 0U) {
}
FMPLL.ESYNCR1.B.CLKCFG |= 4U; /* Clock from the PLL. */
#endif /* !SPC5_CLK_BYPASS */
/* SYS Clock Divider setting.*/
#if (SPC5_SIU_SYSDIV_BYPASS == TRUE)
SIU.SYSDIV.B.BYPASS = 1U;
#else
SIU.SYSDIV.B.BYPASS = 0U;
SIU.SYSDIV.B.SYSCLKDIV = (uint8_t)SPC5_SIU_SYSDIV_SYSCLKDIV;
#endif
/* Setting up RAM/Flash wait states and the prefetching bits.*/
ECSM.MUDCR.R = SPC5_RAM_WS;
FLASH_A.BIUCR.R = SPC5_FLASH_BIUCR | SPC5_FLASH_WS;
FLASH_A.BIUCR2.R = 0;
#if !defined(_SPC564A70_)
/* The second controller is only present in Andorra 3M or 4M.*/
FLASH_B.BIUCR.R = SPC5_FLASH_BIUCR | SPC5_FLASH_WS;
FLASH_B.BIUCR2.R = 0;
#endif /* !defined(_SPC564A70_) */
#endif /* !SPC5_NO_INIT */
}�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
Best regards
Erwan
2017-01-31 07:39 AM
Hello Erwan,
Still I facing same problem debug port fail that to only main function and PLL initialisation in my code.
One more important thing i reduced PLL from 150Mhz to 137Mhz, its working fine. why these changes making impact?
Regards
Mahesh
2017-02-01 08:04 AM
Hello ,
Have you contacted TRACE32 Lautechbach ppc ?
I have A70L7 Discovery Board and Mini-Module A70L7.
No Pb on 150Mhz
Did you try my clock configuration by using the Bit Configuration not a Full Registers setting ?
(cf Last Screenshot)
Best regards
Erwan
2017-02-01 08:15 AM
you should assert EMODE and program EPREDIV / EMFD by bits
Otherwise the PLL can not locked
Could you respect 1) 2) 3) 4) ?
Best regards
Erwan
2017-02-01 08:41 PM
Hello,
If I reduce PLL clock frequency, I'm able to achieve free running. Since even I tried with different setting and on different lauterbach setup .
I think no problem with Lauterbach
Regards
Mahesh
2017-02-01 08:48 PM
Hello Erwan,
Yes above steps i followed to program the FMPLL and engage normal mode but '3rd' point not configured, frequency modulation not required.
Regards
Mahesh
2017-02-02 12:53 AM
Hello Mahesh ,
Could you send me your clock configuration ?
The first configuration is not correct.
You have asserted your clock by full registers not by bits.
Best regards
Erwan
2017-02-02 05:44 AM
Hello Erwan,
Please check our clock configuration. Mhz
Regards
Mahesh
2017-02-08 11:44 PM
Hello Erwan,
I'm waiting for reply. check above clock settings.
Best regards
Mahesh
2017-02-16 12:29 AM
Hello Mahesh ,
I have reproduced your issue.
in putting your clock settings, the PLL can not be locked.
SPC564Axx should support this clock settings.
I am checking with soc functional valid team.
Best regards
Erwan