Clock_Ip_GetClockFrequency() not enabled

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

Clock_Ip_GetClockFrequency() not enabled

Jump to solution
1,718 Views
Hareesh
Contributor II

Hi NXP team,

We are using S32K344 EVK board and S32 design studio v3.5.

We want to use Clock_Ip_GetClockFrequency() function from  ..../RTD/include/Clock_Ip.h file  to calculate time in millisecs as per below code.

void BCC_MCU_WaitMs(uint16_t delay)
{
    g_sysClk = (g_sysClk) ? g_sysClk : BCC_MCU_GetSystemClockFreq();

    uint32_t cycles = (uint32_t) BCC_GET_CYCLES_FOR_MS(1U, g_sysClk);

    /* Advance to next multiple of 4. Value 0x04U ensures that the number
     * is not zero. */
    cycles = (cycles & 0xFFFFFFFCU) | 0x04U;

    for (; delay > 0U; delay--) {
        BCC_WAIT_FOR_MUL4_CYCLES(cycles);
    }
}

 

But in my SDK the Clock_Ip_GetClockFrequency() function is not enabled. How to enable this function?(Please find the attached image for your reference)

Please assist me to resolve this issue.

 

Thanks and regards,

Hareesh

0 Kudos
Reply
1 Solution
1,707 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Hareesh 

To enable the get clock frequency API, you have to activate it in the clock tool of Config Tools. 

VaneB_0-1716920261633.png

B.R.

VaneB

View solution in original post

1 Reply
1,708 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Hareesh 

To enable the get clock frequency API, you have to activate it in the clock tool of Config Tools. 

VaneB_0-1716920261633.png

B.R.

VaneB

%3CLINGO-SUB%20id%3D%22lingo-sub-1876333%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EClock_Ip_GetClockFrequency()%20not%20enabled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1876333%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20NXP%20team%2C%3C%2FP%3E%3CP%3EWe%20are%20using%20S32K344%20EVK%20board%20and%20S32%20design%20studio%20v3.5.%3C%2FP%3E%3CP%3EWe%20want%20to%20use%26nbsp%3BClock_Ip_GetClockFrequency()%20function%20from%26nbsp%3B%20....%2FRTD%2Finclude%2FClock_Ip.h%20file%26nbsp%3B%20to%20calculate%20time%20in%20millisecs%20as%20per%20below%20code.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Evoid%20BCC_MCU_WaitMs(uint16_t%20delay)%0A%7B%0A%20%20%20%20g_sysClk%20%3D%20(g_sysClk)%20%3F%20g_sysClk%20%3A%20BCC_MCU_GetSystemClockFreq()%3B%0A%0A%20%20%20%20uint32_t%20cycles%20%3D%20(uint32_t)%20BCC_GET_CYCLES_FOR_MS(1U%2C%20g_sysClk)%3B%0A%0A%20%20%20%20%2F*%20Advance%20to%20next%20multiple%20of%204.%20Value%200x04U%20ensures%20that%20the%20number%0A%20%20%20%20%20*%20is%20not%20zero.%20*%2F%0A%20%20%20%20cycles%20%3D%20(cycles%20%26amp%3B%200xFFFFFFFCU)%20%7C%200x04U%3B%0A%0A%20%20%20%20for%20(%3B%20delay%20%26gt%3B%200U%3B%20delay--)%20%7B%0A%20%20%20%20%20%20%20%20BCC_WAIT_FOR_MUL4_CYCLES(cycles)%3B%0A%20%20%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EBut%20in%20my%20SDK%20the%26nbsp%3BClock_Ip_GetClockFrequency()%20function%20is%20not%20enabled.%20How%20to%20enable%20this%20function%3F(Please%20find%20the%20attached%20image%20for%20your%20reference)%3C%2FP%3E%3CP%3EPlease%20assist%20me%20to%20resolve%20this%20issue.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20and%20regards%2C%3C%2FP%3E%3CP%3EHareesh%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1876492%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Clock_Ip_GetClockFrequency()%20not%20enabled%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1876492%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F227300%22%20target%3D%22_blank%22%3E%40Hareesh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20enable%20the%20get%20clock%20frequency%20API%2C%20you%20have%20to%20activate%20it%20in%20the%20clock%20tool%20of%20Config%20Tools.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22VaneB_0-1716920261633.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22VaneB_0-1716920261633.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F281198i84BE5872828A3F7F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22VaneB_0-1716920261633.png%22%20alt%3D%22VaneB_0-1716920261633.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EB.R.%3C%2FP%3E%0A%3CP%3EVaneB%3C%2FP%3E%3C%2FLINGO-BODY%3E