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, 11 months ago.
Running mBed on Other KL25 Variants
Hey there, Got a few questions:
I've been able to get code up and running on the FRDM-KL25Z dev board, but I'm wondering if it's possible to:
1: Essentially turn the open-SDA section of that board into a (low-volume, non-factory) programmer by removing the current KL25Z on it and running wires to another board from the FRDM board. I'm not too familier with how exactly this board programs the flash on the actual MCU.
2: Program the flash on a different KL25Z variant, say the 64 LQFP version with smaller flash memory (assuming my code fits, which it does with plenty of extra space).
Thanks in advance!
2 Answers
9 years, 11 months ago.
You can very easily transfer your code using the existing FRDM board's SWD interface MCU, there is a socket provided on the board, you just need to isolate the KL25Z MCU so that does not interfere. This is okay for the same Target, see here:
https://developer.mbed.org/forum/electronics/topic/4368/
If you want to use a different Target even though it is the from the same family you need to reprogram the SWD interface firmware with the correct algorithm that will contain the device ID as Erik indicates. More details can be found here:
https://developer.mbed.org/handbook/cmsis-dap-interface-firmware
But you will need more than 32K so will need a licenced KEIL to do this. Otherwise try something like this:
https://www.segger.com/j-link-edu.html
Edit... I forgot to mention, as long as the Target is the same type (Flash and RAM), you can program the different MCU case styles, 64pin LQFP, 48 and 32 pin QFN.
9 years, 11 months ago.
1. Yes, it was designed with this in mind.
2. No, the firmware checks if the correct device ID is on the target, and will refuse to program others. It should be fairly simple to modify that firmware (it is open source also), but not something I ever looked into.