|
H753_CPP_SPI_BT817_EVE_01 1.0
STM32H753 drives a Bridgetek BT817 (ME817EV + DP-0701-01A) over SPI: a chip-ID start-up check, then Bridgetek's simple demo through the STM32_Bridgetek_EVE_API library
|
Firmware for a NUCLEO-H753ZI that drives a Bridgetek BT817 EVE graphics controller (ME817EV board with the DP-0701-01A 7-inch 800 x 480 capacitive-touch panel) over plain SPI. At start-up it checks the BT817 and reads its chip ID, then it runs Bridgetek's "simple" demo unchanged through the STM32_Bridgetek_EVE_API library (a git submodule).
Status: tested on the hardware. The chip-ID check passes and the demo runs (touch calibration, the Bridgetek logo, a counter that counts while touched) on every reset, with SPI1 at 12 Mbit/s.
After the CubeMX peripheral init, main.c:
eveChipIdTest(), switched by runChipIdTest): it pulses PD# low for 20 ms, sends the host commands CLKEXT, CLKSEL (72 MHz), RST_PULSE and ACTIVE, waits up to 300 ms for REG_ID to read 0x7C and up to 3 s for REG_CPURESET to read 0, then reads the chip ID and expects 08 17 01 00. It prints each value; on a failure it prints the reason (and a wiring checklist when the chip does not answer) and stops in Error_Handler();eve_example(), which starts the BT817 again through the library, runs the touch calibration, loads a font and images, and shows the counter screen.Typical console output (19200 baud):
| ME817EV CN8 | Signal | NUCLEO-H753ZI | Notes |
|---|---|---|---|
| 1 | SCK | PA5 | SPI1_SCK |
| 2 | CS# | PB6 | GPIO output, EVE CS# |
| 3 | MISO | PA6 | SPI1_MISO |
| 4 | MOSI | PB5 | SPI1_MOSI (not PA7: it is wired to the Ethernet PHY) |
| 11, 12 | GND | GND | both ground pins |
| 13 | PD# | PD15 | GPIO output, EVE PD#, starts low |
| 14 | INT# | PF3 | EXTI3, falling edge (not used by the demo yet) |
| 10 | 5V_HOST | not connected | the ME817EV has its own USB-C supply |
USART1 (PA9 TX, PA10 RX, 19200 baud) is the terminal; it goes to a USB serial adapter.
On the ME817EV: SW2 all OFF (host lines from CN8), JP1 on 1-2 (power from its USB-C connector).
Connect the grounds properly. The two boards have separate supplies. Besides the GND pins of the signal wiring, add a short, heavy ground connection between the two boards. Without it the ME817EV's ground moves under load and the BT817 sees false chip-select edges: a chip ID of 0B FF FF FF, "co-processor exception", random vertical lines, or a demo that stops after calibration.
FT8XX_TYPE=BT817, PANEL_TYPE=DP_0701_01A, PLATFORM_STM32_CUBE=1 (SPI) and PLATFORM_STM32_CUBE_CHANNEL=1 (SPI1).runChipIdTest in main.c (true = run it).STM32_Bridgetek_EVE_API/ - Bridgetek's EVE library (MIT), as a submodule; its README lists the changes made for STM32Cube.EVE_Example/ - Bridgetek's "simple" demo (MIT), copied unchanged; see EVE_Example/README.txt.