When to use:
When NOT to use:


33CK256MP508The block is family-aware and chip-aware. It detects the target selected on the Microchip Master block and adapts:
The requested timeout is mapped to the closest value the chip can actually produce (constrained by the postscaler set and clock frequency); the achieved value is reported live in the Effective timeout read-only field.
The WDT and the Deadman Timer are independent (orthogonal) peripherals โ different fuses, different runtime-enable bits, different kick instructions. The block therefore supports:
Two blocks that drive the same physical timer with different settings are a conflict: it is reported live in the Multi-block status field (Advanced tab, shown only when more than one block is present) and stops the build until resolved.
This is a configuration block โ it has no signal ports. It configures fuses at compile time and emits the kick in its own task step function. Place it on a rate at least 2ร faster than the configured timeout.
| Parameter | Variable | Options / Range | Description |
|---|---|---|---|
| Watchdog mechanism | Mechanism | Standard WDT, Windowed WDT, Deadman Timer (DMT) | DMT appears only on chips that have it. Windowed WDT requires the kick inside the open part of the window. |
| WDT clock source | ClockSource | LPRC, FRC 8 MHz, FCY | Visible on dsPIC33C/CK/CH/CDV/A. On 30F/33F/E the WDT clock is always LPRC. LPRC is safest (survives a main-clock failure). |
| Reset period (timeout) | TimeoutChoice | 8 (ms), 16 (ms), 32 (ms), 64 (ms), 128 (ms), 250 (ms), 500 (ms), 1 (s), 2 (s), 4 (s), Custom | Common-value popup with explicit units. Choose Custom to type an exact value in seconds in Custom timeout. |
| Custom timeout (s) | RequestedTimeout_s | seconds (number or workspace expression) | Visible only when Reset period = Custom. Accepts e.g. 0.25, 1/8, Twdt. |
| Effective timeout | EffectiveTimeout_TXT | read-only | Closest achievable period at the current clock + postscaler, with a drift estimate. |
| Window size (% of timeout) | WindowSize | 25%, 37.5%, 50%, 75% | Visible for Windowed WDT on chips with a WDTWIN fuse. The kick is rejected before the window opens. |
| On WDT timeout | FailureMode | Reset, Generic trap (interrupt) | dsPIC33A only. Generic trap routes the timeout through INTCON5.WDTE (vector 28) instead of a reset. |
| DMT count (instructions) | DMT_Count | 1 โฆ 2ยณยฒโ1 (number or expression) | DMT mode. Instruction-fetch count before a DMT event. |
| Approx. period at current Fcy | DMT_EffectivePeriod_TXT | read-only | Shows the DMT count and the approximate time it corresponds to at the model’s Fcy (derived automatically from the Master clock). |
| DMT window (instructions, 0 = no window) | DMT_WindowCount | 0 โฆ 2ยณยฒโ1 | DMT mode. Below this count a kick is rejected (deadman window). 0 = no window. |
| Block sample time (clear timeout) | SampleTime | seconds, -1 = inherited | Rate at which the kick fires. Ignored when Configure only is checked. |
| Parameter | Variable | Description |
|---|---|---|
| Configure only (do not kick) | NeverClear | off / on |
| Bypass coherence check (advanced) | BypassCoherenceCheck | Allow compile to proceed even when the coherence check fails (block period vs. timeout). Use only when your refresh strategy is unusual (e.g. multi-block kicks). Hidden when Configure only is on. |
| Multi-block status | MultiBlockStatus_TXT | Read-only. Shown only when the model has more than one Watchdog/DMT block. Reports OK for parallel WDT+DMT (or identical duplicates) or CONFLICT when two blocks drive the same timer with different settings (the build stops until resolved). |
When the block kicks (i.e. Configure only is off), it compares the block sample time Tb to the effective timeout Tw:
Tb โฅ Tw โ fail (the device will reset before the next kick)Tw/Tb < 2 โ warning (less than 2ร margin โ intermittent resets likely)Tw/Tb โฅ 10 โ safeFor Windowed WDT (and DMT windows) the check also verifies the kick lands after the window opens. The check is non-blocking at the dialog (it warns) and is re-verified during code generation.
| Family | WDT timeout | DMT timeout |
|---|---|---|
| dsPIC30F / 33F / 33E (non-EV) | device Reset (RCON.WDTO) | โ (no DMT) |
| dsPIC33EV | device Reset | hardware Reset on count match (no IRQ) |
| dsPIC33C / CK / CH / CDV | device Reset | IRQ on vector 45 (DMTInterrupt); without a user ISR the default handler resets (RCON.IOPUWR) |
| dsPIC33A / AK | Reset, or generic trap on vector 28 (INTCON5.WDTE) | non-maskable trap via INTCON5.DMTE (COMMONInterrupt, vector 0) |
For trap / IRQ outcomes, the block publishes the relevant entry through MCHP_USER_INTERRUPTS so an Interrupt
block can aggregate the handler.
FWDTEN/WDTEN, RWDTPS/SWDTPS or WDTPRE/WDTPOST, WINDIS, WDTWIN, RCLKSEL, WDTRSTEN for WDT; DMTDIS, DMTCNTL/H, DMTIVTL/H for DMT). No manual fuse editing is required.WDTCONLbits.ON (33C) / WDTCONbits.ON (33A) / RCON.SWDTEN (legacy) for WDT; DMTCONbits.ON for DMT, emitted at Start.__builtin_clrwdt() (WDT) or the DMTPRECLR = 0x...; DMTCLR = ... 2-step clear (DMT), emitted every step at the block’s rate. Suppressed when Configure only is on.A running watchdog is incompatible with External Mode “wait for host to
start the application” (OnTargetWaitForStart = on). In that mode the
target blocks โ for an unbounded time โ waiting for Simulink to send the start
packet before the first model step, so the watchdog cannot be refreshed and
would reset the target. The code generator stops the build with a clear
error in this case. To use External Mode with a Watchdog/DMT in the model,
either:
(Normal External Mode without the wait-for-start option runs the model immediately, so the watchdog is serviced by the model steps and there is no conflict.)
mdl = 'my_model';
add_block('MCHP_Blockset/System Configuration/Microchip Master', [mdl '/Master']);
add_block('MCHP_Blockset/System Functions/Watchdog_DMT', [mdl '/WDT']);
set_param([mdl '/WDT'], 'Mechanism', 'Standard WDT');
set_param([mdl '/WDT'], 'TimeoutChoice', '1 (s)');
set_param([mdl '/WDT'], 'SampleTime', '0.1'); % kick 10x per timeout
% Watchdog for wall-clock missed-deadline recovery ...
add_block('MCHP_Blockset/System Functions/Watchdog_DMT', [mdl '/WDT']);
set_param([mdl '/WDT'], 'Mechanism', 'Standard WDT', 'TimeoutChoice', '1 (s)');
% ... plus a Deadman Timer for instruction-fetch monitoring. Both run in
% parallel (orthogonal peripherals, disjoint fuses).
add_block('MCHP_Blockset/System Functions/Watchdog_DMT', [mdl '/DMT']);
set_param([mdl '/DMT'], 'Mechanism', 'Deadman Timer (DMT)', 'DMT_Count', '2000000');
% Enable the WDT here, but emit no CLRWDT in this block. A different block
% (or hand-written C) is responsible for refreshing it. 'Configure only'
% lives on the Advanced tab.
set_param([mdl '/WDT'], 'Mechanism', 'Standard WDT', 'TimeoutChoice', '500 (ms)');
set_param([mdl '/WDT'], 'NeverClear', 'on');
| Family | WDT | Windowed WDT | DMT |
|---|---|---|---|
| dsPIC30F | โ (FWPSA/FWPSB prescalers) | โ | โ |
| dsPIC33F | โ | โ (fixed 50%) | โ |
| dsPIC33E / EP | โ | โ (WDTWIN) | โ |
| dsPIC33EV | โ | โ | โ (hardware reset) |
| dsPIC33C / CK / CH / CDV | โ (selectable clock) | โ | per-chip (probed via DMTDIS / DMTCON) |
| dsPIC33A / AK | โ (Reset or trap) | โ | per-chip (many 33AK have no DMT) |
| SAM / PIC32MK / MX / MZ | โ (block inert) | โ | โ |
Note โ not every dsPIC33C/33A variant has a Deadman Timer. The block probes the chip database; when DMT is absent the mechanism popup omits the DMT choice.
RCON) on boot to distinguish a watchdog reset from POR/BOR/MCLRMCHP_USER_INTERRUPTS