STM32 with TFT needs Serial.begin to operate

Hi,

Using stm32duino on a STM32F103RCT6 board connected to a mcufriend 2.8" TFT screen with touch I am able to get the screen to work completly when uploading my tftpaint test sketch. But when I restart the board with boot0 to 0, the TFT screen remains blank and norhing happens. Now here is the odd part, when I put in a Serial.begin(anybaudrate) in the setup preceeding the TFT init, it does work after boot as expected.

Any suggestions as why this Serial.begin is necessary? Am I missing some GPIO port bootup alterations?

My setup uses the following ports:

  • PA0-PA7 for tft datalines D0-D7
  • PB0: tft WR
  • PB1: tft RS
  • PB3: tft RD
  • PB6: tft CS
  • PB7: tft RST

Note: I already discovered that PB3 and PB4 are used for JTAG debugging during startup, so I' ve placed the following line preceeding the tft.init:
afio_cfg_debug_ports(AFIO_DEBUG_NONE);

Where is a link to LCD specs?
What core are you using?
What library are you using?
How you upload to MCU?

Do some work if you need help...