AnsweredAssumed Answered

Possibilities of burning firmware to MC9S12C64

Question asked by Radu Bunea on Aug 23, 2013
Latest reply on Aug 28, 2013 by Radek Sestak

Hello everybody,

Please bear my lack of knowledge. I am HW engineer, and I am not very familiar with microcontroller programming. I have several questions (or maybe just clarifications) regarding a project I am working on.

Well, the facts: I am now developing the schematic in which I will use MC9S12C64. The problem is burning the firmware, but I also want to understand how the boot sectors work. The micro comes blank, I have the s19 file with the firmare and a pc executable which writes the firmware through serial connection. From what I have read, I understood that there are two ways of writing the SW:

1. Use a BDM and write directly the s19 file. How is this done? Can I just load the file in CodeWarrior and hit a burn button?
2. The harder way, which I have seen others used more: use a BDM and burn a serial monitor, then burn the firmware through the serial connection using the provided firmware uploader. This is the way I would prefer, but here I have more questions. I do not know how a bootloader works. After burning the serial monitor with a BDM ( I will build a TBDML, it's easy), for writing the firmware I must close the bootstrap jumper. (Does this tell the micro to load the memory address of the serial monitor?). Then start the firmware loader sw and that's all. Seems simple and efficient as I don't want to open the case for every re-flashing. Did I understand this procedure correct?

I have read that the serial monitor and the firmware must not share the serial connection, but in this application, the firmware will use the serial connection all the time for communication. Does the SM have a special area in the memory, and when the bootstrap jumper is out, it is not loaded at startup?


Next on the list: I have found the application note for the serial monitor, AN2548, with the attached CW projects. I have no knowledge on how to use that source code. Do I just open it in CW, compile it or something and it results an S19 file I can burn with the BDM? Why isn't provided the compiled file directly? Is there anything specific I must program there, as form the AN I saw it is the same code for all HCS12 family of microcontrollers.


Now, the last question, partly related to the previous one: I also have another CW project archive. How can I burn the sw to the micro? Open in CW, compile and use the BDM to write it?


Please excuse the low technical level of the problems, these might be common-sense for developers, but for me everything is new and complicated (remember I am HW engineer with minimal programming or microcontroller knowledge). I might try later on to start understanding more on the microcontroller programming, but now I am just trying to make a product work, having everything at hand.