MC9S08LL16 Reset signal after power on

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

MC9S08LL16 Reset signal after power on

636 Views
yanbinzhao
Contributor I

I want to program the MC9S08LL16 FLASH using BKGD pin.

Now when I power on the MC9S08LL16, the pin RESET will output an periodical low pulse with width 8.4us , and the gap about 34.8us(43.2-8.4). The attachment IMG_20170111_135006.jpg, IMG_20170111_135024.jpg are related waveforms.  Does anyone know why this happen?

Labels (1)
0 Kudos
2 Replies

458 Views
yanbinzhao
Contributor I

Dear Michael,

Thanks very much for your reply. I have tried to tie RESET to 3V3 power supply. It can pull the line to high level, but I cannot access the MCU neither.

Then I studied the datasheet carefully again, and found some detail information on the BDM(Background Debug Mode).

The MCU I used is MC9S08LL16. I found in the MC9S08LL16 reference manual(MC9S08LL16RM.pdf),  tells as below:

1. RESET pin can only be used to reset into user mode, you can not enter BDM using RESET pin. BDM can be entered by holding MS low during POR or writing a 1 to BDFR in SBDFR with MS low after issuing BDM command.

And I checked my design, and found that I only make BKGD low during RESET pin low. But the BKGD is high during power up.   I have changed my deisgn, and make sure BKGD is low during power up.  Then I release BKGD by register control.  Now after power up, the MCU will not output RESET low pulse again.

So the previous problem is cause by wrong configuration on BKGD during power up.

Thanks very much on your comment.

0 Kudos

458 Views
mfugere
Contributor III

I am not 100% certain on the LL16 because it has shared/multifunction RESET / PTB2 IO pin, but on the MC9S08 devices with dedicated RESET pins, they will all do this when powered up without any program in them.   On the dedicated pin units - the RESET pin has an internal pullup, and can function both as input (reset) as well as pulldown output so other devices could be reset by the cpu if it experiences an internal reset.   When first powered up without any valid code to run, the cpu comes out of powerup reset condition and tries to execute code.  Their is no valid code in flash yet, so it creates illegal instruction exception, which causes a CPU reset.   This will repeat itself over and over until it actually has some valid instructions programmed.

The pullup/output is not very strong, so a programmer device with more drive (current source/sink) capability can  keep it held up or held low to reset it as needed in order to program the device.  If you wanted to use the cpu reset output feature to reset multiple external chips/devices, I would recommend that it be routed to a logic gate with more output capability to handle multiple external chips.

Anyway, I think that this is what is occuring with your chip - I know that this will happen on the MC9S08AC devices that I am using until they are programmed.

Hope this is helpful.

0 Kudos