MC9S08QD4 production programming question

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MC9S08QD4 production programming question

4,071 次查看
MikeB
Contributor I
Hi,

We are developing a simple product based on this chip. We're using the Demo9s08QD4 board's BDM port to program our devices in circuit. This works fine using the Codewarrior IDE and the tools which were supplied with the demo board.

To minimise costs, we are hoping to be able to use the demo board to perform production programming since ours is a low volume product at the moment. It seems that we could use Burner.exe in batch mode to do the programming, but it is not clear how we would trim the clock in this scenario. It looks as if some process in Codewarrior or the P&E tools is doing this automatically, but that's not absolutely clear. In any event, we would need to be able to do this under program control in production.

I would be very grateful if someone could clarify exactly what is happening in the IDE when code is downloaded and explain if the trim is happening or values are just being copied from the protected area in flash, and explain if the trim can be performed under program control with the tools we have.

Many thanks for any help and my apologies if I have failed to find the answer in an obvious place.

Mike.
标签 (1)
0 项奖励
回复
11 回复数

2,134 次查看
Ake
Contributor III
Hi,
To program a 9S08 MCU, it should be soldered on the production board.
To insert it in another socket, burn it, and then hoping that the MCU pins are still flat, is begging for trouble.
So the solution is to put the BDM connector on the board.
If the volumes are small, use a real connector, if it is large, use soldering pads where a special connector can be inserted.
 
For production, use eg the P&E Cyclone PRO, which can be used as a simple push-one-button-to- program equipment.
 
If you want to change the calibration value in the 9S08, (they are calibrated in the factory) check the AN2312. It talks about how to calibrate the internal oscillator on the HC908QY device, but it can be used for the 9S08 also.
 
Regards,
Ake
0 项奖励
回复

2,134 次查看
MikeB
Contributor I
Hi,

Thanks for the reply. We are programming the chip in-situ but using the BDM port on the demo board to do this.

I have come across several ap notes describing the trim process from the point of view of code running on the chip, but not from the production point of view. Perhaps I was not very clear in my original post.

It seems as if Codewarrior may trim the oscillator as part of the code download, but that's not absolutely clear. Does it do this, or does it just save and restore the two trim bytes during the erase/re-programming process? For a production process, I guess we'd have to write a RAM-resident program to implement one of the suggested trimming algorithms, download and run this, somehow extract the result, embed this in the firmware flash image and then flash the chip. If this process is already implemented in Codewarrior (or the P&E tools), it would be nice to use it.

I know that it is possible to use Burner.exe in batch mode to program the chips, but I can't see any reference to calibrating the trim value via Burner. Given that Codewarrior seems to handle trimming, it would be nice to able to use the same routines for our initial production but in a more automated way.

If it turns out that this is not possible, then certainly we'll look at the P&E Cyclone PRO, but first I want to understand what we can do with the tools we have.

Thanks again for your input.

Mike.
0 项奖励
回复

2,134 次查看
peg
Senior Contributor IV
Hi Mike,

The P&E components of Codewarrior do the trimming. It is done with a combination of resources, your device the BDM adapter and software.
It is done in two steps, first the appropriate value is calculated, this is done when the BDM/software connects to the device. You can see the result of this if you connect using " expert programming mode". Secondly the trim value is written into the NV location by giving the PT command to the programming software.
I don't know how to do this with Codewarrior however, I use the standalone software from P&E. It is essentially what you get within Codewarrior but more. It has a seperate programme that allows you to "drive" the programmer from a script, this part is not in Codewarrior (or it is well hidden).
If you work out how to do this from within Codewarrior, be sure to let us know.

0 项奖励
回复

2,134 次查看
fabio
Contributor IV
In Codewarrior, the internal oscillator trim is enabled by the "Calculate Trim and Program the Non-volatile Trim Register" option, in the Advanced Options of the MultilinkCyclonePro main menu item.

Some devices allow customizing the clock in this window (in CW 6.0, QD4 does not allow customizing the clock).

Best regards,

0 项奖励
回复

2,134 次查看
peg
Senior Contributor IV
Hi Fabio,
What you have said, is I believe, correct. However the OP was trying to automate this process via burner or something else, not one at a time via the full IDE.

0 项奖励
回复

2,134 次查看
MikeB
Contributor I
Thanks for the replies. I am still a little confused. I cannot see Advanced Options in the MultilinkCyclonePro main menu in Codewarrior (I have V5.1); is this something that appears if you are using the Cyclone Pro? I do not (yet) have this. I am trying to find out if I can automate the programming of our units via the Demo9S08QD4 board. It would be nice (and inexpensive!) to be able to do this and it does seem that Codewarrior itself can do it, but not under the control of an external program.

I am coming to the conclusion that I need to buy the Cyclone Pro to achieve automation. is that right?

Mike.
0 项奖励
回复

2,134 次查看
peg
Senior Contributor IV
Hi Mike,

You need to be connected through your BDM to the target in order for all the menu options to be visible.

The Cyclone pro, as far as I am aware, provides automation from within itself rather than enabling anymore to be done via CW.

0 项奖励
回复

2,134 次查看
MikeB
Contributor I
Hi Peg,

I have the demo board connected via USB. At present, my target chip is in the DIP socket on the demo board, but I think that's equivalent to connecting the BDM port to my target. The MultilinkCyclonePro main menu is present in the 'True Time Simulator and Debugger' window, but I can't see any 'Advanced' option or any reference to trim under any of these menus. I can't see a MultilinkCyclonePro menu in the Codewarrior window itself.

Many thanks for your help. I'm sorry if these are basic questions. I do appreciate your time in helping me come up to speed.

Mike.
0 项奖励
回复

2,134 次查看
CrasyCat
Specialist III
Hello
 
- Which version of CodeWarrior are you using?
  To retrieve that info:
  - Start CodeWarrior
  - Select Help -> About Freescale CodeWarrior
  - Click on "Install Products"
  - CodeWarrior version used is displayed on top in the Installed Products dialog.
 
You may be using a pretty old version of the tool, where the Expert Mode was not available.
 
Perhaps the solution here would be to download and install the latest CodeWarrior for HC08 release.
 
CrasyCat
0 项奖励
回复

2,134 次查看
MikeB
Contributor I
I have V5.1, as I mentioned above. I have started downloading 6.1...

Mike.
0 项奖励
回复

2,134 次查看
MikeB
Contributor I
Hmm. Still using V5.1, I have now found the Advanced menu. Can't think why I couldn't see it before. Must be going blind.

Still, this does not take me any further on my real job of automating the programming outside of the IDE.
0 项奖励
回复