How to prevent the system from freezing before the watchdog task

We are using an embedded system based on ARM AM1808 with rtos and file system. We use the C language. We have a watchdog timer implemented inside the application code. So, whenever something happens in the application code, the watchdog takes care of the system.

However, we encounter a problem when the system freezes before starting the watchdog task. The system freezes because the file system code is poorly encoded with so many while loops. And sometimes due to bad NAND (or at least the file system code thinks it's bad) the code hangs in a while loop and never exits. And what we get is a dead board.

So, the point of providing all the information is to ask you if there is any mechanism that can be implemented in code that runs before the application code? Are there hardware gatekeepers? What steps can be taken to make sure that we are not getting a dead board caused by some while loop.

+4
source share
2 answers

Professional embedded systems are designed as follows:

  • Select an intermittent MCU with a built-in watchdog. This is standard for all MCUs.
  • Implement the following steps from within the interrupt vector reset.
  • If the MCU memory is easy to configure, for example, simply by setting the stack pointer, do this primarily from reset. This allows programming in C.
  • - MMU - , , , C.
  • , , .
  • , . , out-of- reset LVD MCU .
  • , GPIO . MCU , . , reset , , ESD.
  • MMU, .
  • "CRT", .data .bss.
  • main().

, MCU ! , "" , . , , , :

  • , , / , "CRT" .
  • .data .bss , , , RC- .

, - -, ARM CMSIS, MCU. .

+3

, . ARM AM1808 , , : www.ti.com/lit/ds/symlink/am1808.pdf. , , , , . , , . .

+1

Source: https://habr.com/ru/post/1691207/


All Articles