1 Reply Latest reply on Jul 21, 2020 9:49 PM by JeetendraA_51

    Test of WatchDogTimer for CY8CKIT145-40XX

    YoIs_1298666

      Hello,

       

      This sample project is for testing WDT.

      I assume three types of runaway.

      1. Hard fault occurs because of Undefined instruction on RAM address 0x20000a00 then Execution of an Undefined instruction

      2. Infinite loop on RAM address 0x20000a00

      3. Jump to the area padded to 0x0000 of FLASH and execute NOP to the end of FLASH.

       NOP execution from FLASH address 0x6800 to 0x7fff then Execution of an instruction from an XN memory address

       

      The hardware fault handler CY_ISR(IntDefaultHandler) is in Cm0plusStart.c.

       

      The hardware configuration is as follows.

      LED11 blinks when WDT is cleared. When a reset occurs in WDT, LED9 is turned on for 10ms only.

      When a reset occurs, the last byte of the array uint8 InitParameter[128] of raw unit located at address 0x1000 of FLASH memory is incremented.

      To place the array uint8 InitParameter[128] at address 0x1000 in FLASH, "-Wl,--section-start=.FlashData=0x00001000" must be described in the Commander of Linker.

       

      Please enable one of the following defines.

          #define UndefInst              // Undefined instruction on RAM address 0x20000a00 then Execution of an Undefined instruction

          #define InfiLoop                // Infinite loop on RAM address 0x20000a00

          #define NopExecut           // NOP execution from FLASH address 0x6800 to 0x7fff then Execution of an instruction from an XN memory

                                                       address

       

      Best regards,

      Yocchi