This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Biref description about "DEADBEEF" how it is used & where

hi, I am fresher starting my carrier in ASIC i am learning about UART where i come across with the word "DEADBEEF" in the coding please help me with where it is used and how it is used, what it means in well understanding way.

Parents
  • Hey Subashini,

    The hexadecimal number 0xDEADBEEF is used to indicate that something is very wrong in the system. It can be used as a return code from a function, general error code, or as an address. If the CPU jumps to the address DEADBEEF you know that there has occurred an error. This is mostly useful when debugging assembly code as the address easily sticks out from regular application code. The same is true for the hex numbers DEADCODE, BADDCAFE, CAFEBABE, etc. 

    In our case we use DEADBEEF as an error code that signifies that the SoftDevice has asserted an error. Usually this is passed to app_error_handler along with the line number and file that asserted.

    Cheers,

    Håkon.

Reply
  • Hey Subashini,

    The hexadecimal number 0xDEADBEEF is used to indicate that something is very wrong in the system. It can be used as a return code from a function, general error code, or as an address. If the CPU jumps to the address DEADBEEF you know that there has occurred an error. This is mostly useful when debugging assembly code as the address easily sticks out from regular application code. The same is true for the hex numbers DEADCODE, BADDCAFE, CAFEBABE, etc. 

    In our case we use DEADBEEF as an error code that signifies that the SoftDevice has asserted an error. Usually this is passed to app_error_handler along with the line number and file that asserted.

    Cheers,

    Håkon.

Children
Related