Page 3 of 4

Re: ILI9341 & XPT2046 Touchscreen

Posted: Wed Apr 12, 2023 6:58 pm
by mnfisher
Hi Ben,

Thanks - I'll continue with my 'combined' component for now....

Note that using MX_SPI_CHANNEL_IN_USE = 1 as above does seem to solve the transmit problem - though would need to alter the redirect for initialise - the 'second' component using the channel could just redirect to an empty routine - though this might cause issues if it is initialised first and used before the 'first' component?


Thinking aloud:

I wondered - though it would entail a fair amount of change - why the CAL_SPI routines don't just 'pass' a channel number. This would remove the duplication of code at the expense of an extra parameter and some extra storage in the backend code.

So in (very) pseudocode:

CAL_SPI_1::SPI_Master_Byte(123) in the component code would call SPI_SendByte(1, 123)

The SPI backend code would have (possibly) an array of SPI channel details (setup per channel on initialise) - and then, for example,
SPI_SendByte(channel, data) {
SPIDetails *dat = SPIDat[channel];
Use values from dat...

Though it might be just as easy to code it all in FC - and have the component do all the work?

Martin

Another aside - some topics (this, for example) - I don't get notifications for. Others I do (even if I've not posted) - and will a notification for any new post. Is there a setting for this?

Re: ILI9341 & XPT2046 Touchscreen

Posted: Thu Apr 20, 2023 10:00 am
by jgu1
Hej Ben & Martin!

Friendly inquiry I want to know if Ben has had time to look more into the subject, pls ;)

Br Jorgen

Re: ILI9341 & XPT2046 Touchscreen

Posted: Fri Apr 21, 2023 12:30 pm
by BenR
I'll have another go for you today and see if I can find a better solution.

Edit, I've pushed a new CAL file that hopefully will now work and do what we want. Let me know.

I like your proposal Martin, I might have an explore of this idea as currently it's not really as efficient as I would like.
Another aside - some topics (this, for example) - I don't get notifications for.
The Spanner dropdown at the bottom / top of the page has a subscribe feature that might do what you want?

Re: ILI9341 & XPT2046 Touchscreen

Posted: Fri Apr 21, 2023 2:56 pm
by mnfisher
Thanks Ben,

I'll have a play over the weekend...

Martin

Re: ILI9341 & XPT2046 Touchscreen

Posted: Sun Apr 23, 2023 1:07 pm
by jgu1
Hi both!

After update I try config the pinconnection in program and in hardware. Not working, get error. Disaster, I am also not able to program other of my project´s with Ili9341 and ESP32 any more :o .
Please Benn, rool back again :roll:

Br Jorgen

Re: ILI9341 & XPT2046 Touchscreen

Posted: Sun Apr 23, 2023 2:58 pm
by mnfisher
Hi Jorgen,

- That compiles fine for me... Something awry - you are getting
idf.py build

Usage: idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Try 'idf.py --help' for help.

Error: No such option: --no-hints Did you mean --no-warnings?
So giving up straight away with a compiler option error....

Strange?

Martin

Re: ILI9341 & XPT2046 Touchscreen

Posted: Sun Apr 23, 2023 4:35 pm
by jgu1
Hi MArtin!

I am totally confused now, I can´t compile anything with esp32 on any of my laptop. I have just try to made a new simple testprogram program, will also not compile??

None of my old project either, I am confused???

Please have a look in the txt file, and help :cry:

Re: ILI9341 & XPT2046 Touchscreen

Posted: Sun Apr 23, 2023 5:43 pm
by mnfisher
The modified esp_cal_spi.c seems to work AOK. All looks good :D using hspi and vspi!

Thanks Ben.

Re: ILI9341 & XPT2046 Touchscreen

Posted: Sun Apr 23, 2023 6:02 pm
by mnfisher
Hi Jorgen,

Looks like your esp installation has gone AWOL? Anything else changed - check the esp directory and run install.bat and check that FC still points to the right directory...

Martin

Re: ILI9341 & XPT2046 Touchscreen

Posted: Sun Apr 23, 2023 6:17 pm
by jgu1
Hello, Martin
I'm glad it works for you.
I really can't understand that I suddenly can't compile Esp deviceses. A short time ago I had problems with Starm and was recommended by Leigh to install this Starm compiler : File name: en.stsw-link004.zip from here :https://stm32-st-link-utility.software. ... ownloading do
and install the compiler, after that my Starm could compile, do you think that has an influence on the ESP compiler. I have not moved around any lib.

The error:
Building NotWork ...
'"C:\Users\45505\.espressif\export.bat"' is not recognized as an internal or external command,
operable program or batch file.
'idf.py' is not recognized as an internal or external command,
operable program or batch file.

I have seach for the export.bat" In the expressif lib, but it is not there. Can you see it in your Lib? Please

Please help.
I'm so sorry I suddenly can't compile ESP anymore, I have projects that I've spent many hours on and one of them isn't finished yet

Thank´s in advance

Jorgen