• AVR Freaks

Hot!How to enable deadman timer in Harmony

Author
dobrosoft
Starting Member
  • Total Posts : 76
  • Reward points : 0
  • Joined: 2019/05/20 04:44:55
  • Location: 0
  • Status: offline
2020/01/30 03:01:10 (permalink)
0

How to enable deadman timer in Harmony

How can I enable deadman timer in harmony? PIC32MZ, Harmony v2.06
 
I can use deadman with registers, but when using:
 
PLIB_DMT_Enable(DMT_ID_0);
 
I'll get compile error - error: 'DMT_ID_0' undeclared (first use in this function)
 
It's true - because watchdog is possible to initialise in harmony - System services / WDT, but deadman I cannot find in harmony configurator tree. How to enable it?
 
#1

2 Replies Related Threads

    moser
    Super Member
    • Total Posts : 557
    • Reward points : 0
    • Joined: 2015/06/16 02:53:47
    • Location: Germany
    • Status: offline
    Re: How to enable deadman timer in Harmony 2020/01/30 05:45:54 (permalink)
    0
    Did you include "peripheral/peripheral.h" ? This should include "peripheral/dmt/plib_dmt.h", which includes other stuff, which includes depending on your processor the correct "dmt_p32mz??????????.h", which has the definition for DMT_ID_0.
     
    Btw, note, that DMT and WDT can also be enabled permanently by hardware. You can find this in MHC at
    "Device & Project configuration" > "[???] Device Configuration" > "DEVCFG1".
     
    #2
    dobrosoft
    Starting Member
    • Total Posts : 76
    • Reward points : 0
    • Joined: 2019/05/20 04:44:55
    • Location: 0
    • Status: offline
    Re: How to enable deadman timer in Harmony 2020/01/30 06:42:02 (permalink)
    0
    Thank you, it works!
     
    But I don't understand to principle - when I use Watchdog timer - I set in harmony - System services / WDT, and libraries are included. Then I can use it.
     
    But for deadman - there is no any harmony subtree. Only enabling Deadman in DEVCFG1 not works. System not known DMT_ID_0.
    When I manual include - #include "peripheral/peripheral.h"
     
    Then it works.
    Harmony has more problems like above..
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5