Spark Logic

Hacking the GD32 based ‘Autool X50 OBD2 Monitor and diagnostic Display’

carl0s

Hi!

I’m Carl

My first project with STM32 will hopefully be to get some code onto this GD32F103 board, and drive the LCD. I first need to figure out what the driver is. It appears to be using 17 pins.. Hopefully the ILI9341.

I will then use this as a screen / controller for my vehicle datalogger that I have already built on an Adafruit Feather M0.

Here’s the thing I want to hack..

Note that the mini-USB on the back here is actually for a vehicle OBD connection, and will be expecting +12v as well as K-Line, L-Line, CAN-Hi/CAN-Lo, etc.. It’s *not* a Mini-USB connection!

(in most web browsers, you can right-click on the images below and choose Open Image in New tab, to view at full resolution).

Image

Image

Image

Image

Image

Replies20

ahull Fri Apr 27, 2018 10:45 am

Glyphs … {1..835} … numbered.
montage -label '%t' {1..835}.png -tile 32x -geometry +1+1 -frame 5 -shadow -stroke "#000000" -bordercolor "#B3997A" -background none montage0.png

carl0s Fri Apr 27, 2018 11:04 am

Well bollocks. This LCD connection is quite different. Although I do only count about 13 pins connected on the PCB.

There’s no markings that help. It’s approx 1.5″ diagonal, glued to a round-ish piece of glass. 24 pin ribbon says CXTA on it.

I think it will be a 1.54″ 24pin, maybe like this one: https://www.alibaba.com/product-detail/ … 27041.html

or similar. that says st7789 too. it’s 320×320 that one though, so I guess these 1.54″ ST7789 screens come in various resolutions.

The whole thing is quite a bit smaller than I expected!

