MC9S08SH8 ACMP output and BKGD pin

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

MC9S08SH8 ACMP output and BKGD pin

2,195 Views
dismirli
Contributor I
Hello, I am willing to use the MC9S08SH8 in a project. I need to enable the ACMP output (ACMPO pin) so that I can add more hysteresis to the comparator. However, this MCU shares this pin with the BKGD pin. My question is: can I use the BDM pod and the ACMPO functions simultaneously? That is, will the ACMPO interfere with the BDM functions? How should I design my circuit so that I can debug it and retain ACMPO functionality?
 
Any suggestions/help are greatly appreciated. Thanks in advance.
 
Diego.
Labels (1)
0 Kudos
5 Replies

448 Views
bigmac
Specialist III
Hello Diego,
 
It would appear that you will need to forego the nicety of the extra hysteresis for the comparator, during your debug sessions.  Can this be accommodated, in your case?  I assume that the only connection to the pin, aside from the BDM header, is a resistor.  This may need to be disconnected during debug only if it detrimentally affects the comparator operation.
 
Regards,
Mac
 
0 Kudos

448 Views
dismirli
Contributor I
Mac, I need a comparator with hysteresis as the last component of my analog frontend, so I need the feedback resistor between ACMPO and ACMP+. Also, I need BDM to (at least) load the MCU's flash, so I need the BKGD pull-up. I think the only choice I have is to leave room for the two resistors, and choose (with jumpers for example) if each resistor is connected or not. Also, can I use BDM without the external pull-up (although the manual states the pull-up is recommended)? It is now clear, though, that I can't use BDM and the analog comparator at the same time.
 
Any suggestions are welcome.
Thanks a lot.
 
Diego.
0 Kudos

448 Views
bigmac
Specialist III
Hello Diego,
 
I suspect that the pullup resistor required for BDM operation should not affect the comparator output too much, but you would need to check that the comparator output low state is at satisfactory voltage level.  I was more concerned that the BDM signal would fluctuate the comparator threshold. during debug, and affect your testing.
 
In my previous post, I was alluding to whether you could do useful testing without the extra hysteresis on the comparator.  Obviously, for normal operation the hysteresis would be present.
 
Another possibility might be to construct a "jig" specifically for test and debug purposes, and use an external comparator, with suitable hysteresis, for your test signal.  The output of the external comparator would be fed directly to the input of the internal comparator.  Under these test conditions, the feedback resistor for the internal comparator would probably not need to be disconnected during debug.
 
Regards,
Mac
 
0 Kudos

448 Views
RickN
Contributor I
Hi Diego,
 
   Unfortunately this pin is shared by AMCPO and BKGD, as you noted.  You cannot use both at the same time.  I would develop as much code as possible with BKGD enabled, and then keep going with BKGD disabled (SOPT1[BKGDPE] = 0).   You can toggle an LED, use a scope, DVM, or a GPIO to debug your application without the benefit of the Multilink BDM.   It isn't as easy, but with low pin count packages you end up with pin multiplexing.
 
   You program the MCU with the Mulitlink BDM, then remove the 6 pin BDM connector, and run your test.  Then you have to reconnect the Multilink BDM and cycle power on the MCU a couple of times to allow the Multilink BDM to regain control over the MCU so you can reprogram it.  A bit more time consuming, for sure.
 
   Thanks,
 
   Rick
0 Kudos

448 Views
dismirli
Contributor I
Thanks a lot for your answer, Rick. It seems I'll have to do as you suggest.
 
Diego.
0 Kudos