Skip to content

Instantly share code, notes, and snippets.

@SteveGotthardt
Last active February 6, 2024 02:57
Show Gist options
  • Save SteveGotthardt/084389e75deb7a8cd3f63b24cde4ea85 to your computer and use it in GitHub Desktop.
Save SteveGotthardt/084389e75deb7a8cd3f63b24cde4ea85 to your computer and use it in GitHub Desktop.
FFP0234_Aquila_X1_Main_Board_V1.0.0 with HC32

FFP0234_Aquila_X1_Main_Board_V1.0.0

This board is found on the Voxelab Aquila C2 - Mine had the H32 sticker. The Voxelab site shows there is now a N32 version. The klipper version I wrote for Aquila should work on this board with the changes to the printer.cfg file for klipper. The serial interface is through the CH340G from the HC32 to the micro-USB port. http://www.datasheetmeta.com/pdf.php?q=CH340G

  • CH340G.Pin 2: TXD is connected to HC32.Pin50 PA15
  • CH340G.Pin 3: RXD is connected to HC32.Pin42 PA9

Bootloader offset is 0x8000

LCD

LCD-Pins

LCD display connecting ribbon from the mainboard to the LCD. The LCD board is mismarked? The EXP13 LCD 10 pin connector from the display side - note the silkscreen pinout is reversed from electrical pin 1.

  • 10 / 1. +5V
  • 9 / 2. GND
  • 8 / 3. SID: PB15
  • 7 / 4. CS: PB12
  • 6 / 5. CLK: PB13
  • 5 / 6. ENC-A: PB14
  • 4 / 7. RST: ? PC2
  • 3 / 8. ENC-B: PC6
  • 2 / 9. BTN: PB1
  • 1 /10. BEEP: PB0 (this is the electrical pin 1)

The SID, CD and CLK are inverted so the driver code needs to be changed:

diff --git a/src/lcd_st7920.c b/src/lcd_st7920.c
index 7845c09f..9b01e25b 100644
--- a/src/lcd_st7920.c
+++ b/src/lcd_st7920.c
@@ -102,9 +102,9 @@ void
 command_config_st7920(uint32_t *args)
 {
     struct st7920 *s = oid_alloc(args[0], command_config_st7920, sizeof(*s));
-    s->sclk = gpio_out_setup(args[2], 0);
-    s->sid = gpio_out_setup(args[3], 0);
-    gpio_out_setup(args[1], 1);
+    s->sclk = gpio_out_setup(args[2], 1);
+    s->sid = gpio_out_setup(args[3], 1);
+    gpio_out_setup(args[1], 0);
 
     if (!CONFIG_HAVE_STRICT_TIMING) {
         s->sync_wait_ticks = args[4];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment