Freescale Kinetis EA series MCUs & Dev Board TRK-KEA - Page 1
Forum section: electronics / general

author: RussF
author_rank: Newbie
timestamp: October 23, 2014, 04:52:52 pm
content: Hi - I'm moving away from hobby developing on the Microchip PIC platform to the Freescale EA platform and have been attempting to use the TRK-KEA64 dev board as i'm looking at developing some personal projects that are targeted at automotive use.The development environment is CodeWarrior and I believe OpenSDA based. These are completely alien environments for me an although I've read all that I can find it still isn't making much sense and I can't seem to manage to even compile\upload the demo\example projects that came with the board. Can anyone point me in the right direction for some literature or examples or other useful stuff that would perhaps be a little more helpful than the quick start guide I have that essentially says "load the demo projects" and that's it. Google in this instance is proving to be too useful for me.

author: Christe4nM
author_rank: Unknown
timestamp: October 23, 2014, 06:01:26 pm
content: HiI can understand the confusion. I started with Freescale Kinetis last April. Freescale's documentation is pretty OK, <but> it seems the documents and sample code they provide with their development board differ a lot form board to board. Some boards get all the supporting stuff as a download package, whereas other boards have (almost none).I took a look at the TRK-EA, and from what I see it is equiped with an OpenSDA type programming interface. I provided its user guide as attachment. Now you might wonder while reading where to find the different application they mention. Well, I can advise you to go tothis link, and download the FRDM-KE04Z QSP (Quick Start Package). Although a different board and Kinetis family member, the application could (should) be the same for the OpenSDA interface. If not, I'm afraid I don't know where to find them for your board.From my own experience with the Kinetis chips there is another thing to watch out for. I've found that for the same chip there are different register peripheral declarations with the same name, date and version. One refers to registers like SIM_SOPT, the other as SIM->SOPT. In other words, one provides a reference as a macro, while the other lets you use the register as a pointer to a struct. I haven't been able to find out a pattern, but so far CodeWarrior seems to pull in the processor specific file using the first type, while most examples use the second type. Also, CodeWarrior uses a "derivative.h" as common header which in turn pulls in the processor specific header. For my projects I deleted this, changed the includes and also changed the project settings so I don't get an error if I do so.As for the KE04Z I've found the example projects to pull in all kinds of common headers and source files. For my taste they are a bit too overcomplete with regards to overhead. Where as the bare peripherals drivers are the opposite to my taste. Don't get me wrong, processor expert, and the Freescale low level peripheral drivers work great, but they're just not the right thing for me. So I copy what I like but usually write my own drivers to taste. Which incidentally is a great way of getting to know the processor, although time consuming.Kinetis Design Studio looks very promissing as Kinitis specific IDE but had too much bugs for me to be usable right now. There still in beta or v1.0.0 or something. So I decided to keep CodeWarrior until KDS matures a bit. The free unlimited code size of KDS is a big plus as well as several other Kinetis specific tools.In my case I started with the TWR-MK20D72 which lacks everything as it comes to code and drivers. As I was still getting to known CodeWarrior I avoided processor expert. So I started with getting to know the clocking system, followed by the ports and gpio, and went from there. The examples provided for other Kinetis family members were a lot of help here.Another source I've found to be helpfull at times isMCU on Eclipseas he works a lot with the Kinetis as well.OK, I hope this helps. As always, YMMW

author: RussF
author_rank: Newbie
timestamp: October 23, 2014, 10:16:17 pm
content: Many thanks for that, very useful. I'll also add those references to my reading list.

author: dannyf
author_rank: Super Contributor
timestamp: October 23, 2014, 10:48:59 pm
content: I would suggest that you narrow your scope down a little and specify exactly where you need help.I would try to make a blinky to work in your set up and go from there.

author: RussF
author_rank: Newbie
timestamp: October 24, 2014, 08:40:59 am
content: I guess a specific question would be how do I specify the target system and how do I get the compiled app onto the MCU. I've read you need a .srec file but cant see one anywhere.

author: dannyf
author_rank: Super Contributor
timestamp: October 24, 2014, 11:06:57 am
content: QuoteDoes the ide manual specify that?

author: RussF
author_rank: Newbie
timestamp: November 01, 2014, 02:29:32 pm
content: Finally found some time to do some more research and have now managed to compile and run\debug a LED flashy app. Had to figure out how to load targets ( "Help/Install New Software") and understand the ability to specify files or Zip files or web targets to download from. Then had to get to grips with the Run and Debug Configs together with OpenSDA and PnE U-Multilink. My next challenge will be looking into ProcessorExpert along with understanding the specific controller libraries and headers. My goal is to read 2 ADC channels whilst controlling the duty cycle of 3 fixed frequency PWM outputs. Christe4nM, thanks for your help.