Author Topic: Freescale Kinetis EA series MCUs & Dev Board TRK-KEA  (Read 4279 times)

0 Members and 1 Guest are viewing this topic.

Offline RussFTopic starter

  • Newbie
  • Posts: 6
Freescale Kinetis EA series MCUs & Dev Board TRK-KEA
« on: October 23, 2014, 04:52:52 pm »
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.

 
 

Offline Christe4nM

  • Supporter
  • ****
  • Posts: 252
  • Country: nl
Re: Freescale Kinetis EA series MCUs & Dev Board TRK-KEA
« Reply #1 on: October 23, 2014, 06:01:26 pm »
Hi

I 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 to this 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 is MCU on Eclipse as he works a lot with the Kinetis as well.

OK, I hope this helps. As always, YMMW  ;)
 

Offline RussFTopic starter

  • Newbie
  • Posts: 6
Re: Freescale Kinetis EA series MCUs & Dev Board TRK-KEA
« Reply #2 on: October 23, 2014, 10:16:17 pm »
Many thanks for that, very useful. I'll also add those references to my reading list.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Freescale Kinetis EA series MCUs & Dev Board TRK-KEA
« Reply #3 on: October 23, 2014, 10:48:59 pm »
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.
================================
https://dannyelectronics.wordpress.com/
 

Offline RussFTopic starter

  • Newbie
  • Posts: 6
Re: Freescale Kinetis EA series MCUs & Dev Board TRK-KEA
« Reply #4 on: October 24, 2014, 08:40:59 am »
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.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Freescale Kinetis EA series MCUs & Dev Board TRK-KEA
« Reply #5 on: October 24, 2014, 11:06:57 am »
Quote
how do I specify the target system

Does the ide manual specify that?
================================
https://dannyelectronics.wordpress.com/
 

Offline RussFTopic starter

  • Newbie
  • Posts: 6
Re: Freescale Kinetis EA series MCUs & Dev Board TRK-KEA
« Reply #6 on: November 01, 2014, 02:29:32 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf