This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

custom board with nrf52840 and TFT LCD 2.8 spi KMRTM28028

Hi All, I try to run the example GFX in sdk 17.02. 

I wired the TFT :

---VCC ------------------ +3V 
---GND ------------------ GND 
---CS --------------------  P1.09 
---RESET---------------  P0.08 
---D/C--------------------  P0.06 
---SDI(MOSI) ----------- P0.13 
---SCK--------------------  P0.14 
---LED  ----1KResistor---+3V
---SDO(MISO)  ------------ P0.15 

so I view in ili9341.c

static ret_code_t hardware_init(void)
{
ret_code_t err_code;

nrf_gpio_cfg_output(ILI9341_DC_PIN);

nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;

spi_config.sck_pin = ILI9341_SCK_PIN;
spi_config.miso_pin = ILI9341_MISO_PIN;
spi_config.mosi_pin = ILI9341_MOSI_PIN;
spi_config.ss_pin = ILI9341_SS_PIN;

err_code = nrf_drv_spi_init(&spi, &spi_config, NULL, NULL);
return err_code;
}

so in sdk_config.h i re-defined:

#ifndef ILI9341_SCK_PIN
#define ILI9341_SCK_PIN NRF_GPIO_PIN_MAP(0,14) 
 #endif

#ifndef ILI9341_MISO_PIN
#define ILI9341_MISO_PIN NRF_GPIO_PIN_MAP(0,15) 
#endif


#ifndef ILI9341_MOSI_PIN
#define ILI9341_MOSI_PIN NRF_GPIO_PIN_MAP(0,13)
#endif

#ifndef ILI9341_SS_PIN
#define ILI9341_SS_PIN NRF_GPIO_PIN_MAP(1,9) 
#endif


#ifndef ILI9341_DC_PIN
#define ILI9341_DC_PIN NRF_GPIO_PIN_MAP(0,6)
#endif

but when I flash and turn on the device nothing happening :(  Only the backlight display are on. What am I doing wrong? What can I watch to fix?

Thank you very much

Marco 

Parents
  • Have you tried to connect a logic analyzer to the pins in question to check if they indeed controlled as expected? Some of the pins you refer to may be used by other peripherals (e.g. if you flip the DK you can find that some of the pins may be used for external memory by default, so you need to fix some solder bridges as indicated on the read side).

    Kenneth

Reply
  • Have you tried to connect a logic analyzer to the pins in question to check if they indeed controlled as expected? Some of the pins you refer to may be used by other peripherals (e.g. if you flip the DK you can find that some of the pins may be used for external memory by default, so you need to fix some solder bridges as indicated on the read side).

    Kenneth

Children
Related