I have to use a 2x16 LCD COG (Chip On Glass) Display with ST7032i IIC driver chip.
Datasheet: http://akizukidenshi.com/download/ds/si ... st7032.pdf
Pics: http://esp8266-projects.org/2015/03/dis ... play-html/
I'm using Rogers core on a STM32F103VE.
at the moment, I am trying and testing with this library: https://github.com/weizenbock/ESP-ST7032
I just inserted here
Code: Select all
//for use of IIC2 TwoWire WIRE2 (2,I2C_FAST_MODE); #define Wire WIRE2
Everything works fine so far - I can display text and custom symbols - control the contrast - and so on ...
So it seems that the IIC communication is fine,
something strange happens after (different kinds of) a reset (using hello-world sketch):
- power on the board running through Rogers bootloader first (0x8002000) => in about 25% of all attempts the display starts (shows letters)
- power on the board without any bootloader (0x8000000) => in about 10% of all attempts the display starts (shows letters)
- (automatic) reset after uploading with Rogers bootloader => in about 80% of all attempts the display starts (shows letters)
- (automatic) reset after uploading with STLink => in about 50% of all attempts the display starts (shows letters)
I think something is wrong with the initialization routine of the display,
so that it sometimes "accidentally" works and sometimes not (?)
(as you can see (from my list above) the initialization succeeds more often if the board is already powered)
or may be it is some kind of "race condition" regarding the startup of the IIC or whatever (?)
(variation of the "timing" (the used delay() and delayMicroseconds() -calls) within the initialization routine make no difference)
In any case, the loop() routine is reached - so the SW does not get stuck somewhere in the setup() or the initialization of the LCD..
I have no idea what to do, so I am looking here for some experienced user