Hello Xabier,
Check that the clock configuration (external oscillator, external crystal,..) of the board that SW was developed for (i.e. TWR-K60N512/TWR-K60D100) is the same you're using in your HW.
And other possible issue is that SW is developed for silicon v1.x (TWR-K60N512) and your silicon is v2.x (TWR-K60D100).
Regards
Luis
Thank you for the answer.
I only have problem on my custom card. On the K60 TWR kit there are a PK60N512VMD100 and the clock is 50.000P EC3953PBN.
On my board there are MK60DN512ZVLQ10 and the clock 50.000R EC3953 BN..
I don't understand that on my second card, the programmation works properly but on the first one, the programmation locks on this statement:
while (!(MCG_S & MCG_S_LOCK_MASK)){}; // Wait for LOCK bit to set
The version of the processor and the clock I use could creates that problem?
Why do I have different behavious on my two card?
Best regard.
Hello,
What code are you using, bare metal, MQX,..?
Regards,
Luis
I use a IAR IDE for microcontroler programming.
Is that the answer you need?
Xavier
No. I think you started from some Freescale code, MQX distribution, SC code example package,…
Your TWR uses a very early silicon PKxxx and you board production silicon v1.x.
One possible issue is the wrong CLOCK configuration in the code for the silicon you use, other possibility is a HW problem y the clock layout. Your code stops because the PLL/FLL is not locked. Have you verified that clock signal is in the MCU pin correctly?
Luis