SAMA5D3 I2C HANG WITH PDA TM4301

Moderator: nferre

dolomiti-lynx
Posts: 11
Joined: Wed Aug 20, 2014 4:12 pm

SAMA5D3 I2C HANG WITH PDA TM4301

Wed Aug 20, 2014 4:45 pm

Dear All,

I report here a situation I'm facing during the SAMA5D3 Xplained board bring up. First of all I briefly describe the test system:

Hardware:
SAMA5D3 xplained with PDA TM4301 Touch Display connected
SALEAE Logic Analyzer connected to the I2C signal on display
TTL Serial Usb for console...
Ethernet ETH0 for remote fs (linux host)

Software:
Linaro Gcc Toolchain
At91 Bootstrap compiled from sources on Linux4Sam Github repository
U-Boot compiled from sources on Linux4Sam GitHub repository
Kernel 3.10.x compiled from sources on Linux4Sam GitHub repository
RootFs builded via Buildroot with support for tslib, qt and other stuff

Strange behaviour:

My system is working fine (boot sequence, kernel). Peripherals work fine too. I can display images via fb-test program on the 4.3" display, see the peripherals on the I2C bus via i2cdetect -y 1 program (all compiled by my), and so on.

The touchscreen peripheral has been configurated writing the /ets.conf configuration file, following the lib documentation (here the content of the file:)

tsconf.ts content (with comments stripped out):
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear


I have also setted its own env variables:
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_FBDEVICE=/dev/fb1


The module should be configurated as requested by lib, and after issuing the ./ts_calibrate command, the pointercal file is generated. I'm not sure that the calibration step is fullfilled correctly at 100%, but I think yes.

Here the problem:

After the calibration, when I issue the command ./ts_test i can see the coordinated on the display of the touchscreen when I touch it for one minute, after one minute the program hangs.

Here a snipped of bash console:

1167609807.948041:   6767     57    104
1167609807.962107:   6744     59    104
1167609807.978795:   6710     60    104
1167609807.996431:   6674     62    104
1167609808.011987:   6636     63    104
1167609808.028580:   6598     65    104
1167609808.045170:   6562     66    104
1167609808.061768:   6531     67    104
1167609808.078361:   6507     68    104
1167609808.094865:   6487     68    104
1167609808.114858:   6428     70    104
1167609808.128050:   6367     71    104
1167609808.144746:   6299     72    104
1167609808.161334:   6236     73    104
at91_i2c f0018000.i2c: controller timed out
atmel_mxt_ts 1-004a: __mxt_read_reg: i2c transfer failed (-110)
atmel_mxt_ts 1-004a: Failed to read message
at91_i2c f0018000.i2c: controller timed out
atmel_mxt_ts 1-004a: __mxt_read_reg: i2c transfer failed (-110)
atmel_mxt_ts 1-004a: Failed to read message


You can see the error, it seem to me that the I2C bus hang. In fact, after the hang out, if I submit the command i2cdetect -y 1, i can not see the I2C addresses as I seen before the test. Not only. If i reboot the board from console, the I2C still seem hanged, and the touch interface are not detected by the kernel (under /dev/input I see only the event0 file instead of event0 event1 event2).

If I power off and then on the board, I can repeat the problem. So, to further investigate the problem, I have attached a logic debug probe to the I2C signals on the display, and I have seen that after ./ts_test hang out, no data is exchanged between the display and the board via I2C.

What could be? All equipment I have used are new. A second question: why there aren't I2C pullu-ps on the board? Aren't it necessary?

If some of you have faced a similar situation, please let me know... I wan't to exclude at 100% software issues, to start the design of the real board as close as possible.

Best Regards

Giulio Gaio
dolomiti-lynx
Posts: 11
Joined: Wed Aug 20, 2014 4:12 pm

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Fri Aug 22, 2014 4:40 pm

It seems that others has faced the same problem as described in my post. No one could help us in solving the issue?

More details about this topic could be found here: discussions/viewtopic.php/f,33/t,22405.html

It' s probably something (in my opinion) regarded to the I2C-1 / Atmel Max Touch device driver or the lacks of I2C pull-ups on the bus.

