Yah, I already knew that...
Just that I'm curious as to why PE only offers those two options for that particular field. I just want to make sure that deep down in the code there isn't a "disconnect" with how PE displays the settings and the actual generated code. At this point I'm going to assume that MCGPLL0 is truly using oscillator 1...
Will someone else be able to help? I really needed this running yesterday and it is currently stopping all progress on this project.
BTW, I found 2 posts that were similar to my problem. They are:
https://community.freescale.com/message/89074#89074
https://community.freescale.com/message/348157#348157
From the posts I figured out that Processor Expert doesn't modify MQX's USB device stack settings when changing the clock settings. So, like the people is the previous posts I started to modify some registers and found out that the default settings where going off of MCGPLL0 with a core clock of 120 MHz. Below is the code snippet where those clock settings can be found. So I decided to go back to using the following settings:
core = 120 MHz
bus = 60 MHz
external bus = 40 MHz
Flash = 20 MHz
I'm still having the same problem, unfortunately, although I'm sticking with these clock settings for now sense these have worked in the past for the k60 tower board.
init_gpio.c
-------------------------------------------------------
_mqx_int _bsp_usb_io_init
(
_mqx_uint dev_num
)
{
if (dev_num == 0) {
#if PE_LDD_VERSION
/* USB clock is configured using CPU component */
/* Check if peripheral is not used by Processor Expert USB_LDD component */
if (PE_PeripheralUsed((uint_32)USB0_BASE_PTR) == TRUE) {
/* IO Device used by PE Component*/
return IO_ERROR;
}
#endif
/* Configure USB to be clocked from PLL0 */
SIM_SOPT2_REG(SIM_BASE_PTR) &= ~(SIM_SOPT2_USBFSRC_MASK);
SIM_SOPT2_REG(SIM_BASE_PTR) |= SIM_SOPT2_USBFSRC(1);
/* Configure USB to be clocked from clock divider */
SIM_SOPT2_REG(SIM_BASE_PTR) |= SIM_SOPT2_USBF_CLKSEL_MASK;
/* Configure USB divider to be 120MHz * 2 / 5 = 48 MHz */
SIM_CLKDIV2_REG(SIM_BASE_PTR) &= ~(SIM_CLKDIV2_USBFSDIV_MASK | SIM_CLKDIV2_USBFSFRAC_MASK);
SIM_CLKDIV2_REG(SIM_BASE_PTR) |= SIM_CLKDIV2_USBFSDIV(4) | SIM_CLKDIV2_USBFSFRAC_MASK;
/* Enable USB-OTG IP clocking */
SIM_SCGC4_REG(SIM_BASE_PTR) |= SIM_SCGC4_USBFS_MASK;
/* USB D+ and USB D- are standalone not multiplexed one-purpose pins */
/* VREFIN for device is standalone not multiplexed one-purpose pin */