DA14681 HardFault when reading I2C sensor via I2C Adapter

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
mahmed106
Offline
Last seen: 4 months 1 week ago
Joined: 2019-05-03 17:28
DA14681 HardFault when reading I2C sensor via I2C Adapter

Hi Dialog

We are working on a custom board based on DA14681 and a unusual problem occured.

We are currently testing 4 to 5 boards with same hardware and same firmware. But only one of them is restarting and upon debugging we found out that, that particular is going into hard_fault state. Upon more debugging it is found that when ad_i2c_write() is called, it goes into hard fault state.

Two wierd things regarding this : 
1 - it is only happening on one board out of 5 boards, same hardware same firmware.

2 - Standalone I2C read write is working fine via I2C Sensor. But in complete code with all BLE, peripherals and everything on ,, board halts when it attempts to write to the I2C device. 

 

Please tell me how should i approach this problem. 
Thanks 

Device: 
PM_Dialog
Offline
Last seen: 5 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

Thanks for your question online. This sounds like a hardware related issue, as the same firmware and same PCB have been used. The hard fault trigger is the result, and a long sequence might be before the hard fault.

This might be due to bad assembly of the parts or due to bad grounding. Probably a voltage drop might be the root cause of this issue. The reason why this behavior cannot be replicated with a non-BLE project (only I2C activity) is because of the overall power consumption is lower, so the voltage drop cannot occur.

My recommendation would be to check the voltage rails with a high precision oscilloscope so that you can detect any voltage drop.

Additionally, could you please let us know if the HW designs guidelines documents (link is provided below) had been followed when the schematics/PCB was being developed?

https://www.dialog-semiconductor.com/sites/default/files/an-b-061_da1468x_application_hardware_design_guidelines_v1.9.pdf

Thanks, PM_Dialog

mahmed106
Offline
Last seen: 4 months 1 week ago
Joined: 2019-05-03 17:28
Thanks alot for useful

Thanks alot for useful information. 

Your resposne makes quite sense.

Sor far i have done the following

1 - Our hardware team designed the schematics and pcb according to hardware design guidelines as you mentioend above.

2 - I have changed the way i power the board, we have two different route in the PCB to connect battery (VBAT) and also i have connected the 5V adapter, i.e VBUS and datasheet says VBUS also powers up the board. So in all these 3 different ways to power the board, still it is going in hardfault state. 

3 - For check voltage drop from high pricison oscilloscope, you mean right at the power pins of SOC?

4 - I have checked disassembly and it is clear that when BLE and everything is on, it goes into hardfault when i attempt to write to I2C device, and it halts exactly at

          ad_i2c_device_acquire:

          resource_acquire(DEVICE_RESOURCE_MASK(dev), OS_EVENT_FOREVER);

Although i2c read works fine. 

PM_Dialog
Offline
Last seen: 5 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

Yes, I meant to use a high precision oscilloscope to check alt the voltage rails of the DA14681 Soc. Can you see a voltage drop?

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen: 5 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi mahmed106,

Hi mahmed106,

We have taken this directly and offline from the forum. An email has been sent in your registered email address.

Thanks, PM_Dialog