MCU on Eclipse


Home | Pages | Archives


Requests


This page is for you! If you’d like more information about something I’ve posted about, or if there is a topic you think I should post about, please leave a comment and I’ll get right to it (as fast as my schedule permits it)!

I have started to list things in my bucket list (still ongoing).

For feature requests or bug reports on the McuOnEclipse project end Processor Expert components, you should use the GitHub issue tracking system:

1,035 Responses to “Requests”

  1. I’d love a follow-up to “Dissection of MCU10 Projects” that addresses how to do version control of the MQX portion of a Freescale project. From their release notes it appears that you must create a custom configuration within the MQX directory structure for your custom board’s PSB and BSP. It is then a sequence of individual builds in a specific order to generate files that get used in the next sub-build. Then the libraries it creates get included in your project’s final build. So what parts of that go into VCS? Can the custom BSP and PSP be located in the same folder as the rest of your version-controlled source code, or must they co-mingle with the MQX “installed” files?

    Like

    By KBell on April 13, 2012 at 21:58

    1. Good suggestion! Hmm, I really need to work on such a post, as I have faced exactly that problem too.

      Like

      By Erich Styger on April 15, 2012 at 19:23

      1. Hi Erich,
        Thank for the Blog with answer a developer really wants.

        I am a Embedded design Engg. few month back started working with the MQX+K60+CW10.3 (wiil soon update to 10.4 after reading you r updated on it.) Erich i was searching for the solution to the Problem posted by “KBell on April 13, 2012 at 21:58 ” have you answered it. as i am not able to locate it. if not please clear some air on it.

        Like

        By swapnilkatre on June 5, 2013 at 13:26

        1. Hi Swapnilkatre,
          Storing MQX files in a version control system does not differ from another kind of project. But I did not use MQX for my projects as with FreeRTOS things are much easier for me, use less footprint and is much easier to learn. MQX was too heavy, and it seems our question confirms this?

          Like

          By Erich Styger on June 5, 2013 at 17:32

  2. Hi, I am newbie using freertos, I am working with codeworrior v6.3 (classic) and I just installed you processor expert freertos component,I wonder if you were so kind and show me how to use it by example, it maybe two flashing leds at different rates?
    I am using a coldfire v1 MCF51JM128 MCU on a DEMOJM board.

    Like

    By Miguel Angel Yepes Valencia on June 15, 2012 at 05:40

    1. Sure, good idea. But why not in eclipse/MCU10.2 instead. It is much easier and more powerful with the Eclipse version of CodeWarrior.

      Like

      By Erich Styger on June 15, 2012 at 12:25

    2. I have posted now a tutorial for FreeRTOS (https://mcuoneclipse.wordpress.com/2012/06/28/tutorial-freertos-on-demojm/). It is using the Eclipse based CodeWarrior, but applicable as well to the classic CodeWarrior version. If you are using classic CodeWarrior, then you need to enable the ‘classic’ property in the FreeRTOS Embedded Component. Everything else is the same.

      Like

      By Erich Styger on June 29, 2012 at 06:17

      1. Hi, Erich.
        Excellent tutorial, intuitive, graphical, clear, complete, step by step, etc..
        I followed it and I was able to reproduce the example in my demojm board.
        Now I know how to use the component in my applications, moreover some concepts on FreeRtos are more clear for me now.
        Thanks a lot, I say again: excellent tutorial.

        Like

        By Miguel Angel Yepes Valencia on July 19, 2012 at 20:05

        1. Thanks :-). I know for myself how useful this can be. Glad to hear that you were able to follow the steps and you came to a good result. I face sometimes the problem that things might be obvious for myself, but not for anyone else….

          Like

          By Erich Styger on July 19, 2012 at 20:10

  3. Hi Erich –
    Thank you for the two articles on PC-lint. Would it be OK if we linked to those articles from our gimpel.com website?

    Like

    By Anneliese on July 12, 2012 at 20:55

    1. Hi Anneliese,
      yes, sure, no problem at all.
      Erich

      Like

      By Erich Styger on July 13, 2012 at 05:27

  4. What about support for the ColdFire plus devices? They’re sort of a hybrid of the ColdFire V1 (same MCU core) and Kinetis (in that it uses LDD instead of the “classic” device drivers).

    Like

    By Renee on August 31, 2012 at 23:49

    1. Good suggestion! I have not tried the ColdFire plus devices yet, but this definitely something I need to add to my bucket list. At least I realize that I need to update my components which deal with LDD/traditional components.

      Like

      By Erich Styger on September 2, 2012 at 10:16

      1. P.S. Thanks for all the great work. In the past I’ve only ever used device initialization; your components seem to make Processor Expert actually useful.

        Like

        By Renee on September 12, 2012 at 02:49

        1. You are welcome. And yes, I agree, without the additional components it is just about initializing the peripherals (which is a lot of value already). But to get to the next level, more software drivers and components are needed.

          Like

          By Erich Styger on September 12, 2012 at 08:38

  5. I just found your site from your reply to my question on the forum, excellent site. I wished I had found it much earlier.

    My question is does freeRTOS work with a free USB stack and file system. We use MQX and cw10.3 but it has serious problems and does not integrate well with Processor Expert. We have a lot of code in PE and find it invaluable.

    But without the middleware USB & file system, we can’t switch. Or any alternatives you can think of would also be appreciated.

    Thanks

    Like

    By Robert Lewis on September 25, 2012 at 22:19

    1. Hello, as for the USB stack, I have transformed the FSL USB Stack into a Processor Expert component. I support USB CDC for now. That stack is not open source, but free of charge. I have posted articles around that stack on my blog too. As for the file system, I’m using FatFS for which I have created a Processor Expert component too. That in combination with FreeRTOS works very well for many of my projects, and as well for many projects at the university.

      Like

      By Erich Styger on September 25, 2012 at 22:23

  6. Erich, would you have an exjample project for the Kinetis, with PE using your PE USB component and the FatFS with or without your RTOS? This would help me see how much work it would be to switch our code over. I am very willing to switch; right now we have had a major problem with MQX and the K20 since Jun 23. The SR is still being worked on and our project is in danger of being cancelled.

    Like

    By Robert Lewis on September 26, 2012 at 05:21

    1. Yes, see https://mcuoneclipse.wordpress.com/2012/07/30/fatfs-with-kinetis/.
      This project is using FreeRTOS, but only because it makes it easier to have a shell running as a main process. If you do not want to use the RTOS, simply remove/disable the component and do not create a task. I used FatFS without an RTOS in another project too, and FatFS has hooks which can be used if you still need parallel access to files and file system.

      Like

      By Erich Styger on September 26, 2012 at 07:09

  7. I realize this is a separate comment but I am not familiar yet with how to ask a question here. Or perhaps that is the problem that this is a blog and not a forum… my appologizes please.

    We also need a way to work with the Flextimer to measure an incoming square wave and repoduce it with a small multiplier on another pin of the k20. Would you be able to direct us to anyway to do this? There is no driver in MQX for the Flextimer. I did see a post on your blog about PE not having fully implemented the Flextimer, but you gave a work around that I did not understand, would you mind expanding or pointing me to a link to read?

    I re-read your answer and it is almost too much to hope for… to be able to escape MQX and get a working USB and File system with and RTOS and be allowed to use PE!!

    Like

    By Robert Lewis on September 26, 2012 at 05:27

    1. I have not used the FlexTimer that way, and I won’t have much time to look into it with my current schedule. If not already done, I suggest to post that question in the Freescale forum?

      Like

      By Erich Styger on September 26, 2012 at 07:25

  8. I understand, Yes, I have have posted several times on the forum but there is a surprising lack of knowledge on the FLextimer and MQX. I am going to try to get out of the MQX system altogether. I think all the work you have done will make that possible on freeRTOS and Processor Expert. For now I will need to complete the current issue which is getting the Flextimer to work.

    Would you be able to send me the link to your comments on how to use the timer component? I have looked and read through the posts but cannot find the post… although now I am begining to wonder if I misread this. If so just a note to say I am wrong would be helpful so I don’t continue to look. Thanks again.

    Like

    By Robert Lewis on September 26, 2012 at 18:21

    1. I was wondering about your comment on the FlexTimer and that I said something about this. The only thing I can remember posting on this 🙂 is the article in https://mcuoneclipse.wordpress.com/2012/08/13/tutorial-timer-led-with-processor-expert-for-kinetis/

      Like

      By Erich Styger on September 26, 2012 at 18:31

  9. Yes, that was it. The FlexTimer is not implemented completely in the LDD in PE in cw10, so I think I must have misremembered the post. It is a shame because this was better implemented under the legacy CW 6.3 system although without the LDD model; a headache but necessary for MQX. I guess they haven’t gotten around to it as yet.
    Thank you.
    Robert

    Like

    By Robert Lewis on September 26, 2012 at 18:37

    1. You might have a look at the new MCU10.3: Timer handling has been simplified for LDD, but I had not much time to play with it.

      Like

      By Erich Styger on September 26, 2012 at 19:56

  10. hey Erich,

    My name is Vitor, i’m 17 years old (since 16 working with codewarrior and freescale). I was born and live in brazil so i do not have too much websites to bring me the solution of my problens with codewarrior, so i wanna say tank’s by this awesome blog and keep with your good work.

    Vitor

    Like

    By Vitor Caleffi on September 29, 2012 at 22:40

    1. Hi Vitor, many thanks :-). Good to see that it is useful for you. And this was exactly the reason for this blog: my students and co-workers have asked questions around CodeWarrior and Eclipse, and after I had answered that for example by email, the same kind of question came again later from someone else. So I thought it might be a good idea to publish ideas and tips and tricks, so everyone can benefit.

      Like

      By Erich Styger on September 30, 2012 at 09:50

      1. Erich, i was thinking…
        How coud i help with this blog? i have alot of experiences that i wanna share whith other people… these days i was working whith DWIN Displays and a freescale mcu … if you want i can do some posts.. or idk.. something to help you 😉

        Like

        By Vitor Caleffi on October 2, 2012 at 02:44

        1. Hi Vitor, this sounds very interesting and like a lot of fun. 🙂

          Like

          By Erich Styger on October 2, 2012 at 08:54

  11. Erich, I think Device Initialization is a PE subset without the methods? So I was hoping that I could ask you a question for the FlexTimer FTM0, I have picked PTC1 FTM0_CH0 as an input capture, which is pin 71 on the k20dx256VLL10 100QFN package, and here is the issue I routed PTC3 pin 73 which is supposed to be FTM0_CH2, as a toggled output compare. But DeviceInit says that I cannot use PTC3 and that the only pin available is PTA5. I can see in the K20_SUB_FAMILY data sheet on page 69 that ALT4 is FTM0_CH0 for PTC1 pin 71, and ALT4 is FMT0_CH2 for PTC3 pin 73. Would you know why I can’t use both of these pins? Is this a mistake in PE/Device Init? Or is there another reason that I can’t use the same timer FTM0 as both an input capture on channel 0 and an output capture on channel 2. The FlexTimer is supposed to be backwards compatible with the TPM module timer from the Coldfire series. I used TPM1CH2 as timer input capture and TPM1CH3 as an output compare on the MCF51JM128, without a problem… I was wondering if you encountered this problem, or is it just a misunderstanding on my side? I can’t see anything in the doc set that precludes this combination of using an output and an input on the same timer for the Kinetis K20…. Thank you for any advice you might have

    Robert

    Like

    By Robert Lewis on October 3, 2012 at 08:59

    1. Hi Robert, yes, Device Init is just the initialization, but no drivers. I do not have your device so I cannot check for sure. But I have learned that that the pins available heavily depend on the package and the actual part number. I think your question might be better asked in the Freescale Processor Expert forum? It could be an issue in Processor Expert, or it could be an issue in the documentation, or it could be an issue in the device too.

      Like

      By Erich Styger on October 3, 2012 at 18:20

  12. Hi Eric,
    The FSL_USB_Stack is a very nice component. Is there any chance that it will support the K20DX256ZVLK10_100 in the near future?

    George

    Like

    By George Cagle on October 11, 2012 at 22:47

    1. Hi George, thanks :-). I’m working right now on integrating the USB HID support, along with a USB MSD bootloader project. But I definitely need to get the K20 on the list of supported devices. I have it added to my list.

      Like

      By Erich Styger on October 11, 2012 at 23:07

    2. Hi George,
      just to follow up: there is now USB CDC device, USB HID Keyboard device and USB MSD Host available on the K20 (see https://mcuoneclipse.com/2013/07/10/usb-msd-host-for-the-frdm-k20d50m-board/)

      Like

      By Erich Styger on July 10, 2013 at 21:37

      1. Hi Eric,

        Thanks for your assistance in getting the host component to work. I rebuilt a project with a K20 derivative and it works great.

        Thanks,

        George

        Like

        By GEORGE CAGLE on July 12, 2013 at 16:23

        1. Hi George,
          thanks for letting me know. Good to hear that things can progress on your side. What I still want to do is to add HID mouse and HID host support 🙂
          Erich

          Like

          By Erich Styger on July 12, 2013 at 16:24

  13. Hi Erich

    I found the answer to my problem above about the K20 FlexTimer unable to toggle the output pin on a compare. The reason that the output would not toggle on the Timer even though it was set as a toggle pin was that the property Software control (FTMx_SWOCTRL) had been enabled. I did not understood the implication of this property. Apparently if it is on, even though the toggle is on and the output control is enabled, the control by the FTM is overridden and it will not toggle on compare. I think this is an oversight in Device Initialization, because these properties should be linked together to qualify/disqualify each other when one or the other is used. The doc set says that the Timer always has priority in hardware if the toggle is on. But it seems that is true only if this new FlexTimer field is not set, (FTMx_SWOCTRL).

    Anyway, just a heads up on this, it took a lot of time to sort out.

    Like

    By Robert Lewis on October 12, 2012 at 02:56

  14. Thanks for your blog – it’s the most useful thing for the Freedom boards / KL25Z processors out there.

    Can I request you do a posting of how to get printf() working over the UART on the Freedom board *without* using processorexpert? Just straight and simple C code.

    Thanks!

    Like

    By Frank Van Hooft on October 14, 2012 at 02:02

    1. Hi Frank,
      Thanks for the flowers :-).
      About your request: I can work on that. But it raises a few questions:
      – Did you know that you can use my projects as well *without* Processor Expert? Simply use the generated code. Maybe I should post something about this too.
      – printf() (with using all the formatting like %d,etc) is *not* straigt and simple. And in my view printf() should never be used in an embedded design. It is pure code bloat, plus an evil source of stack overflows. But I can work on a post on how to use it, but I think it would lead to a wrong path: because my mantra is “printf() is for the desktop world, not for embedded” 😉
      – What for sure I could (and should?) do is a post on how to use things like writing a string/number. Would that be ok?
      Thanks,
      Erich

      Like

      By Erich Styger on October 14, 2012 at 09:10

      1. Hi Frank,
        as a follow-up, there are two new posts:
        – how to use projects without Processor Expert: https://mcuoneclipse.wordpress.com/2012/10/14/removal-of-processor-expert-for-a-project/
        – how to use the UART: https://mcuoneclipse.wordpress.com/2012/10/14/tutorial-printf-and-hello-world-with-the-freedom-kl25z-board/
        Hope this helps,
        Erich

        Like

        By Erich Styger on October 14, 2012 at 18:40

      2. There is now a specific tutorial how to add/use printf(): https://mcuoneclipse.com/2013/02/07/tutorial-printf-with-and-without-processor-expert/

        Like

        By Erich Styger on February 10, 2013 at 14:30

  15. Hi Erich

    I have used your blog on how to use the Attach in the Debugger configurations, this is a critically important issue. I have a project that seems fail after a period of time and now I can see why using the attach link. I was handicapped before. Thank you.

    If you could do a blog on one further important tool, this would be extremely helpful, and that would be to be able to “Trace” and “Profile” the task execution. I know the TAD gives some static values at breakpoints, but I have seen trace and profiling tools mentioned in CW and never gotten them to work. Not in the Eclipse based or legacy CW systems. Perhaps this is just with MQX or special probes? But then even if this were true it would be very helpful to know if the could or could not be done and under what circumstances.

    Regards

    Robert

    Like

    By Robert Lewis on November 1, 2012 at 21:28

    1. Hi Robert,
      Have a look at https://mcuoneclipse.com/2012/03/23/tracing-with-freertostrace-from-percepio/.
      this is with an RTOS, and provides excellent insights into the execution of the system.

      Like

      By Erich Styger on November 1, 2012 at 21:36

  16. ahhh… it is now too painful not to switch to FreeRTOS and your components. It has to be done. I think you mentioned that you did not have the k20 ported, but do you have either the k60 or k40? I am fairly certain that the k20 would work with either port because it does under the bsp builds for MQX. Or can I just go ahead with switching to the k20 with PE and there is no problem. Or if there is a problem is there anyway around the problems?

    Regards

    Robert

    Like

    By Robert Lewis on November 1, 2012 at 22:06

    1. Hi Robert,
      I have not ported the USB stack to K20. But FreeRTOS runs on any of the Kinetis devices.

      Like

      By Erich Styger on November 1, 2012 at 22:11

      1. Yes, now I remember. That is the insurmountable problem; without the USB stack we are doomed. Well if you do port the stack to the k20/40/60 (they are the same core) you will find a lot of new users. There is a great deal of activity in the forums for these processors. There was a faint glimmer of hope… that has now receded into oblivion.

        Like

        By Robert Lewis on November 1, 2012 at 22:37

        1. Robert, the stack *is* ported for KL25Z, K40 and K60, see my posts on this. But I had no bandwidth to try in on a K20. It might run, but I was not able to verify this.

          Like

          By Erich Styger on November 2, 2012 at 05:54

  17. Then I will try it and I will bet it works. The core is the same. I think this will be actually fun to do, versus the torment it was to get our system to port to the k20 from the 51jm128. Thank you, I think I detect a faint light in the distance.

    Robert

    Like

    By Robert Lewis on November 2, 2012 at 11:35

  18. Hi Erich,
    i am new to the Kinetis family and also new to CodeWarrior with its ProcessorExpert. Your blog helps very much getting in to it.
    What i am currently trying to do sounds easy but i have my little problems with it…
    What i want is a CodeWarrior project with GCC, ProcessorExpert and MQX. I would need ethernet with DHCP and CAN. My idea was to use the ProcessorExperts LDD drivers with MQX 3.8. It seems that just this combination is not supported in CW10.2 or 10.3.
    Maybe you have some information for that. I think that this is a standard configuration that other users could also be interested in.

    Like

    By Ansgar on November 5, 2012 at 14:02

    1. Hi Ansgar,
      There is an MQX-Lite for Kinetis-L which is very well integrated with Processor Expert. I have not combined the ‘normal’ MQX with Processor Expert, although it should be possible with some tweaking. The MQX architecture is somewhat ‘teak it or leave it’, and makes it hard to integrate with other systems. Processor Expert on the other side has similar challenges. That’s why I use FreeRTOS as it is much better to integrate with any other systems, is open source and much better scalable especially for smaller microcontrollers.

      Like

      By Erich Styger on November 5, 2012 at 18:28

  19. Hello Erich,

    Right know I have a simple demo apllication running and I want to expand this application with TCP/IP functionality. The fact that FreeRTOS itself recommends the uIP Stack made me currious about it.

    Do you have experience with using FreeRTOS and uIP with using Codeworrior? Because the only demo i found is written for IAR (http://www.freertos.org/embeddedtcp.html).

    Like

    By Manuel on November 7, 2012 at 16:34

    1. Hi Manuel,
      good question! I have used in two project lwip (http://savannah.nongnu.org/projects/lwip/) with FreeRTOS, one with the MCF51CN128 and the other with the MCF52259 and CodeWarrior.

      Like

      By Erich Styger on November 7, 2012 at 16:39

      1. Hi Erich,
        thanks for the link. The fact that i am new to freeRTOS and CW doesn’t make it easier to start with a TCP Stack 😉 Could you give me a hint where and how to start.

        You can answer me by mail if it makes things easier for you.

        Like

        By Manuel on November 7, 2012 at 17:09

  20. Hi! I received my Freedom Board the other day, but I’m having some problems. Until now I was using the HCS08 and some Coldfire V1, but I’m new to the Kinetis MCU, and they are very different. I tried to use the DAC with help from processor expert but I don’t know exactly how to use this function:

    DA1_SetValue(LDD_TDeviceData *DeviceDataPtr, LDD_DAC_TData Data)

    I don’t know what I have to put in “LDD_TDeviceData *DeviceDataPtr”. I read the information in the Freescale info center but I still can’t understand this.

    Sorry if this is an stupid question :P, but I hope that you can make a tutorial or simply point me in the right direction.
    Thanks!

    Like

    By Juan on November 11, 2012 at 22:11

    1. Hi! I have touched the topic of DeviceDataPtr in a light way in https://mcuoneclipse.com/2012/07/26/there-is-a-time-and-date-for-both-worlds/.
      That pointer holds a ‘device handle’ and only makes sense in the context of an RTOS or if multiple code parts are accessing the driver. In many cases I simply pass NULL to it. That device handle is returned if you call the driver Init() routine, and is destroyed if you call the DeInit() routine.
      As for getting more information: right click on the component and select ‘help on component’: this gives usually example code how to use it.

      Like

      By Erich Styger on November 12, 2012 at 08:18

      1. Now it’s more clear to me. Thank you very much and congratulations on the amazing website!

        Like

        By Juan on November 12, 2012 at 16:08

  21. Hello, I’m playing around with my Freedom board since 2 weeks now. Was fun until I tried to divide a integer with another integer which results in a big crash. I’m not sure but the bug seems to be connected to the GNU GCC tool chain. Do you have any information about this issue.
    I’m using Code Warrior for MCU Version: 10.3.;
    PS. you tutorials keep me going. Many thanks

    Like

    By Dragos on November 12, 2012 at 22:36

    1. Hello, thanks :-), and no, I have not seen such an issue. Maybe you can send me that integer division source code/line so I can try it on my side? Use my email address on the bottom of the blog About page.

      Like

      By Erich Styger on November 12, 2012 at 22:41

    2. I’m sorry ,correction, a 32 bit (long int) with an int 😉

      Like

      By Dragos on November 12, 2012 at 22:46

      1. Are you sure you are not dividing by zero?
        quickly did this:
        unsigned long uL=10;
        int i=2, res;
        res = uL7/2;
        and no issue for me.

        Like

        By Erich Styger on November 12, 2012 at 23:13

  22. I got it working now, found a variable out of range, but even after that correction It did not behave properly. Powering off the board and restarting the environment did help after several tries. I got a screen shot with “No source available for “_aeabi_idiv (0x000004AC)()””. I’ll send it to you in the morning too tired now :). Thanks for the promptness.

    Like

    By Dragos on November 12, 2012 at 23:40

  23. Hi! Sorry to bother you one more time :P! I have a Nokia 5110 LCD display and I was trying to use your processor expert component so I can use this LCD with an 9S08SH8. But I don’t understand exactly how I have to configure the pins. I have RES, SCD and D-C in the PDC8544 component, but also I need to configure the pins for the SPI module. If I choose the MOSI pin in the SPI, then I can’t select it for the D-C pin… or maybe I don’t have to do it this way…:P
    Thanks for all your help.

    Like

    By Juan on November 29, 2012 at 23:47

    1. I got it all wrong… I thought that D-C was the data input pin. Sorry!

      Like

      By Juan on November 29, 2012 at 23:50

      1. Yes, D-C is an output pin to tell the LCD if it is a command (C) or data (D).

        Like

        By Erich Styger on November 30, 2012 at 07:07

  24. Erich, this is a bit off topic but related to the USB circuit, I was wondering if you can give any advice on using the USB as a charger? We have lots of amperage and if we plug in an Android nexus s, it charges at 450ma, if we plug in an iPod it charges only at 9ma and doesn’t show a charging symbol. I was wondering if the USB DM and DP lines have to be set in any special configuration or if there was device signalling that needs to occur?

    Like

    By Robert Lewis on November 30, 2012 at 09:15

    1. Robert, yes, some lines require a special protocol on the D+/D- lines in order to activate the charging circuit. Some of the Apple devices for sure are like this to my knowledge.

      Like

      By Erich Styger on November 30, 2012 at 09:51

  25. Hello, Erich,

    Thank you for the effort put into the superb tutorials for the FRDM-KL25Z.

    Unfortunately I am not able to view mcuoneclipse.com from my mobile while on a data connection (I get ‘ Page not Found’ from the browser).

    I can view it fine while on WiFi.

    I am on Android 4.04, using Chrome.

    Do you know why this is so ?

    I am writing here as the subject was not related to any of the tutorials.

    Thank you,

    Like

    By Royce on December 4, 2012 at 09:40

    1. Hi Royce,
      not sure why this should be a problem. But I know that some firewalls (e.g. in China) might block sites. Is it the same problem if you use https://mcuoneclipse.wordpress.com/ instead?

      Like

      By Erich Styger on December 4, 2012 at 09:44

      1. Yes Erich, it is the same with https://mcuoneclipse.wordpress.com/ too.
        And I can access perfectly using Wifi. So no one’s blocking it here :-)!

        Guess I need to email the WordPress people about this.
        Perhaps you could do the same being a user.

        Thank You!.

        Like

        By Royce on December 4, 2012 at 20:04

        1. I guess this is more of an Android problem? I do not see that kind of issues with any of my devices (but none is Android, I admit).

          Like

          By Erich Styger on December 4, 2012 at 20:35

  26. I commend you for a great tutorial site! It has greatly helped me, a hobbyist, to become accustomed to my new FREEDOM board.My prior experience has been with a Zilog board. I am having a problem with PE and configuring a pin to trigger a read from the capture reg of a free-running timer. I count the overflows easily, but can’t find the appropriate config for reading the ticks in the capture reg. Do you have an example that would assist me?

    Like

    By Dale Thoe on December 5, 2012 at 22:20

    1. Hi Dale, I have added this subject to my bucket list.

      Like

      By Erich Styger on December 9, 2012 at 07:11

  27. Hi Erich,
    It would be great if you could do some tutorials in using the ADC (single & differential mode), and the DAC.
    Thank You !

    Like

    By Royce on December 8, 2012 at 21:57

    1. Hi Royce, yes, I have added this to the bucket list.

      Like

      By Erich Styger on December 9, 2012 at 07:01

      1. Thanks, Erich,
        A humble recommendation that you get all the hardware peripherals (of the FRDM board) tutorials done with first…
        This will help keep up the interest to see things work, and users can then play with the examples to develop their own complete apps,
        Then they can learn other abstract concepts (like Subversion, DOS shell project etc).
        After developing their own large apps, they will understand the need to learn these concepts.

        Like

        By Royce on December 9, 2012 at 07:34

        1. Hi Royce,
          yes, that’s why I have published tutorials for the LED, accelerometer and the touch interface, along with USB CDC and SCI.

          Like

          By Erich Styger on December 9, 2012 at 09:36

      2. I have one project for the ADC in single mode for 3 channels. If you are intersted, this is my mail (julioefajardo@gmail.com)

        Like

        By Julio Fajardo on January 19, 2013 at 19:11

  28. I didn’t mean to sound rude or ungrateful :-), just that I’m dying to see the rest of the peripherals working (on the FRDM board) … I find most of the available documentation very sparse, and your tutorials, as of today, are the best source to understand their usage.
    Again thanks for all the effort put in !

    Like

    By Royce on December 9, 2012 at 09:41

  29. Hi Erich,

    Could you please do a tutorial on ‘How to create your Own Processor Expert Embedded Components’ ? Thanks!

    Like

    By Royce on December 16, 2012 at 20:29

    1. Hi Royce,
      as a starter: there is a CDE user guide inside MCU10.3:
      MCU\Help\PDF\CDE_userguide.pdf
      Additionally: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PE_CDE&fpsp=1&tab=Documentation_Tab

      There is as well material about the FTF 2012 Hands-On Workshop available:
      Hands-on Workshop: Component Development Environment for Processor Expert Software
      (available on http://www.freescale.com/webapp/sps/site/overview.jsp?code=FTF_OLLTABLE)

      I hope this helps as a starter,
      Erich

      Like

      By Erich Styger on December 16, 2012 at 20:39

      1. Thank You this info ! It should be enough to get me started !

        Like

        By Royce on December 16, 2012 at 20:41

  30. Hi Erich

    I find that Eclipse CDT sometimes continues to show compiler errors in the ‘Problems’ window even after I have fixed them. This means that the most reliable way of checking for errors and warnings is to look at the console window. When the ‘fixed’ errors persist in the Problems window they can sometimes be fixed by building in all build configurations. But sometimes, even then, they still persist and the only way I know of removing them is to recreate the workspace. I just wondered if you have noticed this behaviour and have any tips?

    BR
    David

    Like

    By David on February 4, 2013 at 09:35

    1. Hi David, I noticed that too in older Eclipse versions, but not that much recently. The thing is that the Eclipse CDT error parser plugins are parsing the console output, an that parsing might not be correct, indeed. So you are right: looking at the console is something I do always too. To remove the errors, I simply select them and delete them in the Problems view. This always worked for me. With MCU10.3 it is even possible to select the whole ‘root’ of all errors, and delete it (in earlier versions I had to select all the errors). Maybe this helps?

      Like

      By Erich Styger on February 4, 2013 at 09:38

      1. Thanks Erich, I haven’t tried deleting the errors – I will try that. Thanks for your help.
        David

        Like

        By David on February 4, 2013 at 09:43

  31. Hi Erich,

    I have been studying your tutorials *religiously* for months. I can’t thank you enough for the work you put in for us.

    Unfortunately, at the moment I am struggling with reading analog values into my CW program. I think I have the component set correctly in PE. I have tried to make sense of the PE component help pages. They leave much to be desired.

    Can you point me to where I can find simple examples of how to use the ADC pins for the KL25Z?

    Once again,

    Thank you.

    Like

    By Hillbilly Injunear on February 9, 2013 at 20:23

    1. Thanks for the reminder on that ADC thing. I have posted now a tutorial: https://mcuoneclipse.com/2013/02/10/tutorial-adc-with-the-freedom-board/

      Like

      By Erich Styger on February 10, 2013 at 14:32

  32. Whooops. Nevermind Erich. I got it.

    Thanks anyway.

    Like

    By Hillbilly injunear on February 9, 2013 at 22:28

    1. Hi Hillbilly,

      Would you care to share the information on using the ADC pins (a link to the source of the info, perhaps) ?

      Thanks !

      Like

      By Royce on February 9, 2013 at 23:11

      1. I know my ADC tutorial was long overdue. But it is available now: https://mcuoneclipse.com/2013/02/10/tutorial-adc-with-the-freedom-board/

        Like

        By Erich Styger on February 10, 2013 at 14:28

  33. Hi Erich,

    Been busy … was not able to follow this blog for a while.
    Nice to see lots of new projects/tutorials !

    But I have a (repeat) request.
    Kindly post some tutorials on using the USB host facility on the FRDM board.
    One goes in for a powerful device like the KL25Z because of the extra features like USB capability. Apart from that, we can usually get by using a fast 8 bit processor like AVR or an Arduino board.

    So please post some tutorials on using the additional ‘non-8-bit’ features on this board.
    You have a post ‘Enabling USB host Mode …’ where you enumerated a Thumb-Drive.
    Kindly share your code as to how one may read/write a mass storage device.

    Thank You !

    Like

    By Royce on February 9, 2013 at 23:22

  34. thanks to your tutorials able to get a hang on freescale’s KL25z frdm boads. I came across this link : http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FREEMASTER&fpsp=1&tab=Design_Tools_Tab

    i wanted to know how to use this tool with my frdm KL25z boards can you help me with this? or atleast point me to some useful links . i did find a pre-compiled example, not able to establish communication with the board and the GUI. So wondering if i could get some heads up

    Like

    By Pradyumna on February 22, 2013 at 06:08

    1. Hi Pradyumna,
      I have not worked with FreeMaster (I only had looked at it a while back). I can add it to my bucket list, but I guess will not be able to look into it soon.

      Like

      By Erich Styger on February 23, 2013 at 11:51

  35. Hi Erich!

    I want to know if you are working on USB_MSD_Host and FATFS in PE.

    I need this to complete a project, and work with the USB_Stack just gave me headaches.

    Any guide or help?

    Like

    By Alex on February 22, 2013 at 09:49

    1. I forgot to say that I’m working with Codewarrior 10.3, the Freedom board and K20.

      Like

      By Alex on February 22, 2013 at 09:51

    2. Yes, I made some progress this week (updated software is on GitHub). I had to fix struct alignment in the USB stack code (for gcc). Basics were working in a ‘hacked together’ project, I still need to clean it up a little bit. For now you could use what is on GitHub probably. But I do not have a K20, I used it only with the KL25Z.

      Like

      By Erich Styger on February 24, 2013 at 20:22

      1. How nice! Glad to hear it, right now I check and see that I can go by. Thanks for the prompt response and the effort you put into this. I’ve been considering translating your posts into Spanish to help my school mates here in the Dominican Republic, clearly recognizing your authorship and sending them to your blog. I love the work you’ve been doing and I have your permission to proceed.

        🙂

        Like

        By Alex on February 25, 2013 at 01:17

        1. Hi Alex,
          Glad to see that things are useful. Would be great to see things translated to Spanish because at least from the WordPress statistics I see there is a great community in Latin Americas. 🙂

          Like

          By Erich Styger on February 25, 2013 at 07:37

  36. Hi Erich,

    Thank you for the wonderful Blog. I have a request. It’s really basic. It would be really great if you could post some tutorial for demonstrating Input capture and Output compare using Timer_LDD component.

    Like

    By Subramanian T R on February 23, 2013 at 12:11

    1. Hi Subramanian,
      I’m already using the input capture/timer for my Ultrasonic module (https://mcuoneclipse.com/2013/01/01/tutorial-ultrasonic-ranging-with-the-freedom-board/). Maybe this gives you a starting point?

      Like

      By Erich Styger on February 23, 2013 at 12:14

      1. Thank you very much Erich. The tutorial and the video was wonderful. I would like to request for is Touch sensing using TSI module. I tried blinking LED on touch. I wanted to measure capacitance of the sensor. It would be great if there was some tutorial along with how to use FreeMaster.

        Like

        By Subramanian T R on February 23, 2013 at 20:43

  37. Hi Erich,
    Thanks a lot thank you.. Any soon you come across anything regarding FreeMaster with FRDM-KL25z &TSI please post reference manuals giving me hard time

    Like

    By Pradyumna on February 23, 2013 at 15:56

  38. Erich,
    Within the past few years I have been working a company that implements control systems for factories, power plants, production sites, etc. One of the things that I often find myself wondering is if I could replicate some of the control/monitoring conditions that our high-end equipment does, but more scaled down (and probably less accurate). I thought it might be nice to see some examples/tutorials of different communications. For example, I am currently struggling to recreate the OneWire arduino library to use with my FRDM-KL25Z and a series of Dallas DS18B20 temperature sensors (http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf) along a OneWire bus.

    Thanks

    Like

    By Tim Ryan on February 24, 2013 at 05:40

    1. Hi Tim,
      yes, I’m aware of these OneWire devices, but never used it. I have it added to my Bucket list page, but first I would need to order one of these devices.

      Like

      By Erich Styger on February 24, 2013 at 09:17

      1. The one I mentioned is fairly cheap (~$4 US). Sparkfun, Adafruit, and Newark/Element 14 all carry the TO-92 package. I ordered 10 at one point, so I would be willing to part with a couple. These 1-wire bus components are really neat, considering the size and flexibility.

        Like

        By Tim Ryan on February 24, 2013 at 19:05

  39. Hi Erich

    Have you written an article about automatically inserting comments using the Eclipse CDT?

    I have in mind how to insert a comment block above a C function or C++ method definition, that would specify name, author, parameters etc. I know that I can define one using Eclipse’s Code Templates, but I can’t find out what keystroke to use to actually insert the comment block in my source file.

    BR
    David

    Like

    By David on February 25, 2013 at 15:03

    1. Hi David,
      have you considered using doxygen (https://mcuoneclipse.com/2012/06/25/5-best-eclipse-plugins-1-eclox-with-doxygen-graphviz-and-mscgen/)? Doxygen has the feature that it can automatically add a header to the function and to generate then documentation out of it.
      Best regards,
      Erich

      Like

      By Erich Styger on February 26, 2013 at 07:43

      1. Hi Erich
        Thanks. Actually I had already seen your post on Doxygen, but I am not sure that our team is ready to use it. I notice that the Eclox plugin inserts a function comment block with Doxygen fields if you type /** ENTER. I would like to get that to work with our own block, but can’t make it work currently.
        Best regards,
        David

        Like

        By David on February 26, 2013 at 10:43

        1. Hi David,
          ok, I see. Would it be acceptable if you write something like ‘myComment’ and then it would be expanded to your own block? Let me see if I could post a blog today on something like this.
          Erich

          Like

          By Erich Styger on March 3, 2013 at 10:45

  40. Hello, my name is Alexander.

    I’m teacher assistant in MCUs programming, in my course I have been working with S08/CFv1 MCUs, but with the Freedom Board arrive, I would like to introduce ARM Cortex M0+. My problem is that I was reading technical domumentation about this MCU and I’m very confused, because a lot of things change when you compare ARM with S08 or CFv1.

    Could you help me to find documentation and tutorials about Freedom Board and ARM cortex M0+ architecture, in my course I cover basics and some advances skills, then it would be great to find easy documentation acces to me.

    Nice blog, Thanks a lot for your help
    Alexander

    Like

    By Alexander on February 28, 2013 at 14:46

    1. Hi Alexander,
      I’m using now S08, ColdFire V1, V2 and the ARM Cortex-M0+ all together in my classes. It all depends if as an engineer/student you know the basics of a microcontroller (like the S08). I have found with this it is not that hard. Yes, the ARM Cortex has certain specialities (like how interrupts work, etc), but at the end: it is a microcontroller :-). I suggest to have a look at the arm.com web site which comes with good information as a starter. The other suggestion is that you could join the Freescale University program: They might have some classroom bookware introducing the ARM Cortex-M0+.

      Like

      By Erich Styger on February 28, 2013 at 17:45

  41. Hi Mr. Styger, thanks for your response.

    I’m MCU architecture and programming teacher for undergraduate engineers. As you, I use S08 and CFv1 in my course, but I’d really like to introduce ARM cores (and specially if it come from Fresscale).

    Thanks a lot for all the information that you put on this web, It’s very useful for whole community.

    Like

    By Alexander on March 6, 2013 at 21:56

  42. Hi Erich,
    I am unable to use the RTC in the FRDM board. Is there any clock or oscillator thing to be taken care of? Can you post any tutorial or give an explanation regarding what is to be done for using RTC in general providing details like oscillators or crystal requirements.

    Thank you

    Like

    By Subramanian T R on March 11, 2013 at 11:09

    1. Hi Subramanian,
      I think this discussion helps:
      (link not valid any more)

      Like

      By Erich Styger on March 11, 2013 at 11:12

      1. I went through it.Could you give me a rough idea about how I could use an 8MHz crystal on the XTAL-EXTAL and derive 32KHz clock?
        KL05 is the processor of interest in which clock distribution Fig5-1 a multiplexer to switch clock source of RTC.

        From the freescale link, what I understood was that they are expecting an extra 32k oscillator to be given to RTC_CLKIN. Would this result in adding extra IC , using 2 oscillators? If yes, Could this be avoided?

        I require all this to happen without CPU intervention because I am planning to use RTC in VLLSx mode. Please mention if there is any constraint.

        Like

        By Subramanian T R on March 12, 2013 at 07:09

        1. My rough idea is to use that extra 32 kHz crystal.

          Like

          By Erich Styger on March 12, 2013 at 12:56

  43. Erich, thanks for your great help getting the CMSIS DSP library working with CW-MCU 10.3. Now that I’m using DSP functions it would be very valuable to be able to visualize the data. Currently I printf my arrays to the Console window and then Copy-Paste to Excel. That takes a really long time…

    Is there an existing tool for Eclipse that helps to visualize data? Perhaps something that would create a screen plot of data values in a specified array?

    Like

    By Greg Lapin on March 13, 2013 at 23:04

    1. Hi Greg,
      In case this is of interest: I’m using an LCD (over I2C) to plot my graphs. You can see how this looks in https://mcuoneclipse.com/2013/01/21/lie-to-me-or-building-a-polygraph/.
      The othe way which comes ot my mind is FreeMaster.

      Like

      By Erich Styger on March 14, 2013 at 14:25

  44. Hi Eric,
    Great Blog. i have a question for you.
    Have you tried porting FreeRTOS 7.4.0 in MCF52259 demo kit? I tried the demo project available with FreeRTOS for this microcontroller without success. I am using codewarrior version 7.2.
    Thanks
    Jayaram

    Like

    By Jayaram on March 18, 2013 at 02:02

    1. I’m using FreeRTOS 7.2.0 for now (no time to port to 7.4.0 right now). But this should not matter. But it works perfectly with the MCF52259 demo and tower kit, but I’m using CodeWarrior 10.x (Eclipse). The 7.2 version you are using is very old, and the compiler not recommended. I remember that this version even has a different stack calling convention, so many examples might not work. Is there a chance that you could use the Eclipse version?

      Like

      By Erich Styger on March 18, 2013 at 05:53

      1. Hi,
        I have installed the Codewarrior 10.3 version and tried the demo project given in FreeRTOS for coldfire mcf52259. I am using MCF52259demo kit.But while debugging, I am getting “Cold PE Protocol Adapter: No USB connection found”

        Thank you very much for the reply.
        Jayaram

        Like

        By Jayaram on March 18, 2013 at 19:18

        1. Hello,
          it could be that the OSBDM on your board is a very old one? Have you upgraded it with the latest P&E software available on http://www.pemicro.com/osbbdm?

          Like

          By Erich Styger on March 19, 2013 at 05:55

  45. hello Erich,
    nice tutorials up here … bought a KL25z freedom dvelopment board. i’m finding difficulty in working with RTC in that board was wondering if you help me with a walk though to use RTC

    Like

    By pradyumna on March 19, 2013 at 06:50

    1. Hello,
      there is a thread going on this in the Freescale Forum:
      freescale community thread/301330

      Like

      By Erich Styger on March 19, 2013 at 12:36

      1. hello ,
        yes i did come across this thread but i dont know where i’m going wrong

        thankyou

        Like

        By Pradyumna on March 19, 2013 at 12:39

        1. you will need either a 32 kHz additional external crystal, or to use the solution explained by Graeme Bragg in his response in freescale community thread/301330

          Like

          By Erich Styger on March 19, 2013 at 12:44

      2. yup ‘ll try thank you

        Like

        By Pradyumna on March 19, 2013 at 12:47

  46. Hey Eric,
    your tutorials are great. Give me a tip please..
    I need to build a interface between the FRDM-KL25Z and LabVIEW. I’d like to acquire data using the ADC and send this data through USB. So, what tutorials would you recommend that I can follow in order to be able to do that?

    Thanks
    Jean

    Like

    By Jean on March 22, 2013 at 18:54

    1. Hi Jean,
      thanks :-).
      I recommend that you use normal SCI to the OpenSDA which then translates it to USB.
      I wrote a while back a tutorial how to print things with Processor Expert (https://mcuoneclipse.com/2012/10/14/tutorial-printf-and-hello-world-with-the-freedom-kl25z-board/) using Serial_LDD. With the release of MCU10.3, things are now even easier: you simply can add the AsynchroSerial component to the project, specify the UART/Pins with the baud, and your are ready to go. I use that approach with my Shell component (see https://mcuoneclipse.com/2013/03/20/freedom-robot-solves-the-maze/).
      For ADC I have a dedicated tutorial here: https://mcuoneclipse.com/2013/02/10/tutorial-adc-with-the-freedom-board/

      Like

      By Erich Styger on March 22, 2013 at 19:45

  47. Hi Eric,
    Excellent Blog. I am using codewarrior 10.3 and I want to port FreeRTOS on the coldfire mcf52259 board. There is no demo project for eclipse based version of CodeWarrior on FreeRTOS source files provided. I tried CW7.2 and the demo project – ”RTOSDEMO” given in the file. But I am getting error in that – “ColdFire Protocol PE : No USB connection found”.I have updated the latest PE OSBDM driver from the link which you gave .
    Can you please guide me on porting the freertos on coldfire board. I want to do simple tasks with it.
    Thank you
    Jayaram

    Like

    By Jayaram on March 24, 2013 at 19:14

    1. Hi Jayaram,
      thanks :-).
      The demo at https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/TWR-52259/MCF52259_FatFS is using FreeRTOS.
      Maybe I should load there a demo just with the RTOS?
      CW7.2 is clearly very old, and that compiler has several issues, plus the problem that it using a different call stack.
      As for porting: no need to port it, as I already did this.
      See for example https://mcuoneclipse.com/2012/03/18/tracing-freertos-with-a-hardware-probe/

      Like

      By Erich Styger on March 24, 2013 at 19:34

    2. Hi Jayaram,
      FYI, I have committed a simple FreeRTOS application for the TWR-MCF52259 on https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/TWR-52259/MCF52259_FreeRTOS
      Have fun 🙂
      Erich

      Like

      By Erich Styger on March 24, 2013 at 20:00

      1. Hi Eric,
        I downloaded the folder from your link. Imported the project and tried building it. It shows 84 errors. Main error was “invalid project path” and ”syntax errors”. The project name was “MCF52259_FreeRTOS : FLASH”. Should I need to do some changes in the settings. I am using codewarrior10.3.
        Thank you
        Jayaram

        Like

        By Jayaram on March 25, 2013 at 19:16

        1. Hi Jayaram, have you generated code with Processor Expert? The amount of errors looks to me that you have not done this? Do you have a ‘Generated_Code’ in your project?

          Like

          By Erich Styger on March 25, 2013 at 20:17

  48. Hi Eric,
    I don’t have a “Generated_Code”.. I opened the project and gave build all. Can you please tell me what I have to do to generate code using Processor expert? I haven’t used Processor Expert before?
    Thank you very much for your reply.
    With regards
    Jayaram

    Like

    By Jayaram on March 25, 2013 at 20:55

    1. Hi Jayaram,
      ah, ok, that explains it. Right click on the .pe file and select ‘generate code’. I recommend that you have a look at the tutorial here: https://mcuoneclipse.com/2012/09/07/tutorial-enlighting-the-freedom-kl25z-board/ which has as well a section ‘Generate Code’.

      Good luck!

      Like

      By Erich Styger on March 25, 2013 at 20:58

      1. Hi Eric,
        I tried generating the code from Processor Expert. I got this error. “The Component FreeRTOS is not supported in this version of Processor Expert”. I am using Codewarrior10.3. Should I import some package for this code?
        Thank you very much
        Jayaram

        Like

        By Jayaram on March 25, 2013 at 21:44

        1. Hi Jayaram,
          yes, you need the FreeRTOS (and LED) components imported from GitHub. See
          https://github.com/ErichStyger/mcuoneclipse/wiki/Getting-Started

          Like

          By Erich Styger on March 26, 2013 at 08:14

  49. Hi Erich i need a help with a 4×4 keypad scan code, i don´t know how to start and what component i need. I´m programing with KL25Z microcontroller is there any example project?

    Thanks for your time.

    Like

    By Xabi on March 26, 2013 at 11:23

    1. Hi Xabi,
      no, I do not have such an example project.

      Erich

      Like

      By Erich Styger on March 26, 2013 at 12:57

  50. HI Eric,
    I tried your FreeRTOS processor Expert code. I am able to generate code only after removing the LED already there with a new set of LEDs as you have given in https://mcuoneclipse.com/2012/06/28/tutorial-freertos-on-demojm/.
    I am now able to generate code. When I build it is fine. When i run, it is showing error
    “Old OSJTAG/OSBDM firmware detected. The embedded firmware needs to be in bootloader mde to update. Please unplug the USB cable, insert a jumper on the 2 pin bootloader header(connecting JM60IRQ to ground) and reconnect the USB cable”.
    I have updated the from P&E link that you had given earlier. Which jumper are they referring to?

    Thanks very much for your help
    Jayaram

    Like

    By Jayaram on March 27, 2013 at 03:25

    1. Hi Jayaram,
      That’s the standard update procedure with OSBDM/OSJTAG.
      I think you are using the DEMO52259 board? Check the schematics of your board. There is the jumper J5 connected to the IRQ pin of the JM60. You need to close that jumper while power-up the board, then the board will be in bootloader mode. I believe this jumper might not be factory populated, so you might consider to solder a jumper header on it. But it works as well with a metal paper clip: you only need to pull IRQ low while the JM60 power-ups, so you can hold a paper-clip on the jumper footprint at startup and you can remove it right afterwards.
      I hope that your OSBDM on the DEMO52259 is not very old. Because then you might need the P&E updater utility to update it.

      Erich

      Like

      By Erich Styger on March 27, 2013 at 07:55

      1. Hi Eric,
        Thank you very much for your help. I updated the firmware as you suggested. Now I have downloaded the program and all the LEDs are in ON condition. Is there a tutorial in this website where you have given how you went about creating the project and creating those processor expert packages(*.PEupd files). Also which code I have to change to play with these LEDs?
        Thank you very much for your patient help .
        Jayaram

        Like

        By Jayaram on March 27, 2013 at 23:51

        1. Hi Jayaram,
          Such a tutorial is something I have in my mind, but first I need to find the time to write it. But there is already a lot of material available from Freescale, see https://github.com/ErichStyger/mcuoneclipse/wiki. And as for the LED code: maybe simply google for ‘mcuoneclipse LED’ and then you will find the relevant articeles.

          Like

          By Erich Styger on March 28, 2013 at 05:39

  51. Hi Eric,
    Thank you very much for your help. I have a doubt. In the code “Application.c” in FreeRTOS demo for mcf52259, code is LED1_neg which has to toggle the LED. But after running the code in mcf52259, the LEDs are continuously in ON condition. Is it wrong? Am I making some mistake?.
    Thank you again.
    Jayaram

    Like

    By Jayaram on March 28, 2013 at 05:59

    1. That sounds like your RTOS is not running the tasks. I tried it on my end with my board, and it is working. So I guess you need to debug your application to find out what is going on.

      Like

      By Erich Styger on March 28, 2013 at 12:30

      1. Hi Eric,
        As you were saying, I think RTOS is not running the tasks. The LEDs are just getting ON due to some error. The code is generated, It is getting built and when I give run, the reset LED blinks twice (red colour LED). Is it glowing because of some error or will it blink while downloading the program?
        When I tried changing the “application.c” code that you have written, output does not change. It remains the same. Can you please what exactly you mean by “debug the application”?
        Thank you very much
        Jayaram

        Like

        By Jayaram on March 29, 2013 at 04:00

        1. ‘debug the application’ means to use the debugger to download the code, and step through it.

          Like

          By Erich Styger on March 29, 2013 at 08:30

  52. Hi Erich,

    This is a very good blog. I have tried using KL25 FRDM board. Now that I have bought KL05 board, I have a request to you. Since there is a 32k crystal available on the board, it would be great if you could demonstrate internal RTC and wake up functionality along with the clock settings for VLLS modes. It just could be as simple as lighting an LED after waking up.

    Like

    By vivek john on March 29, 2013 at 08:23

    1. Thanks :-). That’s a good topic, and I have added it to my growing bucket list (https://mcuoneclipse.com/the-bucket-list/).

      Like

      By Erich Styger on March 29, 2013 at 08:44

      1. This is a very good topic. I think it can be of great use in monitoring applications. I request Erich to update the blog with a tutorial on this topic as soon as possible. I can’t wait to try this out in KL05 Board. 🙂

        Like

        By Subramanian T R on April 8, 2013 at 09:04

  53. Hi,

    Only just found this website and i would just like to say thanks for all the great tips and tutorials, fully credit for an excellent collection of very useful and time saving articles.

    If you have time could you please look a some Bootloaders for the Kinetis parts, there is an application note AN2295 but it does not support CW 10.3, and the application note is not very well written (or at least not as clear as your articles – the linker files, memory and vector table re-arranging need much more explaining – ).

    another alternative to a bootloader is using the second flash block in the parts that contain FlexNVM, re-programming and swapping blocks again there is an application note but it is for IAR and again would be better explained in one of your articles.

    Many thanks for the excellent resource you have created, you have saved me hours 🙂

    Like

    By Brian on April 17, 2013 at 23:52

    1. Hi Brian,
      thanks for the positive feedback :-).
      As for bootloader and Kinetis: I nearly have completed writing my own (very simple) bootloader. It is using a serial communication channel, and works right now with a shell connection and S19 files on Kinetis, plus on ColdFire with USB MSD. Nothing super fancy, but works pretty well. I planned to write an article/tutorial about it, probably this week end.

      Like

      By Erich Styger on April 18, 2013 at 05:39

      1. Hi,

        That would be great, it seems that most of the bootloaders around skip over important information (e.g. The memory map and why things need moving around, how and why the linker files need changing for the bootloader and the application space and how the bootloader is programmed to the board). From a PIC / AVR… background a bootloader is simple but the Kinetis / ColdFire look a little more complex / involved.

        It would be good if somebody (:)) could write a simple article regarding the bootloader and memory map over something simple like a USART (thus removing more complex topics like USB…). as a bootloader is very important and most projects require them.

        I have written a library for C# and C++ that can decode S19 and intel hex files into a byte array ready for sending (i will happily send you this if it is of any help).

        NOTE:Have a look at AN4533 this an alternative option over a bootloader and would also make for a good article, as it is kind of unique to micros with two flash blocks

        Thanks,
        Brian

        Like

        By Brian on April 18, 2013 at 14:33

  54. Hi,

    I would also be very interested a bootloader article, particularly the flash block memory swap application note.

    Thanks,
    Andy

    Like

    By Andrew on April 19, 2013 at 20:15

    1. Hi Andrew,
      yes, I agree that this would be an interesting topic. But I fear that the topic of a basic bootloader is work enough for me.

      Like

      By Erich Styger on April 19, 2013 at 21:56

  55. I just launched this project for electronics tinkerers. I think you might find it interesting to write about: http://www.kickstarter.com/projects/966383008/coaction-hero-32-bit-open-source-arm-cortex-m3-boa.

    Please let me know if you want any more info or have any questions.

    Thanks,
    Tyler

    Like

    By Tyler Gilbert on April 24, 2013 at 06:33

    1. Hi Tyler,
      yes, this is an interesting project. I only think that it should use an ARM Cortex M4 instead of only an M3? I mean if this would be a M4 board, that would be definitely something I would order right away. Has this been considered? Or what was the reason to use an M3?

      Like

      By Erich Styger on April 24, 2013 at 08:07

  56. I would like to know how to use SetFieldValue and GetFieldValue functions using KL25Z microcontroller. If it is possible, I would like an example code. Thanks.

    Like

    By Nekane on April 24, 2013 at 08:29

    1. Hello,
      I’m wondering why you want/need these functions? Why not simply using BitIO component?
      As for the LDD component: see https://mcuoneclipse.com/2012/11/12/tutorial-bits-and-pins-with-kinetis/

      Like

      By Erich Styger on April 24, 2013 at 08:42

  57. Hi Erich,

    We have developed a low cost wireless Arduino board that we think may be interesting to your readers. It is based on the ATMega128RFA1 and uses Atmel’s wireless mesh stack. It also has a built in V-USB port for the bootoader and serial terminal and is fully compatible with Arduino. Some other unique features we’ve added is built-in range testing and wireless programming. There is a new video up showing two wireless boards working together and accepting commands from a WiFi shield.

    Right now we have a page up on Indiegogo to try and generate interest http://www.indiegogo.com/projects/miniswarm-scalable-wireless-arduino-radio-module

    Press release: http://www.sbwire.com/press-releases/gregor-simeonov-and-jonathan-scobble-launch-indiegogo-campaign-to-generate-20000-for-their-scalable-wireless-arduino-radio-module-miniswarm-235437.htm
    We’d be more than happy to provide some hi-res media for a blog post :-). Thank you!

    Like

    By Gregor Simeonov on April 28, 2013 at 04:25

    1. Hi Gregor,
      that’s indeed an interesting project! I have created a similar project based on a FSL MC13213 SoC which has similar characteristics as the ATMega128RFA1, but less FLASH and RAM. But what was constraining my project was the performance (40/20 MHz), and I see that the ATMega has 16 MHz. What I see are Kickstarter projects using ARM cores: that gives the performance kick, with plenty of RAM and FLASH, while still be low power. I’m looking into EngergyMicro (Gecko) and other ARM micontroller vendors, and feel that would be a better alternative? See that RFduino project: https://mcuoneclipse.com/2013/03/31/rfduino-wireless-cortex-arduino-to-the-size-of-a-finger-tip/

      Like

      By Erich Styger on April 28, 2013 at 08:28

  58. Hi Erich!

    What I would like to see are more projects based on MQX (or at least MQX lite) and Processor Expert. Freescale gives us such a nice OS with all the drivers and extensions (USB, SD Card, Shell, etc.) already built in. Unfortunately, they are not easy to use for new users and high-level Processor Expert support is not included or is insufficiently documented.

    FreeRTOS is certainly also a very nice OS but it heavily depends on third-party drivers and porting them is not always easy. I think that many Freescale users would be happy to see your good basic tutorials also cover MQX and maybe your excellent projects and tutorials ported to MQX (well, this is probably not an easy task).

    Thanks a lot for this wonderful site!
    Anguel

    Like

    By Anguel on May 5, 2013 at 09:13

    1. Hi Anguel,
      Thanks, and yes, MQX comes up from time to time. We are not using MQX at the university because as you say it is not easy to learn. More important, it does not support other processors (like the Freesale S08) we are using, and the performance and memory (FLASH and RAM) footprint is not near where we need it. More important: MQX is not open source, and we could use it only for Freescale Processors, while FreeRTOS is truely Open Source without chains attached. That’s why FreeRTOS is the #1 RTOS used according to the UBM Embedded Market Study. You are right that there are not that many high level Processor Expert components delivered by Freescale, but that’s not a problem of FreeRTOS, that’s a problem of Freescale. That’s why we have created the Processor Expert components available on GitHub.
      For sure, I’ll keep an eye on MQX lite, as we are using it in a pilot project. I think it is not about one RTOS only: it is about using the right one for your needs, with all the consequences. So MQX really might be the right choice for you. It is only (as you say) that writing such tutorials is a lot of effort, so I’m writing them for things I use and need for my classes, so I have a benefit, and hopefully many others reading it too. I’ll keep an eye on MQX 🙂
      Thanks for the suggestion!

      Like

      By Erich Styger on May 5, 2013 at 09:42

      1. Thank you Erich! I wish Freescale had a site like yours. That would certainly attract many developers and help them get started with the development jungle.

        Like

        By Anguel on May 6, 2013 at 11:35

  59. Hi Erich

    The main reason we have not pursued freeRTOS is the open source license. Can you explain please, do we have to make *all* the code of the entire project available to the community or is it possible to release just some of the code… for example that uses freeRTOS functions like the main line scheduling and so on?

    If it were possible to keep some measure of propriety away from the theft by Countries like China that do not respect IP rights in the same manner that the western countries do, we would use freeRTOS.

    Regards

    Robert

    Like

    By Robert Lewis on May 6, 2013 at 17:34

    1. Hi Robert,
      I suggest that you read the FreeRTOS license 🙂
      It is not that ‘Open Source’ means ‘you need to share your source code’ automatically. FreeRTOS is using a ‘modificed’ GPL license, sometimes named ‘LGPL’ (lesser GPL):

      “The FreeRTOS.org source code is licensed by the *modified* GNU General Public
      License (GPL), text provided below. A special exception to the GPL is
      included to allow you to distribute a combined work that includes FreeRTOS
      without being obliged to provide the source code for any proprietary
      components. See the licensing section of http://www.FreeRTOS.org for full
      details. ”

      What it means is that you do *not* need to share your source code. You only need to share the RTOS code if you modify it in a substantiel way. So your IP is protected, and you do not need to open it, even if you link and use FreeRTOS.
      Yes, there are other open source projects using GPL: there if you link with a GPL IP, you get ‘infected’ by that IP. This is not the case for FreeRTOS. I would not have used it otherwise too for my projects with customers 😉

      Like

      By Erich Styger on May 6, 2013 at 18:28

  60. Erich,
    What’s the relationship between the Freescale Baremetal USB Stack package that they release from their website (latest version 4.1.1) and what you have on your GIT site?
    Thanks, Greg

    Like

    By Greg Lapin on May 9, 2013 at 20:22

    1. Hi Greg,
      I need to compare it with 4.1.1, but it should be very close to it. What I did is taking the 4.0.x sources and have built a wrapper around it for Processor Expert, for my needs. When I started doing this, there were no such Processor Expert components as delivered in the stack (as in 4.1.1). I still believe my version is easier to use, but that’s of course my view. But from the functionality it is very close, and I see that Freescale has picked up many of my changes and fixes, and what I saw they aligned the 4.1.1. release to what I have provided as feedback.
      Does this help?

      Like

      By Erich Styger on May 9, 2013 at 20:31

  61. Hi Erich, recently bought a few Freedom KL25Z and I noticed variations compared to I already had, the diodes are different, the components are located differently and there are three new pin I do not know what they’re for. The revision of the board is the 2013 and I do not get the new schematic anywhere. You know anything about this?

    Like

    By carlosalexanderalvarez on May 11, 2013 at 04:41

    1. Hi Carlos,
      I just have received last week an additional board I have ordered and it was still RevD.
      I have not found the schematics neither. But it could be for that board issue I had reported in https://mcuoneclipse.com/2013/03/03/pololu-freedom-line-following-robot/: The FRDM board does not create 5V from VIN, so you need to put in an additional 3-pin regulator to create that 5V. And this is what I thin these 3 pins are for.

      Like

      By Erich Styger on May 11, 2013 at 08:29

    2. Hi Carlos, what do you have written on the SCH sticker on the backside of the board? I have REVD

      Like

      By Erich Styger on May 11, 2013 at 08:31

  62. Hi Erich,

    I am trying to use DMA with scatter gather functionality. If possible, please provide me any sample project using DMA with scatter gather functionality and processor expert.
    Thanks to you in advance.

    Regards,
    Jagadeesh.

    Like

    By jagadeesh on May 27, 2013 at 05:41

    1. Hi Jagadeesh,
      thanks for that suggestion. But I have not explored that area yet, so I do not have something ready for you.
      Erich

      Like

      By Erich Styger on May 27, 2013 at 09:27

  63. Hi Eric,

    I’ve found your blog very useful. Thanks much.
    If possible please provide a project example for the MKL25Z128FRDM Freedom board for post generation of the CRC and run time verification of the CRC. Storing the CRC via the linker may be helpful. It seems this should be standard in the manufacturing environment to ensure one is releasing the proper programming file. I have looked at your existing CRC project, but an example for the MKL25Z128FRDM would be more helpful to many.

    Like

    By John Sorensen on June 4, 2013 at 23:23

    1. Hi John,
      thanks, I definitely have this one added to my list.

      Best regards,
      Erich

      Like

      By Erich Styger on June 5, 2013 at 06:14

  64. Hi Erich

    Great blog! I am working with a TWR Kinetis KL25 Board and your blog has helped me resolve a lot of bugs. Since I am new to this platform I prefer to write the drivers without using Processor Expert, so that I can know exactly what happening at the register level . I am writing a driver for Accelerometer using I2C. I do most of coding looking at the reference manual, but unfortunately there isn’t any information for the Accelerometer interfacing. I did have a look at your tutorial for the same on the Freedom Board, but an example elaborating in more detail how the I2C driver and Accelerometer is implemented,would really help me understand the code much better.

    Thanks

    Like

    By Lead Coder on June 7, 2013 at 07:32

    1. Hi Lead Coder,
      thanks for that feedback, appreciated. Have you seen my tutorial creating a driver for the MMA5451Q?

      Tutorial: Creating a Processor Expert Component for an Accelerometer

      Extended Driver for the MMA8451Q Accelerometer


      This should give you some ideas.
      And there is this one on I2C:

      A Generic I2C High Level Driver

      PS: with using Processor Expert I know as well exactly what is happening at the register level. Nothing wrong with not using Processor Expert. It is maybe like using an assembler vs. a compiler: some prefer to write in assembly, some prefer to write in C/C++. And using C/C++ does not prevent you to use assembly, or to see what the compiler does 😉

      Like

      By Erich Styger on June 7, 2013 at 09:17

  65. Thanks for your quick response. I have felt at a lot of times that my own drivers are far simpler and shorter than the ones generated by Processor Expert. Also at times for a newb like me, it can get really hard to understand the code generated 😛 I guess with time I shall be using more of Processor Expert. Till then self coded drivers FTW! 😀

    Like

    By Lead Coder on June 7, 2013 at 11:16

    1. Yes, I have sometimes as well the feeling that provided code is ‘harder to understand’ or ‘not as efficient as it could be’. That might be true, but probably only in a few cases. Similar to things in the ANSI library: should I use the provided routines, or do I feel I could do it better? The ‘code overhead’ typically comes because the driver is more mature and knows that it needs to deal with all the edge cases/etc. Or that it has to fit a broad and different usage of it. If you just need it for your narrow use case, then indeed it might be worthwile to make your own. To the end it is all about ‘make or buy’, or how much time you can affort to ‘re-invent the wheel’. On the other side: while building a wheel I can learn a lot of things I was not aware of before 🙂

      Like

      By Erich Styger on June 7, 2013 at 12:54

  66. Hi Erich,

    I start to use the KL25Z and I want to know how can I create my own package for Processor Expert. I have several libs that I created with another projects that I use microcontrollers, ex: Zilog, and now I want to work with ARM technology. I want to port the codes for KL25Z by Processor Expert because I don’t want to continue import several files .C and .H all the times that I’ll need to create I new project.

    Thanks.

    Like

    By André Ronix on June 11, 2013 at 15:47

    1. Hi André,
      you can create your own package/components with the CDE (Component Development Environment) of Processor Expert. I have published a tutorial as an example how to do this here: https://mcuoneclipse.com/2013/03/31/tutorial-creating-a-processor-expert-component-for-an-accelerometer/

      Like

      By Erich Styger on June 11, 2013 at 15:51

  67. Erich, I need a 16-bit x 600 Hz data logger in order to sleep-relevant movement data from an accelerometer mounted near the sleeper’s head. It seems like would be quite easy for an EE (I am a psychologist) and may already have been done. If you are aware of such a device built for Arduino or similar platform, I would be grateful to hear about it. Thanks, Steve

    Like

    By Steven Woodward on June 17, 2013 at 19:03

    1. Hi Steven,
      yes, this should be vey well doable. That would make about 1.2 KByte of data per second to be written to an SD card like in this post:

      Arduino Data-Logger Shield with the FRDM-KL25Z Board

      Like

      By Erich Styger on June 17, 2013 at 21:30

  68. Hi Erich,

    Great blog!

    I am using CodeWarrior for MCU 10.2 (Eclipse based).
    Suddenly today I cannot open all my Processor Expert based projects I did in the last months.
    I get the following error: “Could not initialize class com.processorexpert.configuration.PEConfiguration”.
    Do you know what error is it and how to fix it?
    Thanks.

    Like

    By Vagni on June 18, 2013 at 12:55

    1. Hi Alessandro,
      hard to say, but here are a few things to check:
      – create a new workspace, copy your project into that workspace, and then import it. If the problem goes away, then it could be a corrupted .metadatfolder
      – maybe the ProcessorExpert.pe (XML) file is corrupted? Are you using a version control system? If you are not using it properly, things might have merged into that XML file rendering it with wrong information. You can open the Processor Expert.pe file with a text editor to see if there is anything wrong in it.

      I hope this helps.

      Like

      By Erich Styger on June 19, 2013 at 07:43

  69. Hello Erich,

    I like your site very much and it helps me to extend the knowledge on Eclipse CW. Thanks for this!

    I have an issue (I guess you might have it as well) since I added http://www.eclipse.org/mpc/ Marketplace Client I encounter the problems to start Eclipse correctly.
    There are error dialogs
    1. Cannot initialize Drop
    2. An SWT error has occured
    than I ignore them I continue working but I think this is not correct behaviour I am using Eclipse CW 10.4 on Windows 7.

    Do you use MPC Marketplace Client within your Eclipse?

    Thank you!

    Best regards,
    Peter

    Like

    By Peter on June 19, 2013 at 08:39

    1. Hi Peter,
      no, I have not added teh MPC Marketplace Client. I had that considered a while back, but I was able to get and install my plugins without it. It might be that the client is not compatible somehow with the Eclipose version used? That sounds odd.

      Like

      By Erich Styger on June 19, 2013 at 08:49

      1. I understand, I just wanted to include eCalculator & Color theme plugins that’s way I have MPC.

        Like

        By Peter on June 19, 2013 at 13:10

  70. Hi Erich,

    Can please help me figure out how can i change MK40n512 controller Endian to BIG. I want to store the data comping from the buffer of UART in msb first format.

    i seached everywhere …. some MQX logics are given but they didn’t help.

    Can u please help me figure out how i can change Endian of my controller for Bareboard project.

    IDE : Code warrior v10.3
    Controller: MK40n512 Freescale

    Regards,
    Swapnil Katre

    Like

    By SwapnilKatre on June 20, 2013 at 09:58

    1. Hello,
      you cannot change the controller to Big Endian. Freescale made the decision not to offer this. So if you need LE/BE in your software, then you need to do this on the application level, and you cannot do this on the hardware level.

      Like

      By Erich Styger on June 20, 2013 at 13:40

      1. Thanks for reply. you mean i can change it at complier level or i have to write a code to change LE/BE.

        if i can select any option like a RTOS setting or in PE setting before built? do you know where can i do that?

        Like

        By SwapnilKatres on June 21, 2013 at 07:40

        1. No, you cannot change it at the compiler level (this would not make any sense, as the hardware is defining it).
          Same thing on PE or RTOS level: the interpretation of bit ordering is up to the application, and it needs to match the hardware, or you need to convert it on the application level. See https://mcuoneclipse.com/2012/02/19/a-little-or-big-indian-a-plea-for-peace/

          Like

          By Erich Styger on June 21, 2013 at 07:53

      2. ok.
        can i do some setting at driver level like in RTOS bsp where though the controller is LE but what we receive at API level would be BE.

        have you done such similar thing with FreeRtos.

        the reason i need to change this each time when i receive a 125 byte array through UART, i have to LE to BE conversion before storing in memory. which is reducing my speed due to conversion time.:-(

        Like

        By SwapnilKatre on June 21, 2013 at 07:46

        1. I have done similar things with an IEEE802.15.4 driver where I needed to care about LE/BE. As for your UART example, you need to perform this conversion in software inside your driver, there is probably no way around it. If you are concerned about the speed, consider to write the conversion in inline assembly.
          I hope this helps.

          Like

          By Erich Styger on June 21, 2013 at 07:49

        2. thanks, i have implemented the same and it worked.

          I think that is the only way to do it. 🙂

          Like

          By SwapnilKatre on June 21, 2013 at 10:37

  71. HI Erich

    Is it possible to load and edit a component from https://mcuoneclipse.com/2013/05/20/how-to-use-mcuoneclipse-github-without-git/?

    As I would like to import a component project so I can look through it to get a better understanding of how it was constructed and also look through the code used etc.
    I tried the following File->Import->Import Component/Interface then I browsed for the following file “mcuoneclipse-master\mcuoneclipse-master\Beans\RingBufferUInt8\RingBufferUInt8.bean” and opened it to view the ring buffer project. But nothing is displayed.

    Like

    By Andy on June 26, 2013 at 11:36

    1. Hi Andy,
      yes. The *.PEupd files are kind of package/zip file, and it extracts the file into your Processor Expert component folder (check C:\ProgramData\Processor Expert\CWMCU_PE5_00, see https://mcuoneclipse.com/2012/06/30/cde-hacking-where-is-my-stuff-a-dissection/ for details.

      Like

      By Erich Styger on June 26, 2013 at 13:09

  72. Hello Erich,
    thank you for great work that you have done.
    I have a problem with SPI module, i want to communicate two kl25z boards with spi and I tried examples in “typical usages” in “help on component” for master and slave, but those examples doesn’t work.
    p.s. I thing that I want to mention is that receive interrupt is triggering but I can’t read the data received.

    Like

    By Peace World on July 4, 2013 at 09:06

    1. Hello,
      I suggest that you use a logic analyzer to see if the signals are working properly, just to be sure. Not sure which components you are using, but I would use the SynchroMaster and SynchroSerial.
      I used it only so far to communicate with SPI devices, but not with another KL25Z.
      And I suggest that you try things first without interrupts: this is typically simpler to start with.

      Like

      By Erich Styger on July 4, 2013 at 09:11

      1. Hi Erich, thank you for your reply.
        I used SynchroMaster and SynchroSlave as you suggested, but still I’m not able to set communication between master and slave.

        My master configure is:
        Channel : SPI0
        Interrupt service/event : Disabled
        Width: 8 bits
        InputPin: PTC7
        OutputPin: PTC6
        ClockPin: PTC5

        Slave select pin: enabled
        PIN: PTC4
        Direction : output
        ActiveLevel: Low

        ClockEdge: rising or falling edge
        ShiftClockRate : 374.491429 kHz
        Empty character: 0
        Ignore empty char: no
        Send MSB first: no
        Shift clock idle polarity: Low

        Enabled in init. code: yes

        My master code is:

        byte ch;
        byte err;

        SM1_Init();

        do {

        SM2_SendChar(0); // Send zero
        word chrx = 0;
        while(chrx == 0){
        chrx = SM2_GetCharsInRxBuf();};

        // Get received char
        err = SM2_RecvChar(&ch);

        /* Do until it receives char with code 13 */
        } while ( (err != ERR_OK) || (ch != 13) );

        My slave configuration is:
        Channel : SPI0
        Interrupt service/event: Disabled
        Width: 8 bits
        InputPin: PTC6
        OutputPin: PTC7
        ClockPin: PTC5

        Slave select pin: enabled
        Pin: PTC4

        ClockEdge: rising or falling edge
        EmptyCharacter: 0
        Ignore empty char: no
        Send MSB first: no
        Shift clock idle polarity: Low

        Enabled in init. code: yes

        My slave code is:

        SS1_Init();
        for (;;) {
        word chinrx = 0;
        //Wait for a character
        while (chinrx == 0)
        {
        chinrx = SS1_GetCharsInRxBuf();
        };

        // Get received character
        err = SS1_RecvChar(&ch);

        if ((err == ERR_OK) || (err == ERR_OVERRUN)) {
        // Prepare a character for transmision
        SS1_SendChar(ch);
        }
        }

        sometimes chinrx gets value 1 but ch gets value ‘ÿ’ . Why?
        And do you think that communication is established?

        p.s. if you have any example of communication between kl25z and flash memory (extern), help me, because I have that goal too.

        Like

        By Peace World on July 5, 2013 at 15:35

        1. Hi Peace World,
          Unfortunately, your settings do not help me to find the problem. You really need a logic analyzer to inspect the signals generated to know what is going on. I hope you have this, otherwise dealing with things like this is really, really hard.

          >>sometimes chinrx gets value 1 but ch gets value ‘ÿ’ . Why?
          Cast that type to ‘unsigned’, as the debugger seems to interpretate it with a different type. Or inspect it as hexadecimal (see https://mcuoneclipse.com/2012/10/01/debugging-variables-in-hexadecimal-with-eclipse/).
          >>And do you think that communication is established?
          You need to check this with a logic analyzer.

          >>p.s. if you have any example of communication between kl25z and flash memory (extern), help me, because I have that goal too.
          Yes, I do, I2C to 24AA EEPROM.

          Like

          By Erich Styger on July 5, 2013 at 18:56

  73. I changed format of ch to hexadecimal and it has value 0xff.
    For flash issue, I flash spi based.
    So, do you have any spi project , if you have please post it.
    Thank you

    Like

    By Peace World on July 8, 2013 at 13:40

  74. *For flash issue, I have only flash spi based.

    Like

    By Peace World on July 8, 2013 at 13:42

    1. Hi,
      I only have a project on an S08 which is using the AT25HP512. For this one there is component availble on GitHub.
      I hope this helps.

      Like

      By Erich Styger on July 9, 2013 at 13:18

      1. Hi Erich,
        Now I’m able to communicate with two kl25, but now I want to communicate with flash memory (spi based). I wrote the code for it, and when I check MOSI with oscilloscop it seems that it isn’t sending all bytes, and it is sending only three bytes.
        Do you have any idea why ?
        The code i’m using:

        void flash_write_byte(unsigned int address, byte data){

        //write enable instruction
        SM1_SendChar(0x06);

        SM1_SendChar(0x02); // write byte

        WAIT2_Waitus(1);

        flash_set_address(address); // write address
        SM1_SendChar(data); // send data
        }

        void flash_set_address(unsigned int addr){
        // send 24 bits of address
        int i = 0;
        for(i = 2; i> -1; i–)
        {
        SM1_SendChar( (addr >> (8*i)) & 0xff );
        }
        }

        When I call flash_write_byte, it sends only 0x06, 0x02, and data, not the address.

        Like

        By Peace World on July 19, 2013 at 15:13

        1. SPI is ‘communicating by shift register’. So if you shift-out (write) something, you need to shift-in (read) too. I’m using the following method:
          static uint8_t SPI_WriteRead(uint8_t val) {
          uint8_t ch;

          while (SM1_GetCharsInTxBuf()!=0) {} /* wait until tx is empty */
          while (SM1_SendChar(val)!=ERR_OK) {} /* send character */
          while (SM1_GetCharsInTxBuf()!=0) {} /* wait until data has been sent */
          while (SM1_GetCharsInRxBuf()==0) {} /* wait until we receive data */
          while (SM1_RecvChar(&ch)!=ERR_OK) {} /* get data */
          return ch;
          }
          I suggest the same for you. For reading (and writing) simply pass the value. For just reading simply pass a dummy value (0x00 or 0xFF). If you are not interested in the shifted in value, simply ignore the return value.
          I hope this helps.

          Like

          By Erich Styger on July 19, 2013 at 16:15

      2. Hi Erich,
        I tried that code as you suggested, and now it seems that bytes are sending correctly but the slave is returning only 0xff all time, even when I send dummy byte (0x00 or 0xff).
        Here is what logic analyzer shows:
        https://docs.google.com/file/d/0B49fhAdW4O1vQ3E3MDlFLUNZTTA/edit?usp=sharing

        Like

        By Peace World on July 22, 2013 at 21:13

        1. This either your MISO wire has a problem, or the device is not configured properly?

          Like

          By Erich Styger on July 22, 2013 at 21:25

        2. Oh, something else: carefully check the device SPI settings, e.g. at which clock phase the bits needs to be shifted in, and what’s the clock idle level.

          Like

          By Erich Styger on July 22, 2013 at 21:26

      3. Hi Erich,
        I’m sorry that I’m troubling you with so many questions :S
        I checked the wire and it was an error in that and I fixed it.
        So, now I’m receiving only 0xff or 0x00.
        Like here:

        https://docs.google.com/file/d/0B49fhAdW4O1vc0I1bld6NTkwTkU/edit?usp=sharing

        https://docs.google.com/file/d/0B49fhAdW4O1vUjEtYW1oV0xPbEE/edit?usp=sharing

        Do you think that CS (Enable) is right ?

        Like

        By Peace World on July 24, 2013 at 11:30

        1. Your MISO line indeed looks strange. And I cannot tell if CS is correct or not: you need to check the device manual if it is low active or high active. You are using it as low active signal.

          Like

          By Erich Styger on July 24, 2013 at 11:52

      4. CS is active low, but I thought is it correct CS signal width ?
        And do you think that maladjustment of voltages could cause that MISO bad signal ?

        Like

        By Peace World on July 24, 2013 at 15:31

        1. Well, if you have different voltage levels (e.g. your device is not a 3.3V one), then for sure you have a problem.

          Like

          By Erich Styger on July 24, 2013 at 15:55

      5. I’m sorry for too many questions, but I need to do this to work.
        I tried with ATMEGA328 and it worked, but when I measured the output voltage of atmega, it was 4.11 V, but when I measured kl25z output voltage it seems that it is 2.94V .
        Well, my device says that all accept entries are between -0.6 to 4.1 V .
        Do you see any error ?

        Like

        By Peace World on July 24, 2013 at 16:35

        1. The normal logic level for FRDM-KL25Z is 3.3V. You say your device ‘accepts’ up ot 4.1V. You need to distinguish between input and output voltage, and check where the threshold values are.Your device needs to be 3.3V tolerant, and needs to provide 3.3V signal levels. Best if you measure the voltage level of the MISO signal: it shall be between 0 and 3.3V.

          Like

          By Erich Styger on July 24, 2013 at 16:41

    2. Well, now I supplied my device (flash memory) with P3V3 from kl25, and MISO is only 0xff (wires are fine connected) with voltage 2.8V .
      what do you think that is going wrong ?

      Like

      By Peace World on July 25, 2013 at 13:50

      1. Sorry, I do not have that FLASH device, so I cannot try it out mayself. What I suggest is to carefully check and verify the communication protocol if it matches the specification of the device. Check especially the SPI settings (at which clock edge things are shifted, what is the level of the idle clock signal). And as well the speed of the SPI. It might be better to start with say 100 kHz clock before going faster.

        Like

        By Erich Styger on July 25, 2013 at 13:53

      2. I think that I configured those settings (about clock polarity, clock idle signal etc.), but I don’t know where is the problem.
        here is my flash memory
        http://www.datasheet4u.net/datasheet/A/T/2/AT25F512B_ATMELCorporation.pdf.html

        Like

        By Peace World on July 25, 2013 at 14:03

      3. Hi Erich,
        do you still any idea or not ?
        Did you read datasheet of the memory ?

        Like

        By Peace World on August 6, 2013 at 11:28

        1. I had a look at the data sheet. But witout having actually the device and having it hooked up with a logic analyzer, it is nearly impossible to help you on this one.

          Like

          By Erich Styger on August 6, 2013 at 11:36

      4. p.s. I tried to connect kl25z with arduino, via spi and same code, and it worked. But still it’s not working with flash memory :S

        Like

        By Peace World on August 6, 2013 at 11:30

        1. Hi,
          I appologize, but I think I cannot help you with your problem, as I would need physical access to a device, having it on my bench. And it would take time to do this as well. Not much I can offer you here, except carefully checking the settings, carefully comparing the data sheet with the logic analyzer output, and a lot of debugging 😦

          Like

          By Erich Styger on August 6, 2013 at 11:38

      5. Ok Erich, I’m sorry for I troubled you.
        And I’m very thankful to you for your helps and suggestions.

        Like

        By Peace World on August 6, 2013 at 11:54

      6. Erich, I just want to tell you that I fixed that connection, and now it’s working perfectly. The problem was that CS should be low during reading data, but Synchro set it high, I just get an BitIO and now it’s working well.
        Thank you for helps

        Like

        By Peace World on August 6, 2013 at 16:28

        1. Congratulations, that’s good to hear. Solving this kind of problem is painful, and it happens to me many times too. Keep coding 😉

          Like

          By Erich Styger on August 6, 2013 at 16:31

  75. Hi Erich, I need your suggestion, as you teach in university i think u can help me.

    I am doing my masters in “Embedded system and VLSI design” also working full time((:|). i have to give three topics to be selected by my faculty as my Post Graduation thesis. i wanted to use kinetics from freescale and do some project.

    Can you suggest me few topics….as from your Blogs, your work is almost similar to mine… and i think we are in same shoe but you little ahead of me…

    please help me….

    Like

    By SwapnilKatre on July 15, 2013 at 13:47

    1. Hi,
      that’s a good and hard question. I think you need to come up with something which is in your interest, but out of your knowledge. I can tell you what one of my master students is researching starting next semester: IoT (Internet of Things): it is about how to enable ‘common’ things with networking capabilites and get it ‘accessible from the cloud’. A lot of problems to solve there: communication protocols, low power aspects, network topology, routing messages, how and where to store data, security, ….

      Like

      By Erich Styger on July 15, 2013 at 19:02

      1. Thanks Erich, you really gave me think food….suggested field is in my area of interest, let me search more before concluding….

        Like

        By SwapnilKatre on July 16, 2013 at 07:11

  76. Hey Erich,
    have you any time worked on Over the air Firmware up gradation for KL25Z?

    i have a bareboard project working with GPRS/GSM module. can i use the GPRS net to go a firmware update?

    Like

    By SwapnilKatre on July 25, 2013 at 08:46

    1. There is nothing which would prevent you to do a firmware upgrade over GPRS. It is not different from any kind of firmware upgrade e.g. with USB or RS-232. You get the new data and you flash it to your device. Of course with the needed precaution (checksums, failure recoverey, etc).

      Like

      By Erich Styger on July 25, 2013 at 08:50

  77. Hi Erich.
    I have successfully implemented some of your Brilliant Processor expert USB packages.
    I have updated my USB framework recently and your packages in hope of more functionality but there are compile errors with the USB_Framework.c.
    How can I contact you to try debug the issue as I am not sure where to start looking?

    Like

    By Rory on August 2, 2013 at 13:04

    1. Hi Rory,
      you find my email address in the About page of this blog.

      Like

      By Erich Styger on August 2, 2013 at 13:08

  78. Hello Erich,
    Thank you for this awesome blog.

    After reading your post “DIY Free Toolchain for Kinetis”
    as was able to setup Eclipse and compile code for Freedom board.

    I was wondering now how to compile code for K60, K70 and also
    compile MQX on this DIY toolchain.

    Any post on how to modify make files?

    Thank you.

    Like

    By Moises on August 7, 2013 at 16:49

    1. I have not run it yet on K60/K70, but basically you need to change the CPU option from M0+ to M4, and adopt the memory map.
      If you are using Eclipse, then there is no need to modify the make files, as ‘managed make’ in Eclipse takes care about this.
      Otherwise, if you want to use make files, I have a post about that subject:

      Make my Make with Eclipse and MCU10

      Like

      By Erich Styger on August 7, 2013 at 16:59

  79. Eric,

    I appreciate your work and look at your blog often. Thanks much.

    I thought I could easily add a 24AA256 serial EEPROM to the FRDM-KL25Z board, but this proved not to be so. I decided to use the I2C1 channel. Installing the 24XX_EEPROM component also installs a I2C component. There is a Test function which I thought would be a good way to test the quickly test the functions and wiring. Only by selecting I2C1 to function as a slave would allow the Processor Expert, SendStop() and the test function to be compiled without errors. Timing was selected per your tutorial, Missing Repeated Start Condition”. The result is that there is no output at all from the I2C1_SDA or the I2C1_SCL pins. I note there is conditional compile code regarding SendStop() within the source code. Any idea on what could be wrong or if there is any example I could look at? A dedicated example would make the setup quick and easy.

    Like

    By John Sorensen on August 8, 2013 at 23:36

    1. Hi John,
      good timing, I’m right now using the 24AA EEPROM component for a KL25Z project (I have not used it yet for Kinetis), and I’m making some adjustments. If I find time tonight, I’ll post a short article along with an example project for the FRDM-KL25Z. I hope this will help you.

      Like

      By Erich Styger on August 9, 2013 at 06:40

    2. Hi John,
      I have commited an example project on GitHub (https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples).
      I had to make many changes to have it working for Kinetis (I was using that component so far with an S08). So if you want to try out the example, then you need to update the components from GitHub too. I have not exported them as *.PEupd files yet, as still working on some details.

      Like

      By Erich Styger on August 9, 2013 at 21:27

      1. Updated components and example today. No selection of parameters compiles correctly. Will await your short article as it’s unclear how to set up the components for master, slave and correct channels. The EE241:24AA_EEPROM requires a different connection than the default of GI2C1 which creates another IC22:Internal2C component. Is this one generated suppose to be set up as the slave and the other the master?

        Like

        By John Sorensen on August 13, 2013 at 21:14

        1. Hi John,
          did you update the components from the component sources (not *.PEupd)? You should have it updated from the sources. The microcontroller is the I2C master, and the EEPROM is the slave. GenericI2C is just a wrapper and simplifies interaction with the I2C LDD driver, so the relationship is 24AA_EEProm -> GenericI2C -> I2C_LDD.

          Like

          By Erich Styger on August 13, 2013 at 21:33

  80. HI Erich,
    have you ever worked on 128 x 64 pixel graphical LCD, like JHD12864E commonly used LCD?Do we have any generic Embedded Component for the same…like LCDC_LDD component?

    if so please guide me locate it….

    Like

    By SwapnilKatre on August 14, 2013 at 08:08

    1. I’m using several different graphical LCD displays, but I have not used that JHD12864E one. It seems similar to Hitachi (https://mcuoneclipse.com/2012/12/22/hd44780-2×16-character-display-for-kinetis-and-freedom-board/) ones, but just having graphics instead of character displays. The good things I have the graphic libraries (see https://mcuoneclipse.com/2012/12/16/zero-cost-84×48-graphical-lcd-for-the-freedom-board/), but I have not developed a low level driver for the JHD12864E. That low level driver should not be too much work.

      Like

      By Erich Styger on August 14, 2013 at 08:45

      1. ok no problem… i am working on the interface part… once i figure out, i will post it … let see if we can make a Embedded component for it….

        this GLCD is same as Hitachi but we have here 128×64 pixel….hope i can use ur 2×16 character LCD component to interface it.

        Like

        By SwapnilKatre on August 14, 2013 at 09:20

  81. Hi I got an error and do not know what to do. I have the same error on every project.Not even 3 lines of code do not work, the LED lights and then stays on instead of off. Sorry for expression
    ,,Invalid project path: Include path not found (E:\FRDM\k20d50m_sc_baremetal\pwm_led\cw\Project_Headers).pwm_led pathentry Path Entry Problem

    Like

    By rusu radu ionel on August 30, 2013 at 17:45

    1. Hello,
      maybe you have a patch/double quote problem in your settings, see https://mcuoneclipse.com/2013/03/09/the-quotation-problem/
      Otherwise carefully check your compiler include path settings, maybe you have unbalanced quotes or parenthesis?

      Like

      By Erich Styger on August 30, 2013 at 18:32

  82. Hi Erich,

    Thank you for sharing your brilliant expertise. I learn a lot from your blog and example code.

    I want to use bluetooth dongle with KL46Z board. Is it possible and worth effort? Do you have any suggestion on how to start with?

    When I try to compile freertos examples, I get error about missing RTOSTICKLDD1.h . I tried very very hard to find answer from your blog or google. I followed DIY tool chain. RTOS LDD Tick always is disabled and unchangeable.

    It would be appriciated if I can get any feedback.

    Warm regards, James

    Like

    By James Fan on August 31, 2013 at 18:29

    1. Hi James,
      Thanks for your feedback, it is always encouraging if things are useful :-).

      About Bluetooth: not sure what you mean with ‘Dongle’, but I’m using several bluetooth modules with the FRDM-KL25Z, and the same would work with the FRDM-KL46Z board (https://mcuoneclipse.com/2013/08/30/optimized-freertos-stack-check-and-systick-for-arm-cortex-cores/) (https://mcuoneclipse.com/2013/06/19/using-the-hc-06-bluetooth-module/).

      About the RTOSTICKLDD1.h: that might be undesired side effect of my most recent change (https://mcuoneclipse.com/2013/08/30/optimized-freertos-stack-check-and-systick-for-arm-cortex-cores/)? Are you using that new component? I have to admit that right now I’m chasing a bug with my change about wrong tick timer prescaler :-(. If you are using the new component, then select ‘SysTick’ to ‘no’ (as explained in that recent blog post).

      I hope this helps

      Like

      By Erich Styger on August 31, 2013 at 18:36

    2. Hi James,
      if the error about missing RTOSTICKLDD1.h is in ProcessorExpert.c or Events.c/Events.h: somehow Processor Expert seems not to remove non-generated header files from the list of includes. In that case, simply remove the include. Looks like I need to remove it on my end in the examples too so users do not run into this problem.

      Like

      By Erich Styger on September 2, 2013 at 07:51

  83. Howdy, first off, thanks for all the awesome code base & documentation you have done for the kinetis processors! Much appreciated!

    Been looking on your github and noticed a MSD example for the KL25 freedom board. Only problem is, you can’t load it on the free version of code warrior since its over 64kb. Any chance it would be possible for you to make a demo project under 64kb with fatfs,freertos, & USB MSD or is that simply not realistic? Been attempting to do so myself but i’m abit new to the code warrior..ect. Any consideration would be appreciated!

    Like

    By Nathan on September 1, 2013 at 22:51

    1. Already bogged my first post. After doing some more reading I realized your examples were for USB MSD host. My request would be for a USB MSD Slave. Granted, it would be a very tiny space that one could write to but it would be a very end-user friendly for setting up configurations…ect.

      Like

      By Nathan on September 1, 2013 at 23:01

      1. Hi Nathan,
        so you ask for USB MSD Device support. I have not completed this for Kinetis, but I’m using this for a bootloader on JM128 (https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples).
        Definitely something on my ‘bucket list’ I think to do for ARM.

        Like

        By Erich Styger on September 2, 2013 at 09:48

    2. Hi Nathan,
      if you want a free and unlimited tool chain, then this might be of interest for you:

      DIY Free Toolchain for Kinetis: Part 1 – GNU ARM Build Tools


      Some work required, but very doable.

      As for the MSD Host example code size: Typically my projects on GitHub are compiled without optimizations. GNU gcc does not generate good code without optimizations, but it makes it easier to debug:
      text data bss dec hex filename
      75368 44 14356 89768 15ea8 Freedom_USBHostMSD.elf

      I tried -Os (Optimize for size) compiler optimization, and it is down to:
      text data bss dec hex filename
      41024 44 14356 55424 d880 Freedom_USBHostMSD.elf

      Additionally, you can use the CodeWarrior debugger to download the S19 file: this is not limited neither.

      Like

      By Erich Styger on September 2, 2013 at 09:41

      1. Hey Erich,
        Thanks for your replies! I will certainly try that as well as your tool chain series. I’ve also been looking into KL25 USB MSD Device and it looks like the freescale USB stack gets you quite close. They have an example for it here “Freescale USB Stack v4.1.1\ProcessorExpert\Examples\Device\MSD\USB_MSD_DEVICE_MKL25Z128_PEx” . They use ~1kb of ram for mass storage capacity and the device does indeed enumerate. However, windows asks immediately to format disk. Regrettably, my W7 machine was not able to format it. I’m not sure if 1kb is simply to small for a fat(12,16..) file system or if the code didn’t compile correctly or is missing necessary functionality. Any ideas would be greatly appreciated!

        Like

        By Nathan on September 2, 2013 at 22:44

        1. I have not checked that example, but I doubt it implements a file system? 1 KByte would be indeed challenging as typically a Fat block is 512 bytes, and you need one for the root block already :-(. I think 1 KByte is simply not enough for this approach.

          Like

          By Erich Styger on September 3, 2013 at 07:11

  84. Hi Erich,

    I am trying to figure out the LCD function on the KL46Z without the use of RTOS. I’ve copied the LCD folder into the Sources folder of my project and if I comment out the line that reads:
    UTIL1_Num16uToStrFormated(lcdBuf, sizeof(lcdBuf), cntr, ‘0’, 4);
    I can get the program to run and can write to the LCD with:
    vfnLCD_Write_Msg(“3456”);

    However, I haven’t figured out how to write a variable such as “cntr” which is used in the program.

    I gather the line I commented out puts the value of cntr into lcdBuf, but I get an error when I try to build with that line active:

    Undefined reference to ‘UTIL1_Num16uToStrFormated’

    I have been unable to find where that function/method/variable is defined in your program.

    What am I missing, please?

    Thank you.

    Like

    By Injun Ear on September 2, 2013 at 05:29

    1. PS I am using your KL46Z magnetometer demo program as my starting point.

      Like

      By Injun Ear on September 2, 2013 at 05:40

      1. Hi Injun,
        I’m looking into it right now…..
        Erich

        Like

        By Erich Styger on September 2, 2013 at 15:23

    2. Hi Injun,
      UTIL1_Num16uToStrFormated() is defined in the Utility Processor Expert component. You need this one in your project.
      I hope this helps.

      Like

      By Erich Styger on September 2, 2013 at 18:13

      1. Yep. That is what I needed. Thank you for your help.

        Like

        By Injun Ear on September 3, 2013 at 04:41

  85. Hi Erich,
    In order to do the “internet of things” you need connectivity. The FRDM boards are Arduino form factor compliant so you can use the Ethernet shields with the Wiznet chip. The Wiznet W5100 and soon to be W5500 include a processor, MAC, and PHY on a sinle chip for under $5. You get a TCP/IP coprocessor that supports up to 4 sockets (8 with the W5500), a simple SPI interface, and the ability to use FRDM boards with small FLASH sizes. Have you looked into a PE component for this interface? There is already a lot of open source code that might make the project easy ;-). Thanks

    Like

    By S. Machell on September 25, 2013 at 18:19

    1. Yes, I have such a W5100 Arduino board on my desk for months, and it always looks at me and says “work with me!” ;-). But I have been burried so much in the last months with different work items that I never had a chance to use it. Yes, I think it would not be difficult, but it will be some work for sure.

      Like

      By Erich Styger on September 25, 2013 at 20:31

  86. Would like to know how to eliminate the passing of the null parameter to set or clear bits using Bitio_ldd as you alluded to in one of your posts. Thanks for writing these excellent articles.

    Like

    By jeff berezin on September 26, 2013 at 19:19

    1. Hi Jeff,
      thanks for your feedback. And thanks for your request, as you are the first one taking that offer :-).
      I’m very busy until the week-end, but let me see if I can post what I had in my mind when I wrote that article a while back 😉

      Like

      By Erich Styger on September 26, 2013 at 21:20

    2. Hi Jeff,
      actually, I learned after that original post that the parameter shall not be NULL, but the device handle returned by the Init() function.
      I have updated the original post (https://mcuoneclipse.com/2012/11/12/tutorial-bits-and-pins-with-kinetis/) to reflect this.
      And as for your request: I have posted the follow-up article with an optimized version using macros:

      Optimized BitIO_LDD Programming with Processor Expert

      Like

      By Erich Styger on September 29, 2013 at 17:43

  87. Hi Erich!

    First, I would congrats for ur website and ur project with Zumobot.
    Second, I am also interest on start to work with it, but I am mainly specialized on software, rather than hardware, especially with computer vision…let me explain to u a bit better my idea. I want connect a low-res cam (QVGA shoud be enough) to zumobot then send data via wifi to a pc that compute it (OpenCV) and send back a command…or…us a webserver to see the data collect from the camera then send back a command to the robot.
    Do u think it is possible do it with the default shield and arduino One or Leonardo board? if not, with the Freescale board?
    Thanks in advance for ur answer and excuse me for my bad english.

    Best regards,
    AB

    Like

    By BertOne on October 4, 2013 at 10:51

    1. Hello,
      First: thanks :-).
      Second: Yes, that should be possible. The only concern is that you only could send pictures, but probably not a video stream. However, I would use a different approach: using a local second processor on the robot to perform the OpenCV calculation. Then you do not need to send things off the robot.

      Like

      By Erich Styger on October 4, 2013 at 12:10

      1. That’s great! I was a bit worried about computational coast for image elaboration, but a second proc could be the solution…but now i’m wondering about energy consumption 😀 but maybe without IR arrays, ultrasonic and other sensors it is feasible…
        If u will be interesting in a project like that please let me know, we could keep in contact by e-mail 😉
        PS
        Anyway I think a video streaming by wifi could be also interesting with a proper app for iOS or Android.

        Like

        By BertOne on October 4, 2013 at 15:54

  88. Hi Erich,

    how r u?

    i was working with KL25Z and came across a error “No source available for “__aeabi_f2iz (0x000009DC)() ” ” while debuging a line dvar = data * (-1);

    where long llvar; long dvar; and data have -5 as value.

    can you please help me figure out the problem.

    Like

    By SwapnilKatre on October 7, 2013 at 08:24

    1. Hello,
      this is a routine implemented in the EABI library. As far as I can see, the ARM gcc distribution does not contain the source file for it, only the library file.

      Like

      By Erich Styger on October 8, 2013 at 11:20

      1. Thanks Erich,

        i converted the float in integer to work on it. basically i just wanted to convert the float to string now it is possible.

        Like

        By SwapnilKatre on October 8, 2013 at 12:33

  89. Hi Erich,
    I want to work a project with ethernet module, so I need to send/receive some data with ethernet .
    Can I do this with kl25 ?
    If yes, how ?
    Thanks for your work 🙂

    Like

    By Peace World on October 8, 2013 at 13:04

    1. The KL25 does not have an onchip ethernet module, so you need an external one. Something like the Wiznet 5100 (http://arduino.cc/en/Main/ArduinoEthernetShield).

      Like

      By Erich Styger on October 8, 2013 at 14:11

  90. Erich
    I am moving a bare-metal K20 project over to a KL05. So I am interested in the similarities and differences between the K’s and the L’s, at the register level. That would make a good topic for an article.

    Like

    By Dusty on October 13, 2013 at 20:32

  91. Do you have or can you make an HCI Bluetooth Stack for a CC2564 ??
    I use the PAN1326 (BT + BTLE) module.
    I tryied using the BTStack from google code (https://code.google.com/p/btstack/) to transferred to FreeScale MKL25.
    If I succeed, I’ll pass you to see if you can compact in a BEAN.
    Thank you for your magnificent collaboration with this web.

    Like

    By Sergi on October 17, 2013 at 08:17

    1. Hi Sergi,
      no, I do not have this. So if you could work on this and contribute it back, I think many will benefit from that. Looking forwared to the outcome :-).

      Like

      By Erich Styger on October 17, 2013 at 12:16

  92. Hi!!! I would like to see examples with my Kinetics TWR-K20D72M. Is it possible to adapte your examples in my development kit??

    What do you suggest me??
    Thanks a lot

    Regards

    Like

    By Luis on October 31, 2013 at 19:22

    1. Hi Luis,
      as the projects are made with Processor Expert, they are easily portable to any other board or platform. I already have folder for the TWR-K20D72M on GitHub.

      Like

      By Erich Styger on October 31, 2013 at 19:33

      1. Hi Erich!!! Do you remember what was the folder’s name?

        Thanks!!

        Like

        By Luis on October 31, 2013 at 20:25

        1. sure: it is here:
          https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/TWR-K20D72M

          Like

          By Erich Styger on October 31, 2013 at 20:56

  93. Don’t worry I found it!!!

    Thanks a lot Erich!!!

    Like

    By Luis on October 31, 2013 at 20:56

  94. Hi again Erich!!!
    I hope you’re very well
    Can you show me how can traslade your PWM example to my TWR-K20D72M please??

    Thanks!

    Like

    By Luis on November 1, 2013 at 20:36

    1. Hi Luis,
      could you be more specific (which PWM example)? On the other side: as I’m using mostly Processor Expert, the examples apply to all other microcontrollers: only the pin names are different.

      Like

      By Erich Styger on November 2, 2013 at 07:21

      1. Hi Erich!!

        I was talking about your Tutorial: PWM with Processor Expert

        Tutorial: PWM with Processor Expert

        Like

        By Luis on November 4, 2013 at 02:04

        1. Hi Luis,
          that tutorial should be applicable to other (ARM) processor too.

          Like

          By Erich Styger on November 4, 2013 at 10:43

  95. Hey Erich,
    First off, I want to thank you so much for all that you have done on this site. Your work here is the reason we chose to use the K20DX50 board and K20DX72 chip for a project that we are currently working on. Speaking of, that brings me to my next point…
    I am attempting to talk to an AD7194 ADC using SPI and the K20DX50 development board. However, I am having some trouble getting started with the SPI interface. I have followed a few guides that you have already posted but I haven’t been able to get a firm grasp on the basics of the SPI interface. Is there any way you could post a tutorial on getting started with SPI?
    Thanks again for all your hard work.

    Like

    By Sam Hutto on November 11, 2013 at 23:51

    1. Hi Sam,
      thanks for that feedback :-).
      I agree: SPI deserves a tutorial. Need to see when I can find time for this (I have been very busy lately).
      You might have a look at these articles and example codes as they are using SPI components:

      SMAC with Processor Expert

      Tutorial: Ultra Low Cost 2.4 GHz Wireless Transceiver with the FRDM Board

      Arduino Data-Logger Shield with the FRDM-KL25Z Board


      The fundamental concept behind SPI is that it is using two shift registers (one shifting in, one shifting out) with a clock. Typically I have the following three routines:
      – SPIReadWrite(): shifts out and reads the shifted in value
      – SPIWrite(): shifts out, and discards the shifted in value
      – SPIRead(): shifts out a dummy value and reads the shifted in value
      I hope this helps as a starter.

      Like

      By Erich Styger on November 12, 2013 at 09:38

  96. Hi erich, I’m back 🙂
    I have a timer component, and a wait component, when I call waitms the timer interrupt doesn’t fire, why?

    Like

    By Peace World on November 14, 2013 at 08:57

    1. welcome back 🙂
      Are you saying that without the Wait component, the interrupt works?
      The Wait component does not use/need any interrupts. So if your timer component does not fire: have you interrupts enabled, and is the timer (interrupt) enabled too?

      Like

      By Erich Styger on November 14, 2013 at 09:23

  97. Hi Eric!! Do you know is possible use your LCDHTA library in this generic LCD:

    Click to access NHD-0440WH-ATFH-JT.pdf

    How can I adapt your LCD library for 40 caracters X 4 lines in my TWR-K70???
    Thanks!!

    Like

    By Luis on November 18, 2013 at 01:35

    1. Specially if I want to enable 4 lines instead 2!!
      Regards

      Like

      By Luis on November 18, 2013 at 01:38

      1. Hi Luis,
        It looks like the Hitachi command set is used. I have implemented a 4 lines mode (see https://mcuoneclipse.com/2013/05/29/character-lcd-with-4-lines/). But the display you refer to is using an additional signal (E2) to switch between the lines, and I do not have this implemented. It should not be too complicated, but testing it without a real display in hand could be complicated.

        Like

        By Erich Styger on November 18, 2013 at 07:19

  98. Hi Eric!!
    Thanks a lot for answer me….

    I was seeing your link: https://mcuoneclipse.com/2013/05/29/character-lcd-with-4-lines/). But I don´t understand where dou you put the other 2 comands to enable 4 lines in the LCD. I went to the other link: https://github.com/ErichStyger/McuOnEclipse_PEx
    to try to find out a updated LCDHTA library (included 4 lines) but there are many codes…… Also I didn´t see a file.PEupd to download it……..

    Can you tell what code is it??
    Regards

    Like

    By Luis on November 21, 2013 at 17:54

    1. Hi Luis,
      There are ‘combined’ *.PEupd files on GitHub, see https://mcuoneclipse.com/2013/05/09/processor-expert-component-peupd-files-on-github/

      Like

      By Erich Styger on November 21, 2013 at 19:02

    2. Hi Luis,
      the driver code is here:
      https://github.com/ErichStyger/mcuoneclipse/blob/master/Drivers/sw/LCDHTA.drv
      Search for
      %LCD_Nof_Lines
      and you can see how the different lines are handled.

      Like

      By Erich Styger on November 21, 2013 at 19:12

      1. Hi Eric!!! Thank you again!!!

        I was using your updated LCDTHA (from github), everything was good, but I have a new problem…..
        1. I want my LCD shows: “Hola”, but when I debugged my program, it showed me: “Hl” “oa” “lH”
        somethings like that but not “Hola” (completely), my code in Processor Expert is:

        /* Write your code here */
        /* For example: for(;;) { } */

        LCD1_Clear();

        for (;;) {

        LCD1_WriteLineStr(1, “Hola”);
        WAIT1_Waitms(500);

        }

        What is the problem???

        I´m using TWR70KF120

        Regards!!

        Like

        By Luis on November 22, 2013 at 04:17

        1. Hi Luis,
          are you using the ‘read’ pin of the LCD (if available?).
          It could be that your display is too slow. Can you increase the Wait time (in the properties: Wait (us)) to a high value, say several hundreds of microseconds) to see if this helps?

          Like

          By Erich Styger on November 22, 2013 at 07:13

        2. as another idea: could you use Write() to write a few single characters and wait between it?
          Like
          LCD1_Write(‘h’); WAIT1_Waitms(10);
          LCD1_Write(‘o’); WAIT1_Waitms(10);
          LCD1_Write(‘l’); WAIT1_Waitms(10);
          LCD1_Write(‘a’); WAIT1_Waitms(10);
          ?

          Like

          By Erich Styger on November 22, 2013 at 07:14

  99. Hi Eric!!!

    Thanks again!

    My LCD has R/W pin (ground). I used the LCD1_Write() it was ok (out of for(;;)). But when I use
    LCD1_WriteString(); or LCD1_WriteLineStr() the string “hola” appears incompleted for example:

    hla
    oa
    hl

    Other strings like: LUIS, JORGE,DANIELA, apear:
    Lus, Jog, DNEA , etc

    What happen??

    Is possible to fix something in your library??
    Thanks!!!

    Like

    By Luis on November 22, 2013 at 18:28

    1. Hi Luis,
      what do you mean with R/W pin (ground)? You have connected it to ground and not to the microcontroller?

      Like

      By Erich Styger on November 22, 2013 at 20:05

      1. Hi Eric!!

        Yeah!! The R/W (Read/Write) pin is connected it to ground, because I need write in my LCD (show the characters).

        Like

        By Luis on November 22, 2013 at 20:14

        1. well, that would be wrong? Because you need to read the busy flag from the LCD, otherwise it is possible to write too fast to LCD. I think this is what is happening in your case: you write the data too fast. You need to use the R/W pin to avoid this. If you cannot change your hardware. Otherwise: set a wait value in the LCD component properties.
          Have a look at https://mcuoneclipse.com/2012/12/22/hd44780-2×16-character-display-for-kinetis-and-freedom-board/

          Like

          By Erich Styger on November 22, 2013 at 20:33

  100. Hi Eric!

    I’m new!

    I’m working on a project, in wich I need to handle an LCD, intercommunicate 2 Kinetis, mine is a K70 and my friend’s is a K20, I’m thinking to use i2c to connect them, also I need to use ethernet protocol and a memory, It’s very important cause is part of my job’s projects and we will use Kinetis to make the control for a machine. I don’t know if you have code examples about ethernet, and how to handle a memory like a SD-Card. Also I need to use a keyboard and interruptions, so it will be great to see examples of how to use them. I know it’s a lot of things but I have seen your blog and I have found a lot of help!

    thanks!!! thank you very much!

    Like

    By Daniela on November 22, 2013 at 20:15

    1. Hi Daniela,
      welcome! 🙂

      I hope I can help you out or at least give you some pointers.
      As a general hint: you might google e.g. “mcuoneclipse LCD” and you should get an idea 😉

      LCD: I’m using different LCD types, for some I wrote articles about:

      HD44780 2×16 Character Display for Kinetis and Freedom Board

      Character LCD with 4 Lines

      Zero Cost 84×48 Graphical LCD for the Freedom Board


      I2C: I did similar things to interconnect two boards. I wrote a generic I2C driver, and it features a command line shell. So I can ‘read/write’ using a shell to the other board too if I want:

      A Generic I2C High Level Driver

      CSI Crime Scene Investigation with I2CSpy and Freedom Board

      Ethernet: I have not done much (I wish I would find time), so a gap here.

      SD Card: here I use FatFS with many boards:

      Arduino Data-Logger Shield with the FRDM-KL25Z Board

      FatFs with Kinetis

      Have a look as well at the examples I have published on GitHub here:
      https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples

      I hope this helps (at least as a starter)?

      Like

      By Erich Styger on November 22, 2013 at 20:29

      1. Thank you so much!!! I’m going to read the information of the links and if I’ve any question I’ll let you know 🙂

        Like

        By Daniela on November 24, 2013 at 22:07

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.