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

Hard fault in ipc_trace_handle (proprietary Nordic library)

My application just hit the following fault randomly:

Exception occurred in Secure State
***** HARD FAULT *****
  Fault escalation (see below)
***** BUS FAULT *****
  Precise data bus error
  BFAR Address: 0x50008120
***** Hardware exception *****
Current thread ID = 0x20028dac (sysworkq)
Faulting instruction address = 0x319fe
Fatal fault in ISR! Spinning...

I tracked back in the map file and that is inside the Nordic NRFX library in ipc_trace_handle, so I have no source code to help me decode what I might be doing wrong.

Specifically in my linking, ipc_trace_handle starts at 0x3180c, so that is 0x1f2 bytes after the entry.  Here's a snippet for reference from the listing file:

   319f8:	b109      	cbz	r1, 319fe <ipc_trace_handle+0x1f2>
   319fa:	2100      	movs	r1, #0
   319fc:	7011      	strb	r1, [r2, #0]
   319fe:	68a5      	ldr	r5, [r4, #8]
   31a00:	2d00      	cmp	r5, #0
   31a02:	d039      	beq.n	31a78 <ipc_trace_handle+0x26c>
   31a04:	f04f 0c00 	mov.w	ip, #0

Please, if someone from Nordic who has the source code for NRFX could help me understand what is being referenced in that area and give me a hint what might be wrong, I would really appreciate it.

Parents
  • Hi,

    Try to implement these functions in your main application (for instance in main.c):

    void bsd_recoverable_error_handler(uint32_t error)                                                                                                                                                                                                                             
    {                                                                                                                                                                                                                                                                              
        printf("Err: %lu\n", (unsigned long)error);                                                                                                                                                                                                                            
    }                                                                                                                                                                                                                                                                              
    
    void bsd_irrecoverable_error_handler(uint32_t error)                                                                                                                                                                                                                           
    {                                                                                                                                                                                                                                                                              
        printf("Irrecoverable: %lu\n", (unsigned long)error);                                                                                                                                                                                                                  
    }

    And check if they are triggered before you get the HARD FAULT? I would like to know what the error parameter is set to.

Reply
  • Hi,

    Try to implement these functions in your main application (for instance in main.c):

    void bsd_recoverable_error_handler(uint32_t error)                                                                                                                                                                                                                             
    {                                                                                                                                                                                                                                                                              
        printf("Err: %lu\n", (unsigned long)error);                                                                                                                                                                                                                            
    }                                                                                                                                                                                                                                                                              
    
    void bsd_irrecoverable_error_handler(uint32_t error)                                                                                                                                                                                                                           
    {                                                                                                                                                                                                                                                                              
        printf("Irrecoverable: %lu\n", (unsigned long)error);                                                                                                                                                                                                                  
    }

    And check if they are triggered before you get the HARD FAULT? I would like to know what the error parameter is set to.

Children
Related