I have a custom board designed using NXP MKL25Z64xxx4. In the design, we have used ABM3B-8.000MHZ-B2-T for 8MHz crystal and 32.768KHz crystal is not used. We want to use KL25 board as USB CDC device (based on commands received via VCOM) and generate PWM of varying duty cycle to control a motor. I can program the board, but code gets stuck in clock initialization section. Previously we used to get this error, when crystal has some soldering issues. Looking into schematics, found that load capacitance used was 12pf. While searching, came across capacitor across crystal should be almost around 2xCL of crystal. The crystal used has a CL of 18pf. So changed the capacitors to 33pf (as this was the only value available right now). Still code was getting stuck in FLLPLL setting section. To check if VLPR mode will work, changed configuration to VLPR and tested simple hello world, this worked at a baud rate of 9600. In Normal RUN, it is getting stuck in clock initialization section.
In VLPR mode, next tried USB CDC example code available in KSDK code, but no luck.
It would be great if someone can verify the following doubts we have
- Is this alternative crystal ok?
- Lack of 32KHz crystal for RTC shouldn't affect FLL PLL setting, right? As we are not using RTC anywhere till now.
- Was changing CL a good move ?
- Even if core runs at VLPR, CDC enumeration as well as TPM generation should happen, right?
- Can the setup be made to run at Normal RUN? If yes, are we doing something wrong in configuration?
- For USB CDC enumeration, VREG is connected to VBUS line, but port as well as driver installation not happening?