USBHS on K26 about 0N65N Mask-Errata #e9712 (unlocking USBPHYPLL if MCG_C2[EREFS]= 0)

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

USBHS on K26 about 0N65N Mask-Errata #e9712 (unlocking USBPHYPLL if MCG_C2[EREFS]= 0)

Jump to solution
1,000 Views
Sedorf
Contributor III

In my project the OSC is working with a 24MHz crystal, therefore MCG_C2[EREFS]= 1, but the routine builded in MCUXpresso 11.10.0 [build 3148] with SDK v.2.11.0 m.v.3.9.0 fall in infinite loop /* Wait for lock. */ even if crystal otion OSC selected (MCG_C2[EREFS]= 1):

/*FUNCTION**********************************************************************

*

* Function Name : CLOCK_CONFIG_EnableUsbhs0PhyPllClock

* Description : This function enables the internal 480MHz USB PHY PLL clock.

* Param src : USB HS PHY PLL clock source.

* Param freq : The frequency specified by src.

*

*END**************************************************************************/

static void CLOCK_CONFIG_EnableUsbhs0PhyPllClock(uint32_t freq) {

 

[..]

USBPHY->PLL_SIC &= ~USBPHY_PLL_SIC_PLL_BYPASS_MASK; /* Clear bypass bit */

USBPHY->CTRL &= ~USBPHY_CTRL_CLKGATE_MASK; /* Clear to 0U to run clocks */

 

/* Wait for lock. */

while (!(USBPHY->PLL_SIC & USBPHY_PLL_SIC_PLL_LOCK_MASK))

{

}

 

The workaround suggested in 0N65N Mask-Errata #e9712 not run.. possible?

Suggestions?

Tags (1)
0 Kudos
Reply
1 Solution
949 Views
Sedorf
Contributor III

Solved!

Both VREGIN0/1 are without supply, this make difficult to USB PHY operate!

View solution in original post

0 Kudos
Reply
2 Replies
950 Views
Sedorf
Contributor III

Solved!

Both VREGIN0/1 are without supply, this make difficult to USB PHY operate!

0 Kudos
Reply
940 Views
Sedorf
Contributor III
..and VBUS1 withou supply!
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1963486%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUSBHS%20on%20K26%20about%200N65N%20Mask-Errata%20%23e9712%20%20(unlocking%20USBPHYPLL%20if%20MCG_C2%5BEREFS%5D%3D%200)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1963486%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIn%20my%20project%20the%20OSC%20is%20working%20with%20a%2024MHz%20crystal%2C%20therefore%20MCG_C2%5BEREFS%5D%3D%201%2C%20but%20the%20routine%20builded%20in%20MCUXpresso%2011.10.0%20%5Bbuild%203148%5D%20with%20SDK%20v.2.11.0%20m.v.3.9.0%20fall%20in%20infinite%20loop%20%2F*%20Wait%20for%20lock.%20*%2F%20even%20if%20crystal%20otion%20OSC%20selected%20(MCG_C2%5BEREFS%5D%3D%201)%3A%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CP%3E%3CSPAN%3E%2F*FUNCTION**********************************************************************%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%20Function%20Name%20%3A%20CLOCK_CONFIG_EnableUsbhs0PhyPllClock%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%20Description%20%3A%20This%20function%20enables%20the%20internal%20480MHz%20USB%20PHY%20PLL%20clock.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%20%3C%2FSPAN%3E%3CSPAN%3EParam%3C%2FSPAN%3E%20%3CSPAN%3Esrc%3C%2FSPAN%3E%3CSPAN%3E%20%3A%20USB%20HS%20PHY%20PLL%20clock%20source.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%20%3C%2FSPAN%3E%3CSPAN%3EParam%3C%2FSPAN%3E%20%3CSPAN%3Efreq%3C%2FSPAN%3E%3CSPAN%3E%20%3A%20The%20frequency%20specified%20by%20%3C%2FSPAN%3E%3CSPAN%3Esrc%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*END**************************************************************************%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Estatic%3C%2FSPAN%3E%20%3CSPAN%3Evoid%3C%2FSPAN%3E%20%3CSPAN%3ECLOCK_CONFIG_EnableUsbhs0PhyPllClock%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Euint32_t%3C%2FSPAN%3E%3CSPAN%3E%20freq)%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%5B..%5D%3C%2FP%3E%3CP%3E%3CSPAN%3EUSBPHY-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EPLL_SIC%3C%2FSPAN%3E%3CSPAN%3E%20%26amp%3B%3D%20~USBPHY_PLL_SIC_PLL_BYPASS_MASK%3B%20%3C%2FSPAN%3E%3CSPAN%3E%2F*%20Clear%20bypass%20bit%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EUSBPHY-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3ECTRL%3C%2FSPAN%3E%3CSPAN%3E%20%26amp%3B%3D%20~USBPHY_CTRL_CLKGATE_MASK%3B%20%3C%2FSPAN%3E%3CSPAN%3E%2F*%20Clear%20to%200U%20to%20run%20clocks%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F*%20Wait%20for%20lock.%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ewhile%3C%2FSPAN%3E%3CSPAN%3E%20(!(USBPHY-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EPLL_SIC%3C%2FSPAN%3E%3CSPAN%3E%20%26amp%3B%20USBPHY_PLL_SIC_PLL_LOCK_MASK))%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20workaround%20suggested%20in%200N65N%20Mask-Errata%20%23e9712%20not%20run..%20possible%3F%3C%2FP%3E%3CP%3ESuggestions%3F%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1966342%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20USBHS%20on%20K26%20about%200N65N%20Mask-Errata%20%23e9712%20%20(unlocking%20USBPHYPLL%20if%20MCG_C2%5BEREFS%5D%3D%200)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1966342%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E..and%20VBUS1%20withou%20supply!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1966330%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20USBHS%20on%20K26%20about%200N65N%20Mask-Errata%20%23e9712%20%20(unlocking%20USBPHYPLL%20if%20MCG_C2%5BEREFS%5D%3D%200)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1966330%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESolved!%3C%2FP%3E%3CP%3EBoth%20VREGIN0%2F1%20are%20without%20supply%2C%20this%20make%20difficult%20to%20USB%20PHY%20operate!%3C%2FP%3E%3C%2FLINGO-BODY%3E