I2C and SPI drop out when BLE connection starts on DA14681 Dev Board

⚠️
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//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
13 posts / 0 new
Last post
jetsonindustries
Offline
Last seen:2 years 4 months ago
Joined:2016-12-06 08:36
I2C and SPI drop out when BLE connection starts on DA14681 Dev Board

We're working on a IoT device using the Dialog DA14681 MCU, LIS331HH accelerometer and MMC3416 magnetometer.

everything connects up well and we get readings from both sensors (accel via SPI and Magneto via I2C).

The moment we initiate BLE connection it all goes horribly wrong.

With the LIS accelerometer, For the initial 8 seconds of operation the accelerometer appears to give the correct readings via SPI, then only outputs 0 for all 3 axis. When testing using UART debugger we see a whole bunch of weird data which is clearly incorrect. When we swapped it over to 12C interface to test the UART debugger stopped after 8-10 seconds and gives us nothing.

A very similar issue occurs with the magnetometer over I2C.

Being a reasonably new component the DA14681 has been a bit of a nightmare, but I'm hoping someone has come across the same problem and there's something simple we've missed to fix this.

Any suggestions would be really handy! I've attached some screen shots so you can see what is going on.

Keywords:
Device:
STS_Dialog (not verified)
Please send the screen shots.

Please send the screen shots.

jetsonindustries
Offline
Last seen:2 years 4 months ago
Joined:2016-12-06 08:36
https://drive.google.com/open

https://drive.google.com/open?id=0BxQAX5Lh1nJvLTl4Q2ttaUY1Qmc

Is the debug screen for the Magnetometer

And

https://drive.google.com/open?id=0BxQAX5Lh1nJvV0VSNExPRXI0VFE

Is what we’re seeing with the accelerometer.

Cheers
Ben

STS_Dialog (not verified)
Hi,

Hi,

Please send the files at zip.

Thanks,

Stavros

jetsonindustries
Offline
Last seen:2 years 4 months ago
Joined:2016-12-06 08:36
Hey Stavros images attached

Hey Stavros images attached in Zip

Attachment:
STS_Dialog (not verified)
Hi,

Hi,

I believe that the root of the issue is right after getting sleep. By default our example codes use XTAL32K as low power clock andbefore the system goes to sleep we wait roughly 8 seconds for the crystal to be stabilized. After that, the system can enter into sleep mode and here is where things end up to a nightmare. First of all we need some info and more specifically:

1. What version of the SDK and type of development kit is used?
2. Have you built your source code using one of our sample code (e.g. ble_adv)?
3.什么是低功率时钟的来源(晶体吗32K , RCX)?

Now some tips and steps to follow:

1. We strongly recommend you to usepm_mode_extended_sleepas sleep mode.

2. Do you use adapters in order to access peripheral modules? Please note that adapters not only ensure exclusive access to a peripheral bus, but also CPM (power management unit) takes care of the various modules that are active, before force the system goes to sleep. So, if you use low level drivers instead of adapters, then the system is not aware for the existence of the e.g. SPI/I2C activity and upon getting sleep, it ends up to a mess.

I don't think that the issue is related with incorrect use of peripheral bus since you are able to read values. Also BLE activity doesn't seem to corrupt readings from sensors since you are able to get some values at the first 8 seconds.Please confirm it , if before the issue observed, there is normal BLE activity (advertising) using e.g. SmartSnippets Toolbox.

BR,
STS_Dialog.

jetsonindustries
Offline
Last seen:2 years 4 months ago
Joined:2016-12-06 08:36
We are receiving a signal via

We are receiving a signal via Bluetooth when the sensors aren’t operating.

The peripherals are accessed via adapter.

DA1468x_DA15xxx_SDK_1.0.10.1072 Is the SDK version and for hardware we are using the DA14681 pro development kit.

Our build is based on source code from the SDK - not custom written.

The clock settings are the same as the example code It is just 32.768KHz. RCX is disabled but we tested with it enabled and no change.

Is there any other suggestions?