eve4-bt817 & qspi driver lcd

FTDI/Bridgetek EVE2 & EVE3 & EVE4 SPI TFT Series by Matrix Orbital

Moderator: Mods

Post Reply
bleaaach_rose
LCD?
Posts: 2
Joined: Fri Aug 16, 2024 4:01 am

eve4-bt817 & qspi driver lcd

Post by bleaaach_rose »

Hello, I am using `https:// github.com/matrixorbital/eve2-library` to drive the LCD screen. The QSPI protocol connection I use will be connected to the BT817. It was changed to QSPI, but it didn't seem to play any role, and still could not light up the screen:

`` `c
/*
* hw_api.c
*
* Created on: Mar 4, 2020
* Author: ray
*/

#include "hw_api.h"
#include "main.h"
extern QSPI_HANDLETYPEF HQSPI1;

extern void mx_spi1_init ();
void Hal_spi_enable (VOID)
{{
Hal_gpio_writepin (GPIOA, GPIO_PIN_2, 1);
}

void Hal_SPI_DISable (VOID)
{{
Hal_gpio_writepin (GPIOA, GPIO_PIN_2, 0);
}

volatile int Lastresult = 0;
void Hal_SPI_WRITEBUFFER (UINT8_T *Buffer, UINT32_T Length)
{{
Hal_spi_enable ();
hqspi1.instance-> dlr = length-; // Configure data length
volatile int result = Hal_qspi_transmit (& hqspi1, buffer, 1000); // Send data

Hal_spi_disable ();
}

void Hal_SPI_READBUFFER (UINT8_T *Buffer, UINT32_T LENGTH)
{{
// Eveires One Dummy Read/Write Before Actual Data Can Be Read
Buffer [0] = 0;
hqspi1.instance-> dlr = length-1;
volatile int result = Hal_qspi_transmit (& hqspi1, buffer, 1000);
HAL_QSPI_RECEIVE (& HQSPI1, Buffer, 1000);
}

UINT8_T HAL_SPI_WRITE (UINT8_T DATA)
{{
hqspi1.instance-> dlr = data-1; // Configure data length
If (HAL_QSPI_TRANSMIT (& HQSPI1, & Data, 1000) == Hal_ok) Return 0; // Send data
else Return 1;
}

void Hal_eve_reset_hw (void)
{{
Hal_gpio_writepin (EVE_PD_GPIO_PORT, EVE_PD_PIN, 0);
HAL_GPIO_WRITEPIN (GPIOA, GPIO_PIN_2, 0); // CS PIN

Hal_delay (50);
Hal_gpio_writepin (EVE_PD_GPIO_PORT, EVE_PD_PIN, 1);
Hal_gpio_writepin (GPIOA, GPIO_PIN_2, 1);
Hal_delay (100);
}
`` `

Can you help me see where there is a problem? My engineering file is generated by CubemX. If I need the engineering source file, I will attach it again.


I hope you can help me look at the code, or provide a QSPI version. I have had a headache for several days. I am not familiar with QSPI. The content of the relevant code on the Internet is very small. I hope to get your help. Thank you very much! Intersection

Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Re: eve4-bt817 & qspi driver lcd

Post by Raquel »

Hello,

Thank you for posting on the forum.
Can I please get the serial number on the EVE display? I want to check the hardware capability to do QSPI.

Thank you,
Raquel
Raquel Malinis
Design and Development
Matrix Orbital

bleaaach_rose
LCD?
Posts: 2
Joined: Fri Aug 16, 2024 4:01 am

Re: eve4-bt817 & qspi driver lcd

Post by bleaaach_rose »

Is the serial number on the EVE display you mentioned the number on the BT817 chip? If so, the number is "KM21G BT817Q 2208-B". I hope to get your help as soon as possible. I don't know how to perform QSPI read and write.

Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Re: eve4-bt817 & qspi driver lcd

Post by Raquel »

Hello,

Serial number can be found on the back of the display, small clear sticker.

Thank you,
Raquel
Raquel Malinis
Design and Development
Matrix Orbital

Post Reply