I thought I replied to this, but my reply isn't showing up for some reason, so I'll do it again.
|| Do you run this code?
|| SDK_2.9.0_FRDM-K22F\boards\frdmk22f\littlevgl_examples\littlevgl_guider
I attempted all three littlevgl examples (frdmk22f_littlevgl_demo_widgets, frdmk22f_littlevgl_demo_widgets_bm, and frdmk22f_littlevgl_guider) from the SDK along with frdmk22f_emwin_gui_demo. I get a greyed out screen with littlevgl and the emwin demo runs successfully. No touch capabilities on the emwin demo.
|| From the code readme, you can know, it needs to use:
|| - Adafruit TFT LCD shield w/Cap Touch
|| So, that module should include both the ili9341 and the w/cap Touch.
Correct. I have this module.
|| If you just connect the ili9341, and no touch, then you will meet the lack touch issues.
That makes sense. I'm just not sure where to connect the pins.
|| You also can check the code, where you printf "touch panel init failed", it will contain the touch init, but your hardware lack the module, then it will report issues.
My hardware has the module, I just guess I dont have it hooked up correctly.
|| Please also note, the project has this note:
|| Known issue:
|| The MCU is not able to generate hardware reset of the LCD due to hardware limitation of the boards interconnection.
|| Because of this the LCD may not get initialized (stays blank) following a cold start (power on) of the board even if the demo was
|| correctly programmed to the FLASH memory. In such a case simply press the reset button to restart the demo.
I eventually connected reset on the LCD module to the reset pin on the FRDM-K22F. Thats when the emwin demo loaded up.
|| In Rev D, the debug port UART and I2C for touch screen connect to the same pins, in this demo these two pins are used by I2C, PRINTF function in the code can't work normally.
Ok, that also makes sense. So I'm assuming I need to flash the board, disconnect from my computer and run with a usb power supply.
|| Supported board revisions:
|| FRDM-K22F REV A is not supported, the example is validated on REV C and D.
The board I have is rev D.
|| I think you also can comment the touch code, test the LCD code directly.
I actually went into \board\littlevgl_support.c and commented out lines 256, 259-262 as per your comment and it loaded up a single button on the screen, confirming that I don't have the touch panel hooked up correctly.
So, I'm confused about how to hook up this touch panel. I'm not sure if you have any experience with it.
Here is my current setup in which emwin works on and littlevgl works with the lines above commented out. I found it also works with J2(10) disconnected.
LCD-Pin============>FRDM-K22F
1/VCC==============>J25(10) 5V
2/GND==============>J25(12) GND
3/TFT_CS===========>J2(6) D10
4/REST=============>J25(6) RESET
5/TFT_D/C==========>J2(4) D9
6/TFT_SDI==========>J2(8) D11
7/TFT_SCK==========>J2(12) D13
8/LED==============>J25(10) 5V
9/TFT_SDO==========>J2(10) D12
10/T_CLK===========>No Connection
11/T_CS============>No Connection
12/T_DIN===========>No Connection
13/T_OUT===========>No Connection
14/T_IRQ===========>No Connection
I read a bunch of stuff about this LCD controller with respect to the arduino and they said they are connecting the touch pins to the same as the TFT pins. I then attempted the following:
LCD-Pin============>FRDM-K22F
1/VCC==============>J25(10) 5V
2/GND==============>J25(12) GND
3/TFT_CS===========>J2(6) D10
4/REST=============>J25(6) RESET
5/TFT_D/C==========>J2(4) D9
6/TFT_SDI==========>J2(8) D11
7/TFT_SCK==========>J2(12) D13
8/LED==============>J25(10) 5V
9/TFT_SDO==========>J2(10) D12
10/T_CLK===========>J2(12) D13
11/T_CS============>J2(6) D10
12/T_DIN===========>J2(8) D11
13/T_OUT===========>J2(10) D12
14/T_IRQ===========>No Connection
No success. I tried connecting the T_IRQ pin to J2(18)D14 and J2(20)D15 also with no success. I only see 7 pins initialized in the pin tool: BOARD_InitPins- GPIOA, but it doesnt say what for. DSP1_InitPins- These are the 4 SPI pins, PCS0/SS as chip select, SCK as serial clock, SOUT and Serial out and SIN as serial in. I2C_InitPins SDA and SCL. I'm not sure about these two. maybe I connect the SCL to T_CLK and SDA to T_OUT? or are you saying one of these is the irq pin that's referred to in littlevgl_support (BOARD_TOUCH_I2C_IRQ I2C1_IRQn)?