Problem with MC9S08DZ60 entering BDM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with MC9S08DZ60 entering BDM

699 Views
xDeto
Contributor I

Hello,

I am having a problem programming MC9S08DZ60. What is causing the problem in entering the BDM I suppose is the Capacitance of the Line cause I use a fairly long cable in a noisy environment.

In Application Note AN2727, its is a different family but the approach is the same, it is refered that 

t = R * C, where C is the nominal capacitance of the Line (100pf) and t is the 1/5 of the Communication Pulse width and R is the Resistance of the Line.

It is not easy to change the Installation Cabling sa changing the other two parameters woulb be better.

The Resistance could be changed by putting a pull up resistor between the BKGD pin and the Voltage Supply.

What I wanted to know is how can I change the frequency of the BDM communication thus increasing the t.

There are some programmers that put an external clock to the processor but in my pcb I already have an external oscillator of 8Mhz.

It seems that the communication now is made with a frequency of 24MHz.

One more thing to consider is that the microprocessor will be programmed for the first time.

In case the cabling has to be changed, what implementation would you purpose. For ow shielded ribbon cable is used but I think coaxial cable would have less capacitance and less interfearence.

thank you.

Labels (1)
0 Kudos
5 Replies

405 Views
bigmac
Specialist III

Hello, and welcome to the forum.

 

While the operating environment for the equipment may be noisey, I would normally expect the programming and debugging environment not to be problematic, i.e. within factory or laboratory.

 

The BDM connection to the MCU (a 6-pin header) should be physically located in close proximity to the MCU.  The connection to the header should be required only during the programming and debug sessions.  There should be no connection at other times, and the header should be physically protected from the possibility of static discharge into the MCU pin(s).

 

The USB Multilink interface typically provides a ribbon cable lead of about 250mm length.  I would be cautious about using a substantially greater cable length.  I have not specifically checked, but it is possible that coaxial cable may have higher capacitance than the ribbon cable.

 

Do you currently meet these basic conditions?  In this context, I do not know what you mean by "installation cabling".

 

Regards,

Mac

 

0 Kudos

405 Views
xDeto
Contributor I

Thank you for your response,

By installation cabling I was meaning the platform build to host the PCBs with the MCUs to be programmed and the Cabling from the Flash Programmers to the PCBs. In most of the cases approximately 5 MCUs are to be flashed simultaneously. There is an interface so as the Flash programmers to be connected to the PCBs using custom shielded ribbon cable mostly. The total length of the cable used is approximately 0.7m.  The cable used is not one piece. Some connectors are used to connect with ribbon cables the programmer to the BDM header.

 

It was noticed that this family of mcu's has this problem and to be more specific 10% of them fails in the tests in a random way. If they fail they always fail except if programmed with a smaller cable and seperately in the lab.

I made some test with different pull up resistors and put custom capacitance in a "short line" trying to mimic a line with higher capacitance. Using high capacitance communication was not achieved and with a smaller one the MCU could not verify the data, probably one way communication problems. Using smalled values of resistance allowed the flashing to have a success and actally broaden the limits of the capacitance in the line.

 

I have seen in some application notes that there is a limit on the pull up resistors used, for example 600 Ohms. Using a smaller one could possibly cause any problem to the programmer or mcu?

 

Using Twisted Pair in the internet I fould a calculator saying that the capacitance is 18.7pf/inch which seems really big, and for a coaxial cable it was 2.3pf/inch. this values was for the cables that we have in the laboratory.

 

Thank you very much.


0 Kudos

405 Views
xDeto
Contributor I

Actually I would like to stay to my initial question. How I can change the Speed of the BDM Communication speed for a microcontroller who is never flashed before and the the first command that it will receive is a mass erase.

Thank you very much.

0 Kudos

405 Views
kef
Specialist I

To change background controller frequency (CLKSW bit in BDC registers, which is not accessible to CPU08 code), you first need to establish connecion at current BDC frequency... Since fresh not programmed parts operate in FEI mode, you can't do anything, BDC clock is about 8MHz-9MHz for S08D. On programmed parts you can reduce operating clock, which would lower also BDC clock.

I agree with Mac, it is not a good idea to make installation with long BDM cables. Instead you should program your MCUs with bootloader and use RS232, CAN or something else to send debugging messages, diagnostics data, and to replace application frirmware when needed.

0 Kudos

405 Views
xDeto
Contributor I

Actually I am trying to pass a bootloader. So changing the BDC clock before the "real" BDM communication is not possible.

I know that Longer cable is always to be avoided but cannot be done in this case.

It is the factor t = RC that affects the communication and wanted to minimize whatever could be minimized.

Thank you very much for your replies.

 

0 Kudos