Regarding communication mode of CapSense Tuner

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Hello Cypress.

I found a symptom that RawCount Noise changes by communication mode.

At communication mode is Asynchronized, RawCount Noise is higher.

At communication mode is Synchronized, RawCount Noise is lower.

Please confirm below figure.

Why does RawCount Noise change depending on communication mode?

Below is test condition.

================================================

Kit:                       CY8CKIT-145-40XX

FW:                     CE210709_CapSense_Linear_Slider_and_Buttons

VDDA/VDDD:     3.3V(Used MiniProg3)

================================================

pastedImage_0.png

Best Regards.

Yutaka Matsubara.

0 Likes
16 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Dear Matsubara-san,

According to datasheet of CapSense Component(https://www.cypress.com/file/492461/download 😞

"Asynchronized - When selected, the Tuner reads data asynchronously to sensor scanning. Because reading data by the CapSense Tuner and data processing happen asynchronously, the CapSense Tuner may read the updated data only partially. For example, the device updates only the first sensor data and the second sensor is not updated yet. At this moment, the CapSense Tuner is reading the data. As a result, the second sensor data is not processed. "

So I think the phenomenon you met is caused by the "dirty data" read in the async mode. It is recommended to use sync mode to get the matched data when tuning CapSense.

Best Regards,

Ryan

0 Likes
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

Q1)

In Asynchronized mode, there is I2C communication(Write/Read) even during scanning.

So RawCount Noise in Asynchronized mode may be larger than Synchronized mode due to I2C communication(I2C frequency) itself.

Is my understanding correct?

Q2)

If Q1 is correct, for application that PSoC and Host always communicate via I2C, is it better to use Asynchronized mode than Synchronized mode?

Because Asynchronized mode is closer to actual application data than Synchronized mode in this case.

Best Regards.

Yutaka Matsubara

0 Likes

Matsubara-san,

A1) Asynchronized means data Processing and Tuner running asynchronized. But with multiple sensors application, CapSense data should be transmitted to Tuner after all processing completed.

A2) So...Synchronized mode is more closed to actual CapSense data.

Best Regards,

Ryan

0 Likes
lock attach
Attachments are accessible only for community members.
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

Below is description of CapSense Datasheet.

============================================================

Asynchronized – When selected, the Tuner reads data asynchronously to sensor scanning.

============================================================

Asynchronized seems to read data regardless of sensor scanning and scan data processing.

I thought that RawCount noise at Asynchronized was increased by I2C communication at sensor scanning.

Is my understanding correct?

If my understanding is wrong, could you please let us know the reason when RawCount noise at Asynchronized becomes bigger?

In tuner, it seems that RawCount noise increases as I2C frequency increases.

Please confirm attached file.

Best Regards.

Yutaka Matsubara

0 Likes

Matsubara-san,

In Asynchronized mode, all register values can be read by Tuner GUI without hand shake mechanism. This mode will provide fastest data streaming from the DUT to report sensor data, but may not be reporting optimal performance numbers such as SNR.

Synchronized mode can make sure Tuner performs synchronized data read which guaranties consistency of the read data, or in other words that read raw counts, differences, baselines and statuses of all widgets are obtained from the same scan and processing cycle.

Best Regards,

Ryan

0 Likes
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

I do not know why RawCount noise changes due to I2C freq in Asynchronized.

Could you please let us know a detailed mechanism and condition that RawCount noise becomes bigger in Asynchronized?

Best Regards.

Yutaka Matsubara

0 Likes

Matsubara-san,

Apologized sincerely for the late reply.

In Asynchronized mode, the Tuner reads data asynchronously with sensor scanning and data processing. Due to this, data coherency may be corrupted. So, the Tuner may read only partially updated sensor data.

Thanks,

Ryan

0 Likes
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

>>> Due to this, data coherency may be corrupted. So, the Tuner may read only partially updated sensor data.

If tuner reads rawcount during updating, rawcount shifted about 1 byte is monitored.

For example, RawCount LSB was updated, but MSB was not updated yet(MSB is previous data).

When data coherency is corrupted, I think that rawcount becomes waveform like spike noise(about 255).

Because the timing when tuner reads rawcount is not always the timing that data coherency is corrupted.

In rare case, tuner reads rawcount during updating.

So spike noise occurs in rawcount waveform at Asynchronized mode.

Spike noise occurs when rawcount is at the boundary of whether MSB 0bit or LSB 7bit is set or not.

Below link is discussions about this case.

=> https://community.cypress.com/thread/50528

But this noise I am asking is not spike noise.

Rawcount noise increases overall at Asynchronized mode.

And amount of noise increase is much smaller than 1 byte.

Therefore, I think that this noise increase has nothing to do with data coherency.

I think that there is another reason for the increase in noise.

So I thought that RawCount noise at Asynchronized was increased by I2C communication at sensor scanning.

Because rawcount noise increases as I2C frequency increases.

And rawcount range I captured is not at the boundary that spike noise occurs by data coherency corruption.

Could you please let us know a detailed mechanism and condition that RawCount noise becomes bigger at Asynchronized in this case?

Best Regards.

Yutaka Matsubara

0 Likes
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

Can you update this discussion?

Best Regards.

Yutaka Matsubara

0 Likes

Matsubara-san,

Apologized for the late. Have you tried with using the KitProg2/3 on the kit for Tuner? Can this issue be reproduced?  I tested the same fw on KIT-145. It works well. I can't see so large noise with I2C speed changing...

Best Regards,

Ryan

0 Likes
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

I used MiniProg3.

CY8CKIT-145-40XX and MiniProg3 were connected by jumper.

VDDA/VDDD setting is 3.3V(Not 5V).

Best Regards.

Yutaka Matsubara

0 Likes
lock attach
Attachments are accessible only for community members.

Matsubara-san,

I used MP3+145, 3.3V, to run the tuner. Red is Async mode, Green is sync mode. It doesn't have too much difference...

Software: PSoC Creator 4.2(build 641), CapSense V5.0

Hardware: MiniProg-3, KIT-145(Rev.12)

tempsnip.png

MP3_145_I2C.jpg

0 Likes

All CapSense filters are not enabled in the project.

0 Likes
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

I reproduced this issue by using your FW.

- Have AC adaptor and external display monitor been removed from your laptop PC?

Symptoms may be difficult to observe due to external noise.

- If I2C speed is changed to 1MHz, can this symptoms be confirmed?

The faster I2C speed is, the easier it is to observe this symptom.

Best Regards.

Yutaka Matsubara

0 Likes

Matsubara-san,

After enabled average and median filter, I can reproduce the issue. But with all filters disabled, I cannot reproduce the issue.

I guess filters under Async mode doesn't work. I think this is result of "Tuner reads data asynchronously with sensor scanning and data processing(processing includes data filtering)".

I tested under either AC adapter or battery, the result is same.

filter_dis.png

filter_en.png

0 Likes
YuMa_1534086
Level 7
Level 7
Distributor - Macnica (Japan)
500 replies posted 250 sign-ins 10 likes received

Ryan-san.

Is not this symptom reproduced even if you change I2C speed setting of tuner?

Is not this symptom reproduced on other sensors?

Best Regards.

Yutaka Matsubara

0 Likes