Analog watchdogs in SPC5604P "Pictus"

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

Analog watchdogs in SPC5604P "Pictus"

785 Views
italiandoh
Contributor III

Hello,

I'm planning to use the "4 analog watchdogs with interrupt capability for continuous hardware monitoring of as many as 4
analog input channels" feature of the SPC5604P. The microcontroller reference manual reports the following:

 

The analog watchdogs are used for determining whether the result of a channel conversion lies within a
given guarded area. After the conversion of the selected channel, a comparison is performed between the converted value and
the threshold values. If the converted value lies outside that guarded area then corresponding threshold
violation interrupts are generated. For each input channel an output bus is used to signal outside the result of the comparison generating modulated pulse waveforms based on the converted analog values received by the analog watchdogs.


Now here comes my questions:

  • what pins are used to generate such waveforms? I couldn't find this info anywhere in the documentation.
  • can this waveform generation be disabled? I only need the associated interrupt routine to do some counting.
  • anyone tried to dynamically adjust the threshold values by resetting them in the violation ISR?

Anyone has experience with this?

Thanks,

 

Matteo

 

0 Kudos
4 Replies

484 Views
TomE
Specialist II

Well spotted.

 

Please submit a Technical Request on this. You can include my findings if they help.

 

The "24.3.5.2 Analog watchdog pulse width modulation bus" documents this "feature" but there's no mention of it anywhere else.

 

So either the chip has this feature and they forgot to document it or the chip doesn't have that feature and section "24.3.5.2" is an accidental cut-and-paste from the chapter documenting the chip that does have that feature.

 

So search on Freescale for "Analog watchdog pulse width modulation bus" and get matches for:

 

MPC5668XRM : MPC5668x Reference Manual (pdf)
MPC5668x Reference Manual

 

MPC560XPRM : MPC5604P Reference Manual (pdf)
The MPC5604P microcontroller is built on the Power Architecture® platform and targets chassis and safety market...

 

MPC5602PRM : MPC5602P Microcontroller Reference Manual (pdf)
The MPC5602P microcontroller is built on the Power Architecture® platform. The Power Architecture based 32-bit...

 

PXN20RM : PXN20 Microcontroller Reference Manual (pdf)
PXN20 Microcontroller Reference Manual supporting the following devices: PXN2020 and PXN2120.

 

In the PXN20RM manual, the equivalent for "Table 24-9. Example for Analog watchdog operation" is "Table 34-44. Example for ad_awpwm_o Operation" and documents the "Output" pins as being "AD_AWPWM(n)", which is more promising. Except that there are no matches for "AD_AWPWM" anywhere else in that manual but for that section.

 

Searching Freescale for "AD_AWPWM" finds matches in the PXN20 and the MPC5668XRM. Checking that manual shows the same problem. The only mention of "AD_AWPWM" is in the equivalent section.

 

Ditto for the MPC5602. Mention of "threshold output pin" but no obvious documentation on what pin that is. Searching for "threshold output pin" gets the usual suspects (the four above) plus the MPC5645SRM and MPC5606SRM. I suggest you search through them as I'm giving up here.

 

What I've been doing here is checking the "evolutionary tree" of this chip and its associated documentation. Chips are made by cutting and pasting different modules together, and the manuals for these chips are made the same way. Sometimes there's leftover "junk DNA" in the manuals. This may be an example of that.

 

If you've got a Freescale Rep then you should send this information to them. Our rep has been far better at getting answers to tricky problems than the "Tech Requests", but you should pursue all avenues.

 

Tom

 

0 Kudos

484 Views
italiandoh
Contributor III

Hi Tom,

thanks for your input. I will contact our local Freescale field application engineer about this matter and report back here with my findings.

Bye,

 

Matteo

0 Kudos

484 Views
TomE
Specialist II

Download and read AN3836 "Advanced Headlights Control and Diagnostics Using the Cross-Triggering Unit between PWM and ADC Channels on MPC560xB/C Microcontrollers".

 

It details the application these chips were designed for.

 

Which is to PWM external and internal light bulbs (especially headlights) on cars.

 

For high power lights it is necessary to run the ADC channels synchronous with the PWM channels to measure the current during the PWM on-time. That's why these chips can trigger ADC conversions from the PWM hardware. This is to detect overloads, shorts or to handle bulb warmup. This is difficult to do without this coupling. Neat design.

 

The App Note states:

 

Four analog watchdogs are present on the ADC peripheral to determine whether the converted channel value lies within a given guard area specified by threshold values given by the user. If the converted value lies outside the guarded area, an interrupt is generated. The analog watchdogs interrupts are well-suited for light bulb diagnostic purposes.

 

What you've found in the documentation is a "extra feature" that would allow an alarm condition to directly override the corresponding bulb PWM output when the overload happens rather than requiring the CPU interrupt to work out what happened and then disable the PWM channel. That's why the output controls refer to PWM channels. That's also why the watchdog can force the PWM pin into a high or low state - depending on what the active output state for the switch is.

 

Neat idea. I wonder what chips this feature is in.

 

Tom

 

0 Kudos

484 Views
italiandoh
Contributor III

About this issue, Freescale reported the following:

 

"the WDG PWM feature to signal out the comparison results on Pads was not used for Pictus512K Device because the Port ad_awpwm is not connected to Padring."

So to confirm, the only notification of watchdog result will be in the watchdog interrupt status register.”

 

Matteo

0 Kudos