Hi,
Sorry for asking a newbie question.
I would like to use the ILI9486 that comes with an arduino shield, wired for a 8bit parallel communication.
I have been able to compile a sample code an upload it to an Uno, with LCDWIKI libraries.
The uno is too small to support it, so I’d like to use other board laying in my drawers, a Nucelo64 F103RB, or bluepill.
Obviously, none of those board is not recognized…
I have found stevstrong’s library (GitHub - stevstrong/Adafruit_ILI9486_STM32), but its using maple framework that is outdated. It doesn’t compile with arduino IDE neither.
TypeError: '>=' not supported between instances of 'str' and 'int':
File "/home/jfcassan/.platformio/penv/lib/python3.8/site-packages/platformio/builder/main.py", line 168:
env.SConscript("$BUILD_SCRIPT")
File "/home/jfcassan/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
Thanks Max, it compiles, it uploads to the board, but nothing visible.
I get only gibberish from the monitor. As you said, the board isn’t a maple… It surely matters.
I was able to debug striped down program using the regular core…
This suggests that maple core isn’t compatible with my board, or PIO can’t debug / monitor maple firmware…
Any suggestion?
Unfortunately, the shield is designed for an UNO, so pin wiring is not compatible. So I’ll have to not plug the shield directly and use some dupond wires to follow the diagram. I understand UNO’s pin layout can’t be used efficiently on this board.
But before that, a simple "Serial.println(“Hello”); is not working. With platformio.ini defining 4 configurations:
The error on genericSTM32F103RB_mapple is located somewhere in platformio harness:
TypeError: '>=' not supported between instances of 'str' and 'int':
File "/home/jfcassan/.platformio/penv/lib/python3.8/site-packages/platformio/builder/main.py", line 168:
env.SConscript("$BUILD_SCRIPT")
Execution gives:
nucleo_f103rb_arduino: monitor OK, blinking, debugger OK
nucleo_f103rb_maple: N/A
genericSTM32F103RB_maple : no output, no blinking
genericSTM32F103RB_arduino: no output, no blinking
in conclusion:
the genericSTM32F103RB board doesn’t produce running code. I should see the led blinking even if the monitor is not functional.
The maple core compile only with genericSTM32F103RB but produced code doesn’t run on the board.
Is a “good” way to force PIO to use that library in place of the one defined by the core? When I add it in lib_deps, some files are taken from the core instead of the library.
This is precisely why I would prefer using the arduino framework and not the stm32 cube wich is really intimidating .
Yes, the device uses 8 bits on the uno. This isn’t typical pins for an SPI or I²C interface. I have dived into LCDWIKI code, and found something like:
Regarding pinout, PA2 and PA3 are also connected to STLink on this bord. This explains the random data on the monitor. So I have changed the mapping like following:
(*2)By several boards, This port is used as JTAG.
You need remap.
afio_cfg_debug_ports(AFIO_DEBUG_NONE)
But yeah if it’s used by the STLink then it’s better to use other pins entirely.
Which sketch have you uploaded? Does the LCD reader show some non-zero good information finally?
LL_GPIO_PIN_12 (low-level GPIO pin 12) just means that, Pin number 2. The call where TFT_D7 is used also uses the TFT_DATA macro which contains the GPIO bank, which is GPIOA. So together that makes PA12. So LL_GPIO_TogglePin(GPIOA, LL_GPIO_PIN_12); would toggle PA12 but LL_GPIO_TogglePin(GPIOB, LL_GPIO_PIN_12); would toggle PB12.
The LCD reader show some non zero value. Not sure about their meaning.
reg(0x0000) 00 00 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 54 80 66 Manufacturer ID
reg(0x0009) 00 00 61 00 00 Status Register
reg(0x000A) 00 08 Get Powsr Mode
reg(0x000C) 00 66 Get Pixel Format
reg(0x0061) 00 00 RDID1 HX8347-G
...
I have tried the GraphicsTest_320x480_SMT32.ino. The program runs several tests, output timings, but the screen remains white.
I need to double check my wiring.
Yep the 00 00 94 86 outputting 0x9486 is a clear indication that generally talking to the device is working… No idea why it’s showing a white screen for you though. Power problems with the backlight?