Custom board got HardFault

Hi,

I have been programming my custom board using SWD on a DK. It worked fine when I tried blinky example, however, when I tried nrf_ble_uart example, it stopped at the log_init():

and when I break it, it showed in HardFault_handle() :

I tried several solution in the devzone but none of them solved this problem. The circuit only had  MDBT42Q chip with GND and VDD SWDCLK and SWDIO pins connected.

Could you help me out? 

Thanks a lot,

Chris

Parents
  • Hello,

    It's strange that you seem to be getting a fault exception from the log_init() call. When the ble_app_uart example does not run on a custom board it's usually one of two things: Either the wrong 32 KHz clock source is selected, or a floating UART RX input that causes the APP_UART_COMMUNICATION_ERROR event to be raised. But neither of these should trigger a fault exception.

    Does the exact same code run fine on your DK? And can you post a screenshot that includes the CPU registers and call stack  as well?

    Best regards,

    Vidar

Reply
  • Hello,

    It's strange that you seem to be getting a fault exception from the log_init() call. When the ble_app_uart example does not run on a custom board it's usually one of two things: Either the wrong 32 KHz clock source is selected, or a floating UART RX input that causes the APP_UART_COMMUNICATION_ERROR event to be raised. But neither of these should trigger a fault exception.

    Does the exact same code run fine on your DK? And can you post a screenshot that includes the CPU registers and call stack  as well?

    Best regards,

    Vidar

Children
Related