Arrrgh. Another problem. There aren’t so many pin/debug headers broken out. There’s just a J2. Not a J1 and an J2. It might not have UART broken out :(

After monitoring the mystery chip, and maybe monitoring the LCD for its init sequence (if its SPI), I’ll simply try the existing working code on it, just in case it is an ST7789 at 240*240. Such a panel does exist: https://www.adafruit.com/product/3787

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image

ahull Fri Apr 27, 2018 11:26 am

It is probably a similar display to the X50, since most of the other circuitry looks identical, but I guess it could also be a 1.5″ OLED, something like -> https://www.ebay.com/itm/1-5inch-OLED-M … SwdXdadssw

Whatever it is, it is most probably a jellybean part and there will be some kind of a driver for it.

I’m pretty sure we will be able to get it going. BTW is the mystery chip on this unit too? Is it also unmarked?

ahull Fri Apr 27, 2018 11:35 am

Its interesting that they went with a square display, as there do appear to be round displays available at fairly reasonable prices.

https://www.alibaba.com/trade/search?fs … =round+tft

Probably this was the least cost option in the size they required.

carl0s Fri Apr 27, 2018 11:40 am

[carl0s – Thu Apr 19, 2018 10:06 pm] –
Pin outs for the headers, looking from the top of the board where the LCD FFC socket is, with the buzzer at the bottom right.

J2
1 (left) – SWDIO
2 – SWDCLK
3 – GND
4 (right)- VDD

Board needs external power to use STLink though. VDD should just be connected to ‘target vcc detection’ pin of STLink (pin #1)

J1
1 (top) – GND
2 – nothing
3 – PB10
4 (bottom) – PB11

With the board still in the same orientation, 3 way switch / jog thingy pinouts:

Rotate Left: PC14
Push Middle: PC15
Rotate Right: PC13

Right. So this X60 PCB only has a J2. I did a visual inspection of the traces through the VIAs and thankfully it is still SWDEBUG. So I can program the device.
It’s a shame the UART3 isn’t broken out like it is on the bigger brother.

This is what my visual inspection revealed. From the side that’s actually labelled J2. Obviously I have the order inverted here from what I wrote about J2 on the X50 board:

J2 on X60 model:

1 vdd (pin64)
2 nowhere, maybe ground ? don't have a meter to hand
3 SWCLK
4 SWDIO

carl0s Fri Apr 27, 2018 11:43 am

[ahull – Fri Apr 27, 2018 11:35 am] –
Its interesting that they went with a square display, as there do appear to be round displays available at fairly reasonable prices.

https://www.alibaba.com/trade/search?fs … =round+tft

Probably this was the least cost option in the size they required.

I was looking at these (a lot!) last night, thinking about doing my own in a nice metal & glass fronted gauge. but a lot of them are MIPI, and only Alibaba sellers at the moment, no Aliexpress sellers. I would really like to get my hands on an SPI round one with an ILI or ST driver.

Would be nice to have something more high-end looking, like this:
Image

carl0s Fri Apr 27, 2018 11:44 am

[ahull – Fri Apr 27, 2018 11:26 am] –
It is probably a similar display to the X50, since most of the other circuitry looks identical, but I guess it could also be a 1.5″ OLED, something like -> https://www.ebay.com/itm/1-5inch-OLED-M … SwdXdadssw

Whatever it is, it is most probably a jellybean part and there will be some kind of a driver for it.

I’m pretty sure we will be able to get it going. BTW is the mystery chip on this unit too? Is it also unmarked?

Yep, same Mystery chip.

ahull Fri Apr 27, 2018 1:29 pm

Would be nice to have something more high-end looking, like this:
With a little imagination, you can have whatever UI you want.

Image
We can overwrite all of the Chinese characters and the images with whatever we fancy. 2Mb of flash gives you a lot of options.

carl0s Fri Apr 27, 2018 1:48 pm

[ahull – Fri Apr 27, 2018 1:29 pm] –
Would be nice to have something more high-end looking, like this:
With a little imagination, you can have whatever UI you want.

Image
We can overwrite all of the Chinese characters and the images with whatever we fancy. 2Mb of flash gives you a lot of options.

:D I think we’re on the same page with that gauge.

ahull Sat Apr 28, 2018 9:54 am

The “second set” of western glyphs from position 8837 to 9682.

Although it is similar, it includes some new ones, a few more arrows and another box drawing set.

montage -label '%t' {8837..9682}.png -tile 32x -geometry +1+1 -frame 5 -shadow -stroke "#000000" -bordercolor "#B3997A" -background none montage6.png

carl0s Sat Apr 28, 2018 6:54 pm

OK this is disappointing with the X60 LCD.

Firstly it has a 24pin FPC connector, 0.4mm pitch dual-row, as seen in mobile phones, making it a pain to hook up to. I may hook up fine wires to the MCU legs.

Secondly, the pin-outs don’t look good for SPI. It seems to be connected to general purpose IO on the MCU.

Here are the pins that I can see go from MCU to LCD connector.
PB5
PB15 (WAS TFT_MOSI ON X50 MODEL)
PA11
PA13 (WAS TFT_D/C ON X50 MODEL)
PA15 (WAS TFT_RST ON X50 MODEL)
PC6
PC7

No CLK or EN/SS ?

PB1 BACKLIGHT (SAME AS X50 MODEL)

sheepdoll Sat Apr 28, 2018 9:54 pm

Here are the Hex/decimal offsets into the font sections of the rom image. Interesting apart from the numbers there is no Arabic font or other west Asian fonts. There are a few what look like Hebrew letter/numbers at the end of the first table after the box draw characters, then a gap before the Chinese glyphs. As noted there are a few differences between the Book and the Bold typefaces.

0x000000 (0) %—- Western Roman Encoded fonts 24×24, these are serifed or ‘Book’ face

0x018C48 (101448) %—- Chinese 24×24

0x09B520 (636192) %Western Roman Bold 24×24

0x0B4168 (737640) %—- Chinese Bold 24×24

0x136A40 (1272384) %— ASCII order sans serif 8×16 — probably the main diagnostic (back channel) font.
0x137030 (1273904) %— ASCII order sans serif 16×24
0x138200 (1278464) %— ASCII order sans serif 16×32
0x1399C0 (1284544) %— ASCII order sans serif 24×48

0x13CF32 (1298226) %—- 10 Large Arabic numbers 40×72 1 or more bytes in-between each number May be some other (pad) bytes before the (-) minus mask.

0x13E157 (1302871) %— icons 32×48

0x13F460 (1307744) %— start of text

0x159406 (1414150) % end of text start of color graphics — next up is to decode the offsets into this area

ahull Sun Apr 29, 2018 3:49 am

@Sheepdoll – good work. Knowing those offsets makes re-using the fonts much easier since we just need a pointer a size and an offset to get the data.

@carl0s – I wouldn’t worry too much about soldering to that display, I’m sure we can figure it out from some pictures and a little imagination, without needing to resort to microsurgery. The connector looks like some of the Nokia phone connectors. This sort of thing -> http://andybrown.me.uk/2012/06/05/nokia … no-mega-1/ but I think the pin layout is different.

The vast majority of displays are very similar. Can you give me some good macro shots of both sides of the FPC, and some good shots of both sides of the main PCB, so we can follow the tracks and vias.

I would start by identifying all the GND pins on the display connector using the buzzer on your multimeter. Next I would see which pins go where from the GD32 – then perhaps try to figure out which pins look like they might have a backlight LED or two attached. I’m assuming this is a TFT not an OLED display. Again use the multimeter in continuity buzzer or diode mode between GND and the pins to see if there is a dim flicker from the display, it will be very dim I would imagine. You might not get any result for this as the LEDs may be in series.

While we are figuring that out, you could dump the X60 flash and we can see if it is broadly the same as the X50

sheepdoll Sun Apr 29, 2018 6:44 am

@ahull
here is a quick dump of the color image offsets and centered sizes:
0x159432 % 220×160
0x172F11 % 88×180
0x17E977 % 220×80
0x18AFA4 % 320×84
0x19EAE6 % 320×72
0x1AEDE2 % 320×100
0x1C5D98 % 320×72
0x1D3EC8 % 320×72
0x1E4548 % 320×72
0x1F572F % 320×46
Here is a dump of the images rotated an mirrored. I ran some through a reverse image search tinEye and google. The cxat trademark does not show up, which I find curious as it is in there three times. Wonder if it really is a registered trademark? If registered why does it not show up in a reverse image search?

The URL works and leads to a Malaysian website where some of the other graphics are found.

Google giggle gurgle seems to want to auto correct cxat to cat. The car image is a generic clip art piece which show up in a lot of places mirrored or color shifted. Gurgle says it is a Ferrari.

cobd18428a.jpg
cobd18428a.jpg (73.75 KiB) Viewed 641 times

ahull Sun Apr 29, 2018 8:10 am

The mystery chip appears to speak i2c with a 33KHz clock.
The pinouts (SDA on 5 and SCL on 6) match an eeprom, but the VCC and GND pins are opposite, also the amount of data coming to/from is tiny. LIke 1 or at most 2 bytes per read/write. I’m not sure what it is. It might not even be i2c.. the decoder might just be spewing out rubbish.
Here’s a capture of what it does on power-up. view with dsview from dreamsourcelab:
http://www.internetsomething.com/autool … y-chip.dsl

I have nothing that will read the .dsl file, so i can’t examine that information, but if there is little data being exchanged, then perhaps the device is a sensor of some sort (compass, gyro, temperature or whatever).

carl0s Sun Apr 29, 2018 5:44 pm

[ahull – Sun Apr 29, 2018 3:49 am] –
@carl0s – I wouldn’t worry too much about soldering to that display, I’m sure we can figure it out from some pictures and a little imagination, without needing to resort to microsurgery. The connector looks like some of the Nokia phone connectors. This sort of thing -> http://andybrown.me.uk/2012/06/05/nokia … no-mega-1/ but I think the pin layout is different.

The vast majority of displays are very similar. Can you give me some good macro shots of both sides of the FPC, and some good shots of both sides of the main PCB, so we can follow the tracks and vias.

I would start by identifying all the GND pins on the display connector using the buzzer on your multimeter. Next I would see which pins go where from the GD32 – then perhaps try to figure out which pins look like they might have a backlight LED or two attached. I’m assuming this is a TFT not an OLED display. Again use the multimeter in continuity buzzer or diode mode between GND and the pins to see if there is a dim flicker from the display, it will be very dim I would imagine. You might not get any result for this as the LEDs may be in series.

While we are figuring that out, you could dump the X60 flash and we can see if it is broadly the same as the X50

The display is really tiny though. I would still like to see if we can work it out, but I’m currently going down a MIPI rabbithole.
I ordered some 1.3″ round displays with ST7789 last night, which are SPI. I then realised that these are likely to be the same size as my 1.54″ screen but with the corners cut off / covered.. Too late now though, I ordered last night from dhgate.

I ordered an STM32L4R9I-DISCO (from Amazon would you believe) but then cancelled it when I DISCOVERed that the stm32s with MIPI-DSI (display interface, as opposed to CSI for Cameras), which is the stm32l4r9 and the stm32f469 and f479, well, they only have 2 MIPI data lanes / channels. Bit like PCI-express lanes. Some of the displays out there, including the nice 3.4″ one on Alibaba with a stunning 800×800 resolution, well, they need 3 lanes, or at least the ILI9881C chip on them is set up for 3 lanes. There’s a register and some ‘external pads’ (jumpers?) you can set, but as far as I can tell, if it’s set for 3 lanes, then to change it to 2 lanes, requires changing LANCEL from a 0 to 1, and that’s an external pad (meaning jumper?) rather than a register.

So now I’m acquiring MIPI displays (sending alibaba enquiries anyway) and hoping to get a board with the SSD2828 chip on it, which converts RGB (and maybe SPI.. not sure) to MIPI up to 4 lanes. There were loads of these boards available but none on Aliexpress any more.

The Amazon Echo Spot has a 2.5″ 480×480 screen that looks interesting. MIPI again though.

ahull Sun Apr 29, 2018 6:19 pm

Looking at Andy Brown’s Workshop pages and in particular -> http://andybrown.me.uk/2013/02/24/gener … ing-board/ I think it would be worth checking to see if the connector we are looking at is a good match for the Nokia one. The Nokia displays would be a good choice for this kind of device as they are ubiquitous and cheap.

carl0s Mon Apr 30, 2018 12:17 pm

[ahull – Sun Apr 29, 2018 6:19 pm] –
Looking at Andy Brown’s Workshop pages and in particular -> http://andybrown.me.uk/2013/02/24/gener … ing-board/ I think it would be worth checking to see if the connector we are looking at is a good match for the Nokia one. The Nokia displays would be a good choice for this kind of device as they are ubiquitous and cheap.

Hi Andy!

It’s not the same connector, no.

It’s slimmer, and also, it has notches in the ends. See below.

A lot of screen seem to use the Panasonic AGX series, then there’s the Molex 504208-2410 (24pin receptacle), which uses 504248-2410 plug, but it’s not that either.
It doesn’t look like the JAE or JST either.

I think a thorough search through mouser/digikey might be in order :)

I have just ordered some nice screens that use MIPI though. another project. see if I can do something with them and the SSD2828 bridge IC.

Image

Vivio Thu Jun 21, 2018 6:18 pm

carl0s can you describe more thoroughly how you program the device?

I have a GD32F130C6 and GD32F130C* which I cannot programm them with ST link v2.

Thanks in advance!

ahull Thu Jun 21, 2018 8:25 pm

I used an ST-LinkV2 clone to program mine. This thread has a few clues -> viewtopic.php?f=28&t=604
… and here -> http://wiki.stm32duino.com/index.php?ti … 103C8_mini

If you have an ST-Link or clone, you then need to identify Gnd, SWDIO (PA13) and SWCLK (PA14) connect those to your ST-Link and progam as per most of the STM32F103 board. There is a GD32 version of the bootloader, but I don’t know how up to date it is.

If the firmware is locked on your device, you may not be able to back it up, and may have to do a complete erase when you first flash any new code to it.
@carl0s may be able to fill in a few more details, as I last played with my red pill GD32 board a couple of years back.

Sign in to reply