CLOCK_SYS_GetBusClockFreq() returns 0 in KSDK 1.1

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

CLOCK_SYS_GetBusClockFreq() returns 0 in KSDK 1.1

744 Views
marcohess
Contributor II

I ported a project from KSDK 1.0 to 1.1 (in KDS 2.0) and am running into some trouble during the PDB initialisation.

Previously using KSDK 1.0, CLOCK_SYS_GetBusClockFreq() returned the correct 60MHz and I can calculate the correct PDB MOD value.

Now with KSDK 1.1 it returns 0.

I traced through the CLOCK_SYS_GetBusClockFreq() call but it goes through so many levels of lower level functions, I can't make sense of it anymore.

What's wrong?

0 Kudos
3 Replies

609 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Marco,

You'd better don't  port the KSDK1.0 project to KSDK1.1, they are not incompatible.

Sorry for  the inconvenient for you !


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

609 Views
marcohess
Contributor II

In the mean time I found I needed the following in my hardware_init():

    /* Setup board clock source. */

    g_xtal0ClkFreq = 8000000U;

    g_xtalRtcClkFreq = 32768U;

The bus clock now properly returns the 60MHz value I was expecting.

But I am stilling having trouble with the PDB when I enable the DMA trigger of the PDB.

0 Kudos

609 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Marco,

The driver function between SDK1.0 and SDK1.1 are different , so it hared to porting .

So recommend create a new project about SDK 1.1 refer to the previous project.

BR

Alice

0 Kudos