A second question:
Kernel 3.16.x will improve the handling of device tree blob configuration, in my opinion facilitating the definition of the hardware towards the kernel. Is it scheduled a release of AT91 customized Kernel that overtake the 3.10.x? Or better, is scheduled a merge between Official Linux Kernel and the AT91 branched one?

Best Regards
dolomiti-lynx
Posts: 11
Joined: Wed Aug 20, 2014 4:12 pm

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Tue Aug 26, 2014 8:45 pm

Is this the wrong place where to submit questions about the sama5d3 explained kit? It seems that no one maintain this forum...some of you know if there is another Atmel technical support forum where to ask about technical issues?

Thanks in advance
dolomiti-lynx
Posts: 11
Joined: Wed Aug 20, 2014 4:12 pm

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Wed Sep 03, 2014 8:27 pm

It seems that this forum is not yet maintained...where we can get information about bugs on the BSP of the SAMA5D3 Xplained Evaluation Kit?
LLe
Posts: 2
Joined: Wed Sep 10, 2014 10:34 am

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Wed Sep 10, 2014 10:45 am

Root cause is ACT8865 I²C interface behavior and has nothing to do with TM43xx display.

Check ACT8865 datasheet for further info how to disable their I²C port after configuration.

http://www.active-semi.com/sheets/ACT8865_Datasheet.pdf
dolomiti-lynx
Posts: 11
Joined: Wed Aug 20, 2014 4:12 pm

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Wed Sep 10, 2014 10:04 pm

Thanks for your reply about ACT8865 I2C bus contention. Very strange that this information was present nor in the SAMA5D3 Xplained nor in other forum. 

So, reading the documentation, it seem that it is necessary to disable the I2C interface of the power regulator chip after the start up of the micro. I will try simply disabling it via i2c command line commands.

Best Regards
jknoch
Posts: 5
Joined: Wed Nov 12, 2014 3:13 pm

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Mon Dec 01, 2014 4:59 pm

I am having a similar problem with the TM7000 and SAMA5D3 Xplained board. Can you tell me if you were successful in fixing this issue? Is so, could you provide details? Thanks.

UPDATE (12/9/14) - I worked around this by placing the following commands to disable the ACT8865 I2C interface in a late startup script:

i2cset -y 1 0x5b 0x0B 0xE9 || true
i2cset -y 1 0x5b 0x02 0x07 || true
i2cset -y 1 0x5b 0x03 0x01 || true

I’m not sure i2cset is the safest way to do this, so I would be open to any input on a better approach.
Note: I must have had the 303 version of the chip; there are different instructions in the ERRATA for the 305 version.
kdu
Posts: 1
Joined: Thu Dec 11, 2014 8:42 am

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Thu Dec 11, 2014 9:46 am

Hello,
for me, it seems not be a problem of linux. I have written an application on 'bare metal' and have the same probs with I2c and a PCA9554AD. It seems not to be a software problem. A software reset does not help, nor a refit of the I2C bus. A repower of the hardware is the only way that helps. 
But when I touch the i2c-clock signal with a peak of a scope, the bus continues (hä???). Is it a capacitive problem? A resistance of <= 1K5 against VCC improves the behavior, but is not the solution.

regards, 
kdu
ypjc
Posts: 14
Joined: Mon Sep 01, 2014 4:22 am

Re: SAMA5D3 I2C HANG WITH PDA TM4301

Fri Aug 14, 2015 4:31 am

jknoch wrote:I am having a similar problem with the TM7000 and SAMA5D3 Xplained board. Can you tell me if you were successful in fixing this issue? Is so, could you provide details? Thanks.

UPDATE (12/9/14) - I worked around this by placing the following commands to disable the ACT8865 I2C interface in a late startup script:

i2cset -y 1 0x5b 0x0B 0xE9 || true
i2cset -y 1 0x5b 0x02 0x07 || true
i2cset -y 1 0x5b 0x03 0x01 || true

I’m not sure i2cset is the safest way to do this, so I would be open to any input on a better approach.
Note: I must have had the 303 version of the chip; there are different instructions in the ERRATA for the 305 version.
Hi jknoch,

could you help me to elaborate a bit about late startup script ?
in where you place i2cset command?

Thanks

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 4 guests