| BlueNRG-1 HAL drivers APIs

- Main Page
- Classes
- Files

- File List
- File Members

Macros | Functions | Variables
crash_handler.h File Reference

This header file defines the crash handler framework useful for application issues debugging. More...

`#include <stdint.h>`
`#include <string.h>`

Go to the source code of this file.

## Macros

#define | NMB_OF_EXCEP_RAM_WORD 10
| Number of word for the Exception RAM Locations. More...
#define | CRASH_INFO_BASE_ADDRESS 0x20000008
| Base address to store the Crash Information. More...
#define | CRASH_RAM_SIZE 40
#define | ASSERT_SIGNATURE 0xBCEC0000
| Signature Information: ASSERT_SIGNATURE. More...
#define | NMI_SIGNATURE 0xBCEC0001
| Signature Information: NMI_SIGNATURE. More...
#define | HARD_FAULT_SIGNATURE 0xBCEC0002
| Signature Information: HARD_FAULT_SIGNATURE. More...
#define | WATCHDOG_SIGNATURE 0xBCEC0003
| Signature Information: WATCHDOG_SIGNATURE. More...
#define | GET_CRASH_INFO(PTR)
| Get Crash Information utility. More...
#define | CRASH_HANDLER(signature)
| Macro to store in RAM the crash information. More...
#define | ASSERT_HANDLER(expression)
| Macro to store in RAM the register information where an assert is verified. More...

## Functions

typedef | PACKED (struct) crash_infoS
| Typedef for the overall crash information (stack pointer, programm counter, registers, ...) More...

## Variables

| crash_info_t

## Detailed Description

This header file defines the crash handler framework useful for application issues debugging.

Author
  AMS - VMA RF Application team

Version
  V1.1.0

Date
  25-November-2016

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2015 STMicroelectronics

Definition in file crash_handler.h.

## Macro Definition Documentation

#define ASSERT_HANDLER | ( |  | expression | ) |

Macro to store in RAM the register information where an assert is verified.

All the information stored are words (32 bit):

- Assert Signature
- SP
- R0
- R1
- R2
- R3
- R12
- LR
- PC
- xPSR

Definition at line 154 of file crash_handler.h.

#define ASSERT_SIGNATURE 0xBCEC0000

Signature Information: ASSERT_SIGNATURE.

Definition at line 42 of file crash_handler.h.

#define CRASH_HANDLER | ( |  | signature | ) |

Macro to store in RAM the crash information.

All the information stored are words (32 bit):

- Crash Signature
- SP
- R0
- R1
- R2
- R3
- R12
- LR
- PC
- xPSR

Definition at line 96 of file crash_handler.h.

#define CRASH_INFO_BASE_ADDRESS 0x20000008

Base address to store the Crash Information.

Definition at line 36 of file crash_handler.h.

#define CRASH_RAM_SIZE 40

Definition at line 37 of file crash_handler.h.

#define GET_CRASH_INFO | ( |  | PTR | ) |

Value:
{ PTR = *(crash_info_t *)CRASH_INFO_BASE_ADDRESS; \
memset((void *)CRASH_INFO_BASE_ADDRESS, 0, CRASH_RAM_SIZE);}
crash_info_t
crash_info_t
Definition: crash_handler.h:77
CRASH_RAM_SIZE
#define CRASH_RAM_SIZE
Definition: crash_handler.h:37
CRASH_INFO_BASE_ADDRESS
#define CRASH_INFO_BASE_ADDRESS
Base address to store the Crash Information.
Definition: crash_handler.h:36

Get Crash Information utility.

Definition at line 60 of file crash_handler.h.

#define HARD_FAULT_SIGNATURE 0xBCEC0002

Signature Information: HARD_FAULT_SIGNATURE.

Definition at line 50 of file crash_handler.h.

#define NMB_OF_EXCEP_RAM_WORD 10

Number of word for the Exception RAM Locations.

Definition at line 31 of file crash_handler.h.

#define NMI_SIGNATURE 0xBCEC0001

Signature Information: NMI_SIGNATURE.

Definition at line 46 of file crash_handler.h.

#define WATCHDOG_SIGNATURE 0xBCEC0003

Signature Information: WATCHDOG_SIGNATURE.

Definition at line 54 of file crash_handler.h.

## Function Documentation

typedef PACKED | ( | struct |  | ) |

Typedef for the overall crash information (stack pointer, programm counter, registers, ...)

Definition at line 66 of file crash_handler.h.

## Variable Documentation

crash_info_t

Definition at line 77 of file crash_handler.h.