MKL25Z64xxx4 board bringup

cancel
Showing results for 
Search instead for 
Did you mean: 

MKL25Z64xxx4 board bringup

Jump to solution
1,173 Views
annamol
Contributor IV

Hii,

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

  1. Is this alternative crystal ok?
  2. Lack of 32KHz crystal for RTC shouldn't affect FLL PLL setting, right? As we are not using RTC anywhere till now.
  3. Was changing CL a good move ?
  4. Even if core runs at VLPR, CDC enumeration as well as TPM generation should happen, right?
  5. Can the setup be made to run at Normal RUN? If yes,  are we doing something wrong in configuration?
  6. For USB CDC enumeration, VREG is connected to VBUS line, but port as well as driver installation not happening?
0 Kudos
1 Solution
459 Views
mjbcswitzerland
Specialist V

Hi

Check how MCG_C2 is being set - either for the oscillator's low or high gain mode. If this doesn't match the circuit the crystal may not start.

Try a binary at the KL25 link below to see whether it work (it uses 8MHz crystal in low gain mode so you may have to remove crystal loading).

Note that USB won't work in VLPR since it needs at least 20Mhz core to be able to operate.

Regards

Mark


http://www.utasker.com/kinetis.html
http://www.utasker.com/kinetis/FRDM-KL25Z.html

View solution in original post

5 Replies
460 Views
mjbcswitzerland
Specialist V

Hi

Check how MCG_C2 is being set - either for the oscillator's low or high gain mode. If this doesn't match the circuit the crystal may not start.

Try a binary at the KL25 link below to see whether it work (it uses 8MHz crystal in low gain mode so you may have to remove crystal loading).

Note that USB won't work in VLPR since it needs at least 20Mhz core to be able to operate.

Regards

Mark


http://www.utasker.com/kinetis.html
http://www.utasker.com/kinetis/FRDM-KL25Z.html

459 Views
annamol
Contributor IV

Hii,

Thanks for the reply. I tried dumping two bin files via JFLASH uTaskerV1.4.8_BM_FRDM-KL25Z_8080.bin and uTaskerSerialBoot_FRDM-KL25Z_KBOOT_HID_UART_MSD.bin. But couldn't flash. I gave start address as 0 and have removed the load capacitors across crystal.

Is there any setting which needs to be changed?

0 Kudos
459 Views
mjbcswitzerland
Specialist V

Hi

The serial loader binary file can be programmed to start address 0. If you can't flash it you may have a problem with the HW since it is a normal binary file.

You can try with KDS instead if you use the open source project at the links I gave.

Regards

Mark

0 Kudos
459 Views
annamol
Contributor IV

Hi Mark,

After removing the two load capacitors across crystal, my code started working. It enumerates as USB, generates PWM as per our requirement. Any idea on why this will happen? If I re-solder the Cs same issue starts again.

Thanks for the help...

0 Kudos
459 Views
mjbcswitzerland
Specialist V

Hi

As noted previously the crystal will not always start if the MCG configuration doesn't match its HW circuit.

Regards

Mark

0 Kudos