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:
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?
//www.wsdof.com/sites/default/files/an-b-061_da1468x_application_hardware_design_guidelines_v1.9.pdf
Thanks, PM_Dialog
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.
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
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