cancel
Showing results for 
Search instead for 
Did you mean: 

Touch screen (i2C) locks up, on board using STMf429 with STMPE811.

derek2399
Associate II

Hi Good People. I have a custom board using a STM32F429 (loosely based on a STM32F429 DISCO) driving a 800 x 480 touch screen display (LTDC). I have used TouchGFX, STM32CubeMX (with FreeRTos) with Keil compiler. Everything is working fine, except the Touch controller. I had copied (what I believe to be) the relevant files from a Disco example, but the I2C locks up within a few msecs. The read/write routines are still accessed but the I2C locks up. I presume this must be a timing thing, but am lost as to where to go from here. The first screen shot is an expanded view of the last burst of the second shot. Any clues please? Thanks.


_legacyfs_online_stmicro_images_0693W00000bhqu5QAA.png
_legacyfs_online_stmicro_images_0693W00000bhqqSQAQ.png

3 REPLIES 3
Bob S
Principal

It looks like that last transaction sent address 0x02 (in upper 7 bits) and was NACK'd by the other end (i.e. device did not respond to its address). Is that the address of your display?

Your I2C signals are pretty rounded, though I don't know if that is a scope/probe bandwidth limitation or the actual waveforms. Sampling a 100KHz I2C bus with 200K samples/second will NOT give you the resolution you need to analyze clock/data timing. I know you were trying to capture a long sequence, but still - you basically only have 2 samples per clock cycle. Nyquist may say that is enough, but not for the detail needed here.

Does the HAL I2C transmit function return or does it get stuck inside the HAL code? If it returns, what error code does it return. If it gets stuck, what is it waiting for?

Read back the I2C registers when it hangs.

MM..1
Chief III

How pull ups you have on I2C?

derek2399
Associate II

Hi. Many thanks for taking the time to reply. Firstly, yes the waveform is fine. I only included screen shot to show that there was a signal sequence and not a 'single shots'. The STMPE811 has an address of 0x82, which it appears (to me) to recognize. The pull ups are 4K7 to 3.3 volt.

After the ic2 locks, I get communication error on both read and write. and give 0x02 on status:

 status = HAL_I2C_Mem_Read(&hi2c3, Addr, Reg, I2C_MEMADD_SIZE_8BIT, &Value, 1, 1000);

I am not sure what it is waiting for. How can I find that?


_legacyfs_online_stmicro_images_0693W00000bht2QQAQ.pngThanks again for all your time. It is much appreciated.