This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF51822 twi hard fault

Hi,

I've an HardFault, the program crash to the HardFault service routine at this row of the twi_hw_master.c:

--> NRF_PPI->CH[0].EEP = (uint32_t)&NRF_TWI1->EVENTS_BB;

This appens after the call twi_master_init();

The same code runs well in the DK board PCA10004 and the problem happens in my custom board, the softdevice firmware is the same.

If I disable just the twi all the rest works fine. I'm looking for additional informations because I have not test pads for test the SDA and SCL signals, so is not simple to find out what happen.

I was reading the nRF51 pdf but seems that there are not usefull information.

Thanks for your attention.

Parents
  • Ok, I followed this issue: devzone.nordicsemi.com/.../ and replaced the routine twi_hw_master.c with the sd_twi_hw_master.c as suggested, and now the app doesn't crash. So, I was right about the protection writing to peripherials by softdevice, BUT: why in the DK PCA10004 the fault does not appear even with the old one routine? It is not clear...

  • Thanks for the reply Stian: are you saying that the routine in twi_hw_master_c shouldn't works even on PCA10004 board? At now I have a lot of days and hours of test and my one board works fine, so the problem is left....but, I would be sure about this issue.

Reply
  • Thanks for the reply Stian: are you saying that the routine in twi_hw_master_c shouldn't works even on PCA10004 board? At now I have a lot of days and hours of test and my one board works fine, so the problem is left....but, I would be sure about this issue.

Children
No Data
Related