You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IDF version (run git describe --tags to find it):
v4.1-dev-1935-g647cb628a
Build System: CMake
Compiler version (run xtensa-esp32-elf-gcc --version to find it):
xtensa-esp32-elf-gcc (crosstool-NG esp-2019r2) 8.2.0
Operating System: macOS
Power Supply: USB
Problem Description
Having some issues with the iot_i2s_lcd_write_cmd component in 8 bit mode. Also the clock I2S[i2s_num]->clkm_conf.clkm_div_num = 2; doesn't seem to work reliably with 8 bit mode. Had to use 4.
Expected Behavior
iot_i2s_lcd_write_cmd (that uses the FIFO) should work when a DMA is also underway. My impression is that in 8 bit mode, the I2S[i2s_num]->state.tx_idle doesn't get updated quickly and the second write of the LOW byte cancels the previous one. I believe that adding a small us delay fixed it but my memory is not very sure here.
Actual Behavior
A few issues that I noticed and validated with the MSO1074z logic analyzer:
I2S[i2s_num]->clkm_conf.clkm_div_num = 2 should be 3 or 4 for 8 bit mode. From what I could understand from the RTM, from the source code comments and from the forum, for 8 bits the clock is divided by two and must be 3 or 4. With 3 I got some issues during reboot where in some cases the byte was transmitted and in other cases it wasn't. I also remember reading some info regarding 8bit mode and I2S1 being better than I2S0 but I can't find my reference.
This board has the CPUs set at 240 MHz so not sure if that was the reason but it was strange. If I defined a bus with of 16 I saw the data changing but I missing half of the data.
Steps to reproduce
call iot_i2s_lcd_write_cmd.
call iot_i2s_lcd_write_data. Only the rs toggle and the iot_i2s_lcd_write_data was properly transmitted.
Thanks nopnop2002. I still have my I2S LCD driver working but I'm moving to a MHS40 screen with an 80 MHz SPI interface so I'll soon deprecate that driver. I did manage to get really fast speeds though.
github-actionsbot
changed the title
Issues with iot_i2s_lcd_write_cmd in 8-bit LCD mode
Issues with iot_i2s_lcd_write_cmd in 8-bit LCD mode (AEGHB-293)
Jul 10, 2023
INSTRUCTIONS
Environment
git describe --tags
to find it):v4.1-dev-1935-g647cb628a
xtensa-esp32-elf-gcc --version
to find it):xtensa-esp32-elf-gcc (crosstool-NG esp-2019r2) 8.2.0
Problem Description
Having some issues with the
iot_i2s_lcd_write_cmd
component in 8 bit mode. Also the clockI2S[i2s_num]->clkm_conf.clkm_div_num = 2;
doesn't seem to work reliably with 8 bit mode. Had to use4
.Expected Behavior
iot_i2s_lcd_write_cmd
(that uses the FIFO) should work when a DMA is also underway. My impression is that in 8 bit mode, theI2S[i2s_num]->state.tx_idle
doesn't get updated quickly and the second write of the LOW byte cancels the previous one. I believe that adding a small us delay fixed it but my memory is not very sure here.Actual Behavior
A few issues that I noticed and validated with the MSO1074z logic analyzer:
iot_i2s_lcd_write_cmd
doesn't seem to work properly. I can see the RS line going down and up but no data is written. I confirmed this with the LA. Replacing it with thei2s_lcd8_write_data
and toggling the RS line manually fixed this issue (https://github.com/csobrinho/hydroponics/blob/11b9b3b9bd3c9ae62058ade886d847e1b19deb0f/main/driver/i2s_lcd8.c#L102-L104). This problem was independent on the clock and was the same forclkm_div_num = {2|4|8}
I2S[i2s_num]->clkm_conf.clkm_div_num = 2
should be3
or4
for 8 bit mode. From what I could understand from the RTM, from the source code comments and from the forum, for 8 bits the clock is divided by two and must be3
or4
. With3
I got some issues during reboot where in some cases the byte was transmitted and in other cases it wasn't. I also remember reading some info regarding 8bit mode and I2S1 being better than I2S0 but I can't find my reference.This board has the CPUs set at 240 MHz so not sure if that was the reason but it was strange. If I defined a bus with of 16 I saw the data changing but I missing half of the data.
Steps to reproduce
iot_i2s_lcd_write_cmd
.iot_i2s_lcd_write_data
. Only the rs toggle and the iot_i2s_lcd_write_data was properly transmitted.From https://github.com/csobrinho/hydroponics/blob/master/main/display/lcd.c#L18-L32:
Code to reproduce this issue
I have made a wrapper around the iot_i2s_lcd component here: https://github.com/csobrinho/hydroponics/blob/master/main/driver/i2s_lcd8.c
Debug Logs
N/A but can provide upon request.
Other items if possible
There are other issues (#19) and (#26) with LCD in 8 bit mode but I believe they are not related to this particular issue.
I'm using a RM68090 display and it accepts 8 bit commands sent as 0b00000000{cmd} bits so no need to change the function to only send one byte.
sdkconfig file (attach the sdkconfig file from your project folder)
https://github.com/csobrinho/hydroponics/blob/master/sdkconfig
elf file in the
build
folder (note this may contain all the code details and symbols of your project.)coredump (This provides stacks of tasks.)
The text was updated successfully, but these errors were encountered: