Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 9 months ago.
KL25z programs not executing - no programing errors
I'm using some KL25z's on my own PCB and I seem to be unable to execute any programs. I'm not getting a SWD error or any communication errors when programing them. But when attempting to do a simple blink test nothing seems to happen. I have an LED connected to PTA3, and it clearly shows that programs are being sent over, but regardless if I try blinking it or do anything it just stays at a constant 2.5V.
2 Answers
9 years, 9 months ago.
You can try with an offline debugger to see if it stops at a certain instruction. In general the did you correctly connect a crystal of the right size, with the required loading capacitors?
Alternative is importing mbed-src and setting the clock to a mode which does not require an external crystal, such as: http://developer.mbed.org/users/mbed_official/code/mbed-src/file/01cb89f68337/targets/cmsis/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/system_MKL25Z4.c
I am currently using this 8Mhz Crystal with a loading capacitor of 10pF: http://www.mouser.com/Search/ProductDetail.aspx?R=ABM3B-8.000MHZ-10-1UTvirtualkey52750000virtualkey815-ABM3B-8.0-10-1UT I am using 10pF ceramic caps, but I placed the Crystal on the bottom of the PCB while the KL25z is on the top (The Traces are very short still) so perhaps the stray capacitance is far greater and I should have used a different loading capacitor.
I've been attempting to import the mbed-src but I seem to have trouble accessing the system_MKL25Z4.c file as the online compiler just tells me that the files folder has too many files to view. Anytips how to actually access the file and modifying it in my own program?
posted by 25 Mar 20159 years, 9 months ago.
Hi,
PTA3 seems to be used for SWO_DIO as default.
If you have choice, how about trying another gpio pin?
Or may be you need to explicitly change pin mux from
ALT7 (SWD_DIO) to ALT1 (PTA3) before accessing PTA3.
(This might have been done by mbed library, but I'm not sure for that.)
moto
Hi,
I'm sorry, I thought you were using PTA3 for GPIO, but you actually were using it for checking the SWD.
So my previous comment won't make sense.
FYI, I measured PTA3 of my FRDM-KL25Z, and my tester showed it around 3.1V.
moto
posted by 24 Mar 2015Motoo,
You were correct in your assumption, I actually was hoping to use PTA3 as a GPIO for very basic debuging via the blinking LED in addition to checking SWD. However I have another board which I just recently designed and that also appear to have the same problem, and I am using pin PTE24 for the LED on that board. I have never had this problem with my own custom PCB's before and given the fact that it is something that is occurring on both boards I suspect it must be a board issue. I have done two things that I've never done on previous boards: Connected the thermal pad to GND and placed the external ceramic resonator on bottom board when the KL25z is on the top (the traces are extremely short still). I'm still working to rule out these two possibilities.
K
posted by 25 Mar 2015
test
posted by Stephen Paulger 24 Mar 2015