Critique my first PCB - Page 1
Forum section: electronics / projects

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 12:05:47 pm
content: Hi. I'm looking for opinions or advice on my PCB layout.It's simply an adapter for the STM32L4R9I-DISCOVERY board to allow me to use a large round Panasys MIPI LCD display. It is to go in place of the supplied MB1314 AMOLED smartwatch daughterboard.So it has a backlight LED driver, basically following the datasheet circuit diagram, and then just tracks between the connectors. Both clock and DSI are high speed differentials. Annoyingly the P/N of the differential pairs always seemed to need to cross over each other! On the big connector they are side by side, but as the LCD panel's connector is double row, they are opposite each other instead!Things I thought about:I could have made use of the bottom layer for more than just one big ground fill. That could have made it much easier to route the tracks. I was trying to keep it simple though and wasn't sure if that was a good or bad idea.Number of vias to the ground layer.. too many? not enough?I suppose once I have one in my hand I will have a better idea of size and where I could have gone bigger or smaller. I will do a print out as well.I started with the ST schematics, just so I could get the big Samtec connector. That's why it still has their logo on it, and is named 'copy of mb1314' :-)Here's a PDF:http://www.internetsomething.com/lcd/pcb/PDF.pdfThe rest (gerbers etc) can be downloaded from this directory:http://www.internetsomething.com/lcd/pcb/and here's 3D pictures:Any obvious total fails? Other suggestions?

author: ataradov
author_rank: Super Contributor
timestamp: May 19, 2018, 06:43:44 pm
content: 1. It is probably better to have some of the traces go on the bottom layer rather than have them snake around between the pins of the connector like this.2. Purely aesthetic: I'd use only 45 degree traces.3. Pour solid ground on the top layer as well. And more ground stitching can't hurt. Especially close to those ground pins next to the differential lines

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 06:59:05 pm
content: Quote from: ataradov on May 19, 2018, 06:43:44 pmThanks. I have to admit, it was a lot harder than I expected. I started along merrily and then one track would be unroutable and I'd have to un-do it all and move components. One minute the LCD socket was below and the next it was above. Turning the backlight driver chip around multiple times, etc.I suppose I just thought that routing on both layers would be too much for me to try to deal with for my first time. Plus I was battling with not knowing how to use the program (Altium) that I borrowed. I think I might want to look at KiCad or Allegro as I have found a few things frustrating (length tuning being awkward, moving objects with tracks connected, erm, highlighted/unhighlighted toggle not actually reflecting what's on screen.. ).

author: ataradov
author_rank: Super Contributor
timestamp: May 19, 2018, 07:03:03 pm
content: Sometimes it is easier to go back and redo the whole board with your new knowledge after you've struggled though the first one.I would try to route all differential signals on one layer and actually keep the traces parallel for as long as possible. Then route remaining pins that can be routed cleanly on one side. A then move the rest on the other side. Right now there is not a whole lot of point in your length matching, for example.

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 07:05:45 pm
content: Quote from: ataradov on May 19, 2018, 07:03:03 pmHmm but the differential pairs are side by side on one connector, and top and bottom on the other. Unless I was to put the smaller LCD connector on sideways?How come there's not much point to the length matching? Is it not about time delay?

author: ataradov
author_rank: Super Contributor
timestamp: May 19, 2018, 07:10:21 pm
content: Nevermind, I thought there was much more going on with them. What you have is fine. Well the trace on the right can be made a bit more parallel to the other pair, but really on that distance it is all cosmetic and won't make much difference in real life.

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 07:14:30 pm
content: Quote from: ataradov on May 19, 2018, 07:10:21 pmYes I was just thinking about how that could be pulled in and kept parallel. No need for the odd shape.Thanks for your help!

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 07:24:08 pm
content: I made it more parallel:Altium is really annoying with that length tuning. For example it wouldn't move that extension piece higher. It will only allow it where it is - beneath the connector outline silkscreen.It's like it refuses to go anywhere near corners or something.

author: ataradov
author_rank: Super Contributor
timestamp: May 19, 2018, 07:26:19 pm
content: Add the ground pour on the top layer. And add more vias to connect the two. That's probably the best thing you can do on this board for signal integrity.

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 07:31:05 pm
content: Quote from: ataradov on May 19, 2018, 07:26:19 pmOK I shall have a go! Thanks.

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 08:08:17 pm
content: Right, I have had a go!I had the clearance rules turned off before because.. well because I didn't know better. I didn't realise they actually directed things like polygon pour to clear themselves around tracks. I thought they were just there to nag you about things!So I have done it, and.. well two things. Firstly, it's left a stray bit of copper, and as it's part of the overall polygon i don't know how to remove it. Just ignore it? I suppose it looks nice.. adds balance.Secondly, the clearance rules have highlighted to me that those tracks coming in beween the pads, are 3.89mils next to the connector pads. Do you think this is too close for el-cheapo PCB manufacturers? Please say it'll be fine..(I know, I need to put in some more vias)

author: ataradov
author_rank: Super Contributor
timestamp: May 19, 2018, 08:11:31 pm
content: The polygon part is fine. But the typical cheap PCB manufacturers offer 5/5 or 6/6 mil track/clearance. I typically route everything using 10 mil tracks and spaces when possible. So you will have to rethink your layout.

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 08:18:40 pm
content: Currently looking like this:

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 08:26:32 pm
content: Quote from: ataradov on May 19, 2018, 08:11:31 pmAlright.. Well, when I read that, I thought, bugger.. nightmare. Re-think. But, now that I know that the polygon pour is smart and will leave clearances around other nets, I think I'm comfortable with adding in vias and signal tracks on the bottom layer, instead of going between pins, and then re-pouring the bottom ground layer.I'm going to have a go after my teaThanks!

author: ocset
author_rank: Super Contributor
timestamp: May 19, 2018, 09:32:45 pm
content: here is my PCB layotu guide attached.Also, Dave Jones guide to PCB layouthttp://alternatezone.com/electronics/files/PCBDesignTutorialRevA.pdfThats Dave Jones who runs this site

author: carl0s
author_rank: Unknown
timestamp: May 19, 2018, 11:18:58 pm
content: I was reading Dave's 2004 PDF the other night!!Anyway, here is my latest revision. Better. I made the drill holes 12mil too. They were 10mil before.

author: ANTALIFE
author_rank: Frequent Contributor
timestamp: May 20, 2018, 06:03:06 am
content: My first though is that it looks like you have a switching DCDC converter, not sure of the current/power requirements but if it was me I would try connect each component that is part of the power path with a thicker track or a plane like this:

author: carl0s
author_rank: Unknown
timestamp: May 20, 2018, 09:56:46 am
content: Quote from: ANTALIFE on May 20, 2018, 06:03:06 amYes I thought that might come up. I'm just not quite sure how to do it in Altium other than by literally drawing the polygons, and I can see them ending up rather ugly :-)I might have a go though.It's an AP5724 DC to DC converter.http://www.internetsomething.com/lcd/AP5724%20backlight%20driver.pdfThere's 6 LEDs in series, at 20mA, 18v total, so 360mw total. They say the above driver chip is 84% efficient, so expected draw of 430mw. Call it 500mw. I'm not really sure I know enough about this stuff, but I gather it's current that matters. So the 500mw should pull 151mA from the 3.3v supply. I've used 10 mil traces which an online calculator says should be good for 450mA with 1oz copper. The LCD panel itself pulls 15mA. So I'm at about 165mA.What do you think? I suppose it makes sense for me to learn how to do the job properly though doesn't it..

author: carl0s
author_rank: Unknown
timestamp: May 20, 2018, 10:15:54 am
content: I've just tidied up some stray ground tracks for now, from before I did the ground fill on the top layer

author: David Chamberlain
author_rank: Frequent Contributor
timestamp: May 20, 2018, 11:33:29 am
content: What happened to the fill on the bottom?

author: carl0s
author_rank: Unknown
timestamp: May 20, 2018, 12:14:01 pm
content: Quote from: ANTALIFE on May 20, 2018, 06:03:06 amAll right, I have had a go! I have beefed up a lot of the tracks as well:

author: carl0s
author_rank: Unknown
timestamp: May 20, 2018, 12:14:54 pm
content: Quote from: David Chamberlain on May 20, 2018, 11:33:29 amIt's still there isn't it? I just didn't have it highlighted it in the image so it was under the soldermask.

author: ANTALIFE
author_rank: Frequent Contributor
timestamp: May 20, 2018, 02:14:31 pm
content: Quote from: carl0s on May 20, 2018, 09:56:46 amThe way I see it if the LED's expect to consume 360mW and the converter is 84% efficient then this means 70mW will be dissipated as heat in the SOT23-6 package. Given that θJA is 162°C/W this means that IC will rise by ~11°C above ambient. Not that bad but for the sake of it I would still use a polygon to help dissipate the heat, and give the current a much less resistance pathway (lower ohmic loss, not that it matters that much with your current draw).As for polygons you can either manually place them down and adjust as you go like:Or you could use another layer (like MECH 1) to define the shape and then create a polygon on copper layer, like (Create Polygon from Selected Primitives):https://www.altium.com/documentation/15.1/display/ADES/PCB_Cmd-ConvertSelected((ConvertSelected))_ADAlso I think your latest iteration with polygons looks better, but there is still room for improvement. To get an idea of a good layout have a look at the appnote:https://www.diodes.com/diodes-part-files/AC/AP5724/User%20Guides%20and%20EV%20Boards/AP5724-EVM.pdfNotice how all components part of the power path (inductor, diode, filter caps, IC...) are all connected via a large polygon

author: Dave
author_rank: Super Contributor
timestamp: May 20, 2018, 04:42:19 pm
content: The current paths in that SMPS look unnecessarily long. You want the high currents to have short, uninterrupted current paths from the input capacitors to the output capacitors.You could improve this by rotating the inductor by 90° clockwise and move those input capacitors closer to the output caps. Also, fatten the traces up around the diode.

author: carl0s
author_rank: Unknown
timestamp: May 20, 2018, 05:45:29 pm
content: Quote from: ANTALIFE on May 20, 2018, 02:14:31 pmThank you. I didn't think of dissipating heat with pads/polygon.The reason my +3.3v polygon doesn't continue through the diode is because the LED driver datasheet specifically says to minimise trace width here.However, I may be misunderstanding. Perhaps it's just the trace from the diode to the IC that needs to be minimised, and maybe I should still have a fat trace (polygon) from the inductor to the diode.. but then.. isn't the effect the same?

author: carl0s
author_rank: Unknown
timestamp: May 20, 2018, 06:35:53 pm
content: Quote from: Dave on May 20, 2018, 04:42:19 pmI'm not clear on how to do that :-/What about moving output capacitor C4 up top by the LCD socket? Would that be an improvement?

author: ANTALIFE
author_rank: Frequent Contributor
timestamp: May 20, 2018, 11:32:48 pm
content: I think they mean trace area going into SW pin, if you have a look at reference design they still have a wide traces for all components it's only when they funnel into the IC that they become smaller (design constraint of pin positions).Also Dave made a good point. Think of a transient happening on the Vout and suddenly you must supply additional current to get the voltage back up, how you have C4 positioned makes it harder for the circuit to respond faster.

author: carl0s
author_rank: Unknown
timestamp: May 21, 2018, 12:05:28 am
content: Quote from: ANTALIFE on May 20, 2018, 11:32:48 pmI hear ya. I did think that C4 might need moving closer to the LED backlight. I just wasn't sure about moving the other caps or re-orienting the inductor... too much brain power required at this stage!The whole thing is super tiny mind you - if that makes a difference. In fact I forgot how small it was, and I have just spent ages lengthening the pads on the small LCD connector at the top so that I have a better chance of soldering it.Here's the latest iteration/changes then.. Hopefully it'll do the job. I forgot to re-apply teardrops, but I'll do that later.

author: carl0s
author_rank: Unknown
timestamp: May 21, 2018, 11:24:56 am
content: Any better? : C4 only has that one 12mil via to ground. Do you think that's a problem? I suppose I could simply make it a bigger via. Otherwise, if it matters, I'd have to look to get the ground pour to reach around.

author: carl0s
author_rank: Unknown
timestamp: May 21, 2018, 11:39:36 am
content: nevermind, I have sorted that ground pour for C4

author: carl0s
author_rank: Unknown
timestamp: May 21, 2018, 07:18:16 pm
content: I've got an important question.C1 (100nf) and C3 (1uF) are in parallel, right next to each other.This is because the original schematic had C1 on the power into the board, and then the datasheet schematic for the backlight driver had C3 (1uF) in it.Should I ditch one of them? Obviously this elementary question will highlight my naivety and lack of knowledge on basic electronics :-/I have beefed all the caps up to 0805s, for ease of placement, and availability on the higher voltage side (~18 - 20v).

author: BrianHG
author_rank: Super Contributor
timestamp: May 21, 2018, 07:58:35 pm
content: If J1 is a single sided flex cable connector, the pins where you length equalize extended the traces may travel into the connector to the flex cable with a little more length inside the connector compared to the pins right under the connector. Have you taken this into account when extending those 2 traces to their length on the PCB?

author: carl0s
author_rank: Unknown
timestamp: May 21, 2018, 08:23:42 pm
content: Quote from: BrianHG on May 21, 2018, 07:58:35 pmHi. Do you mean that they may have already compensated for the connector pin separation in the flex cable?

author: carl0s
author_rank: Unknown
timestamp: June 06, 2018, 09:50:08 pm
content: boards have come out looking reasonable, and the pads line up tooI'll report back if they actually work, once I've finished my reflow oven.

author: carl0s
author_rank: Unknown
timestamp: July 14, 2018, 04:35:51 pm
content: So it turns out I had the LCD pinouts back to frontMy first attempt at reflow soldering went well. Little bit too much paste - bridge on a pin that didn't matter.but the LCD backlight driver didn't work. Progress was hampered by the fact that I've only ever done Arduino. Between Keil and TrueStudio, I had a hard time getting the discovery board example programs to compile. I needed them to compile so that I could add in an 'HAL_GPIOB pin1 enable' thingy.. i.e. turn on the LCD backlight, since the examples are all meant for the amoled screen with no backlight.I did some playing. In fact I burned out one of my LCD flat flex by sticking a li-po on it and getting the polarity back to front. I guess this is why I need a current limiting power supply. DP711 or DP832 though.. ? DP832 is more money but crucially its kind of hugeAnyway then I constructed a better test.. 5 plain LEDs wired in series on some breadboard, to be driven by my little circuit. and it worked! 3.3v in, drives 5x LEDs nicely.Then I looked closely at the LCD datasheet for the FFC pinouts and it looks like I had it the wrong way up. Well, what I mean is that I assumed the FPC to be going in the connector at top-contact rather than bottom contact. So pins 1-17 should be pins 17-1 instead. Left to right-flip.I don't think this is fixable. So I have 49 keychain PCBsIn all honesty, it quickly became apparent that I have made myself a PCB here that's very difficult to debug (since it's face down when fitted to the ST Discovery board). Perhaps I'll spend a bit more time on rev 2 and put some test points, as well as maybe more than one type of LCD connector.

author: carl0s
author_rank: Unknown
timestamp: July 14, 2018, 05:35:19 pm
content: Checking over my designs and I can see why it's happened. I used Molex 504281-1700 in the design, which has contacts on both top and bottom. I have 5 of these connectors. I actually fitted a flip-connector though (Amp 10061122-171120HLF), which seemed to grip the FPC better, and was dirt cheap. These are bottom contact only. So it might be Ok after all if I use the other connector

author: CopperCone
author_rank: Super Contributor
timestamp: July 14, 2018, 05:53:26 pm
content: Did you protect your I/O? I did not look at it but there might be special things you need to do if that chip is the first thing in the circuit connected by a wire.And how is that board being mounted mechanically? I don't see any screw holes. I assume it clips into a assembly some how? Keeping it stationary is important.

author: carl0s
author_rank: Unknown
timestamp: July 14, 2018, 06:45:39 pm
content: Hi. The Samtec DSI connector makes a tight fit!I'm just reflowing a second attempt now. I had some 17-way 0.3mm top contact flip connectors.. unknown brand from Aliexpress. Just trying again with one of thoseI only have one more of these LCD panels left though

author: carl0s
author_rank: Unknown
timestamp: July 14, 2018, 07:15:17 pm
content: Sweet. It works!There were a couple of solder bridges there which were on unused pins, but I've wicked them out now anyway.Just need to figure out what needs changing in the LCD driver code now !This is a marked improvement from a couple of hours ago where I thought I'd designed the pin outs back to front and would have to re-do the design!

author: carl0s
author_rank: Unknown
timestamp: July 14, 2018, 08:55:54 pm
content: Well, something's happening. The thing is, I can't make sense of all the DSI init commands in the example code. I just don't know how the sequence works. Having spent about an hour reading data sheets and still not really understanding, I removed a load of the init commands (which aren't meant for this screen), and I got this:then I removed some more, and now I have this

author: carl0s
author_rank: Unknown
timestamp: July 14, 2018, 09:21:05 pm
content: Now I have added in a command, and it works as per the data sheet. Yay. MADCTL, x-mirror, etc.

author: carl0s
author_rank: Unknown
timestamp: July 14, 2018, 10:56:04 pm
content: So close now.I think all that's wrong is the GFXMMU thing that basically manages memory (framebuffer) usage for circular displays. It chops off bits or something. I dunno. Well anyway it all looks good so maybe I should move onto the StEmWin stuff.

author: lukewren
author_rank: Contributor
timestamp: July 15, 2018, 05:44:49 pm
content: I realise you now have your boards back (and they work! awesome!) so it's probably a bit too late, but... why do you have thermal relief on your stitching vias?

author: carl0s
author_rank: Unknown
timestamp: July 15, 2018, 06:29:04 pm
content: Quote from: lukewren on July 15, 2018, 05:44:49 pmWhat's that then??Is that something to do with the vias looking like a cross-hair? (I have no idea why that is.. Altium just did that).

author: carl0s
author_rank: Unknown
timestamp: July 15, 2018, 06:42:29 pm
content: Another weird thing is that R1 footprint.It's a metric 1608 (should be same as an 0603) from the Cern Altium library. The footprint looked like an odd size in the end though and I've actually put an 0805 resistor on there. I've done two of the boards now and it seems to fit OK. All the caps are 0805 anyway. Sort of figured there might be less chance of tombstoning with bigger bits / more paste etc.

author: james_s
author_rank: Super Contributor
timestamp: July 15, 2018, 06:48:11 pm
content: That has worked out remarkably well for a first PCB. In the future I would suggest using thicker traces in the switching regulator area, and keeping everything as short as possible there but it seems it has worked out ok in this case.

author: carl0s
author_rank: Unknown
timestamp: July 15, 2018, 06:51:26 pm
content: Quote from: james_s on July 15, 2018, 06:48:11 pmThanks for the tips. Yes I'm pleased!I did burn up one of my LCDs mind you. Thankfully just as $25 one.I really do need to get a current limiting PSU that doesn't take up half a desk.. I might look at those modules that Dave reviewed some time ago. Those all over eBay.

author: carl0s
author_rank: Unknown
timestamp: July 16, 2018, 12:30:16 am
content: Last pic, cos I'm super chuffed

author: james_s
author_rank: Super Contributor
timestamp: July 16, 2018, 12:55:23 am
content: That looks really good, it's always very exciting when a complex display like that actually works. That would make an interesting analog style desk clock or weather station, I've always been fond of analog dials.

author: bitseeker
author_rank: Super Contributor
timestamp: July 16, 2018, 06:33:10 am
content: Quote from: carl0s on July 15, 2018, 06:29:04 pmNice job with that board, Carl. It was cool seeing it improve as the thread progressed.I, too, was wondering about the thermal relief on the vias. Yes, it's those crosshair-looking structures. They reduce the rate at which heat flows from the pad to the ground plane so that it's easier to heat the pad for soldering. Normally, you'd do that where you have to solder through-hole parts, otherwise a soldering iron might struggle. Since these are vias, they're not needed.I haven't used Altium, but there must be an option to turn off the thermal relief or perhaps choose a different part for vias vs. plated through holes for leads. Of course, it won't affect anything the way it is since those are simply vias. It just looks odd. Something to figure out for the next PCB.

author: carl0s
author_rank: Unknown
timestamp: July 16, 2018, 08:05:10 am
content: Quote from: bitseeker on July 16, 2018, 06:33:10 amThanks! Yes I googled thermal relief vias and found some pictures in the end. I'll watch out for it next time.

author: carl0s
author_rank: Unknown
timestamp: July 16, 2018, 07:41:13 pm
content: Quote from: james_s on July 16, 2018, 12:55:23 amIt sure is an interesting screen. It's quite bright (650 nits), and doesn't have a touch screen. Meant for industrial/scientific. Will do nicely for some kind of automotive gauge I think. It is part of my foray into MIPI DSI screens on microcontrollers. There aren't many MCUs that do MIPI DSI, but the STM32L4+ does - it does up to 2 lane MIPI DSI. This screen only needs 1 lane. I think the interesting thing is (although I know nothing about non-MIPI screens...) that the command set is somewhat standardised. So it should be pretty easy to get different screens going. Famous last words..My next project, is to try to get this much bigger round TFT to work. This is a proper ~3.4" TFT. You can see it's a lot bigger than the octagonal one that I have had success with - that one is also sold as 3.34", but it's really about 2.4". It was possibly cut from a 3.34" square once upon a time though. This bigger one requires 3 MIPI lanes, and no MCU supports that, so part of the project will involve getting the SSD2828 RGB to MIPI bridge chip working. That's the QFN68 chip that you can see on the proto-board there. This big one is gram-less i.e. has no internal graphics memory/framebuffer, and I don't know enough about these things yet to know how much harder that will make things, but it'll be interesting having a go! The dev board I have, and the ST discovery board, all have decent amounts of SDRAM or PSRAM etc which I think can be used as the framebuffer, and they both have LTDC (LCD TFT Display Controller) which handles a lot of the work for you as far as I know.Oh yeah that's what I meant to say.. this big round one is 800*800px !! It really does look like a beauty, but, the brightness according to the datasheet is only 350 nits, and this has sort of put it on the back burner for me, also the complexity of my first project of course.. I have started with the simpler 1-lane MIPI.

author: dlo
author_rank: Newbie
timestamp: January 17, 2019, 10:17:58 pm
content: Nice work Carl! I'm trying to do something similar with a smaller 2.1" DSI LCD using the ST7796H2 controller. Can you share what files you edited to make yours work? Thanks!

author: luiHS
author_rank: Frequent Contributor
timestamp: August 01, 2019, 12:00:50 pm
content: Hi carl0s.I will use the same octagonal screen, for now the only thing I know is that it uses the ST7796SI controller, I have no experience with MIPI DSI screens.From what I understand, it is necessary to send some commands to initialize it. In my case I will use an STM32F769 microcontroller, because it has hardware JPEG decoding, I will test it with a Discovery evaluation board. I have also made my adapter board (pictures attached), to connect it to the Discovery, this includes a voltage booster (18v) for the backlight.Could you share the modifications you made to the source, to initialize this screen? As you indicated, you removed all the initialization commands from the kit, and with that it started working, but you added a command to make it work perfectly.Regards

author: luiHS
author_rank: Frequent Contributor
timestamp: August 01, 2019, 12:12:49 pm
content: Also attached, a technical documentation, which was sent to me by the seller of the screen, on the list of commands on the screen. I don't know if they are standard DCS commands, or each screen needs its own list of MCS commands.

author: carl0s
author_rank: Unknown
timestamp: August 02, 2019, 02:02:18 pm
content: Hi!I will try to get time this weekend to find what I modified and post it on here.I made some more of the LCD adapter boards last night, and I also now have the stm32f769ni discovery board, for which I'd also like to make the big round screen work. There was a reason why I bought that disco kit but I can't for the life of me remember it.. I think I just wanted to have a further play with TouchGFX designer.

author: luiHS
author_rank: Frequent Contributor
timestamp: August 02, 2019, 09:25:49 pm
content: Okay thanks.The good feature of the STM32F769 is that it integrates hardware JPEG decoding, so you can see any JPEG image instantly, or play MJPEG video very smoothly and with a good resolution for these small screens.In the Cube, there is a complete video player source for the EVAL board, and one to display JPEG images for the Discovery. Considering that both boards use the same microncontroller, I hope to use the source of the EVAL video player on Discovery, my only question is about the initialization sequence of the screen.I have the documentation that I have put before, on the commands that the screen controller accepts, as soon as I can I will try everything. I also have other round screens, some of the vendor gives documentation, others only a very basic datasheet that does not give any information about DCS or MCS commands.Waiting, with great interest, for the list of commands you used to make your screen work, is the same one I want to use.

author: carl0s
author_rank: Unknown
timestamp: August 03, 2019, 02:33:36 pm
content: Quote from: luiHS on August 02, 2019, 09:25:49 pmI'm off to the supermarket to get some cold coca cola, then I'm going to dig through my project to find what I changed. Then I'll try the same stuff on the STM32F769 Disco board that I have here.

author: carl0s
author_rank: Unknown
timestamp: August 03, 2019, 03:42:34 pm
content: You will be surprised. It looks like, apart from one command, I simply removed all the rest.I was working with the BSP Example / Demo. I.e. the board support package demo - that's what you can see in my photos before, with the ST logo etc.The original LCD Power on sequence in /STM32Cube_FW_L4_v1.12.0/Drivers/BSP/STM32L4R9I-Discovery/stm32l4r9i_discovery_lcd.c (for the included GVO 1.2" 390*390 AMOLED smartwatch-screen) looked like this:Code:/*************************//* LCD POWER ON SEQUENCE *//*************************//* Step 1 *//* Go to command 2 */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xFE, 0x01);/* IC Frame rate control, set power, sw mapping, mux swithc timing command */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x06, 0x62);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0E, 0x80);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0F, 0x80);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x10, 0x71);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x13, 0x81);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x14, 0x81);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x15, 0x82);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x16, 0x82);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x18, 0x88);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x19, 0x55);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1A, 0x10);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1C, 0x99);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1D, 0x03);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1E, 0x03);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1F, 0x03);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x20, 0x03);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x25, 0x03);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x26, 0x8D);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x2A, 0x03);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x2B, 0x8D);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x36, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x37, 0x10);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x3A, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x3B, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x3D, 0x20);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x3F, 0x3A);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x40, 0x30);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x41, 0x1A);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x42, 0x33);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x43, 0x22);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x44, 0x11);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x45, 0x66);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x46, 0x55);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x47, 0x44);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x4C, 0x33);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x4D, 0x22);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x4E, 0x11);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x4F, 0x66);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x50, 0x55);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x51, 0x44);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x57, 0x33);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x6B, 0x1B);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x70, 0x55);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x74, 0x0C);/* Go to command 3 */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xFE, 0x02);/* Set the VGMP/VGSP coltage control */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x9B, 0x40);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x9C, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x9D, 0x20);/* Go to command 4 */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xFE, 0x03);/* Set the VGMP/VGSP coltage control */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x9B, 0x40);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x9C, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x9D, 0x20);/* Go to command 5 */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xFE, 0x04);/* VSR command */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x5D, 0x10);/* VSR1 timing set */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x00, 0x8D);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x01, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x02, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x03, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x04, 0x10);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x05, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x06, 0xA7);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x07, 0x20);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x08, 0x00);/* VSR2 timing set */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x09, 0xC2);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0A, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0B, 0x02);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0C, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0D, 0x40);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0E, 0x06);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x0F, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x10, 0xA7);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x11, 0x00);/* VSR3 timing set */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x12, 0xC2);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x13, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x14, 0x02);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x15, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x16, 0x40);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x17, 0x07);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x18, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x19, 0xA7);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1A, 0x00);/* VSR4 timing set */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1B, 0x82);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1C, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1D, 0xFF);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1E, 0x05);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x1F, 0x60);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x20, 0x02);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x21, 0x01);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x22, 0x7C);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x23, 0x00);/* VSR5 timing set */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x24, 0xC2);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x25, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x26, 0x04);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x27, 0x02);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x28, 0x70);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x29, 0x05);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x2A, 0x74);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x2B, 0x8D);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x2D, 0x00);/* VSR6 timing set */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x2F, 0xC2);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x30, 0x00);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x31, 0x04);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x32, 0x02);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x33, 0x70);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x34, 0x07);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x35, 0x74);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x36, 0x8D);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x37, 0x00);/* VSR marping command */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x5E, 0x20);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x5F, 0x31);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x60, 0x54);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x61, 0x76);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x62, 0x98);/* Go to command 6 */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xFE, 0x05);/* Set the ELVSS voltage */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x05, 0x17);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x2A, 0x04);HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x91, 0x00);/* Go back in standard commands */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xFE, 0x00);/* Set tear off */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, DSI_SET_TEAR_OFF, 0x0);/* Set DSI mode to internal timing added vs ORIGINAL for Command mode */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0xC2, 0x0);/* Set memory address MODIFIED vs ORIGINAL */uint8_t InitParam1= {0x00, 0x04, 0x01, 0x89}; // MODIF OFe: adjusted w/ real imageHAL_DSI_LongWrite(&hdsi_discovery, 0, DSI_DCS_LONG_PKT_WRITE, 4, DSI_SET_COLUMN_ADDRESS, InitParam1);uint8_t InitParam2= {0x00, 0x00, 0x01, 0x85};HAL_DSI_LongWrite(&hdsi_discovery, 0, DSI_DCS_LONG_PKT_WRITE, 4, DSI_SET_PAGE_ADDRESS, InitParam2);/* Sleep out */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P0, DSI_EXIT_SLEEP_MODE, 0x0);HAL_Delay(120);My changed version of that sequence looks like this :Code:/*************************//* LCD POWER ON SEQUENCE *//*************************/// very minimal init code for panasys round octagonal tft// this is 0x36 for MADCTL, with parameter 0x48 for xmirror, top left to bottom-right, bgrHAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x36, 0x48);//HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x3A, 0x55);/* Sleep out */HAL_DSI_ShortWrite(&hdsi_discovery, 0, DSI_DCS_SHORT_PKT_WRITE_P0, DSI_EXIT_SLEEP_MODE, 0x0);HAL_Delay(120);Essentially I replaced all the LCD init code with a simple MATCTL 0x48 (that is cmd 0x36, data 0x48).I created a rough GFXMMU_LUT, but this is just to save memory by, erm, not allocating the bits of pixel space that would be outside of the circle. I think you can work without it..Code:/********************************************************************************* File Name : gfxmmu_lut.h* Description : header file for GFX MMU Configuration Table******************************************************************************** This notice applies to any and all portions of this file* that are not between comment pairs USER CODE BEGIN and* USER CODE END. Other portions of this file, whether* inserted by the user or by software development tools* are owned by their respective copyright owners.** COPYRIGHT(c) 2018 STMicroelectronics** Redistribution and use in source and binary forms, with or without modification,* are permitted provided that the following conditions are met:* 1. Redistributions of source code must retain the above copyright notice,* this list of conditions and the following disclaimer.* 2. Redistributions in binary form must reproduce the above copyright notice,* this list of conditions and the following disclaimer in the documentation* and/or other materials provided with the distribution.* 3. Neither the name of STMicroelectronics nor the names of its contributors* may be used to endorse or promote products derived from this software* without specific prior written permission.** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.********************************************************************************//* Define to prevent recursive inclusion -------------------------------------*/#ifndef __gfxmmu_lut_H#define __gfxmmu_lut_H#ifdef __cplusplusextern "C" {#endif// GFX MMU Configuration Table#define GFXMMU_FB_SIZE 359680#define GFXMMU_LUT_FIRST 0#define GFXMMU_LUT_LAST 319#define GFXMMU_LUT_SIZE 320uint32_t gfxmmu_lut_config_argb8888[2*GFXMMU_LUT_SIZE] = {0x003B1401, //GFXMMU_LUT0L0x003FFEC0, //GFXMMU_LUT0H0x003C1301, //GFXMMU_LUT1L0x00000150, //GFXMMU_LUT1H0x003C1301, //GFXMMU_LUT2L0x000003F0, //GFXMMU_LUT2H0x003C1301, //GFXMMU_LUT3L0x00000690, //GFXMMU_LUT3H0x003C1301, //GFXMMU_LUT4L0x00000930, //GFXMMU_LUT4H0x003D1201, //GFXMMU_LUT5L0x00000BE0, //GFXMMU_LUT5H0x003D1201, //GFXMMU_LUT6L0x00000EA0, //GFXMMU_LUT6H0x003D1201, //GFXMMU_LUT7L0x00001160, //GFXMMU_LUT7H0x003D1201, //GFXMMU_LUT8L0x00001420, //GFXMMU_LUT8H0x003E1101, //GFXMMU_LUT9L0x000016F0, //GFXMMU_LUT9H0x003E1101, //GFXMMU_LUT10L0x000019D0, //GFXMMU_LUT10H0x003E1101, //GFXMMU_LUT11L0x00001CB0, //GFXMMU_LUT11H0x003E1101, //GFXMMU_LUT12L0x00001F90, //GFXMMU_LUT12H0x003F1001, //GFXMMU_LUT13L0x00002280, //GFXMMU_LUT13H0x003F1001, //GFXMMU_LUT14L0x00002580, //GFXMMU_LUT14H0x003F1001, //GFXMMU_LUT15L0x00002880, //GFXMMU_LUT15H0x003F1001, //GFXMMU_LUT16L0x00002B80, //GFXMMU_LUT16H0x00400F01, //GFXMMU_LUT17L0x00002E90, //GFXMMU_LUT17H0x00400F01, //GFXMMU_LUT18L0x000031B0, //GFXMMU_LUT18H0x00400F01, //GFXMMU_LUT19L0x000034D0, //GFXMMU_LUT19H0x00400F01, //GFXMMU_LUT20L0x000037F0, //GFXMMU_LUT20H0x00410E01, //GFXMMU_LUT21L0x00003B20, //GFXMMU_LUT21H0x00410E01, //GFXMMU_LUT22L0x00003E60, //GFXMMU_LUT22H0x00410E01, //GFXMMU_LUT23L0x000041A0, //GFXMMU_LUT23H0x00410E01, //GFXMMU_LUT24L0x000044E0, //GFXMMU_LUT24H0x00420D01, //GFXMMU_LUT25L0x00004830, //GFXMMU_LUT25H0x00420D01, //GFXMMU_LUT26L0x00004B90, //GFXMMU_LUT26H0x00420D01, //GFXMMU_LUT27L0x00004EF0, //GFXMMU_LUT27H0x00420D01, //GFXMMU_LUT28L0x00005250, //GFXMMU_LUT28H0x00430C01, //GFXMMU_LUT29L0x000055C0, //GFXMMU_LUT29H0x00430C01, //GFXMMU_LUT30L0x00005940, //GFXMMU_LUT30H0x00430C01, //GFXMMU_LUT31L0x00005CC0, //GFXMMU_LUT31H0x00430C01, //GFXMMU_LUT32L0x00006040, //GFXMMU_LUT32H0x00440B01, //GFXMMU_LUT33L0x000063D0, //GFXMMU_LUT33H0x00440B01, //GFXMMU_LUT34L0x00006770, //GFXMMU_LUT34H0x00440B01, //GFXMMU_LUT35L0x00006B10, //GFXMMU_LUT35H0x00440B01, //GFXMMU_LUT36L0x00006EB0, //GFXMMU_LUT36H0x00450A01, //GFXMMU_LUT37L0x00007260, //GFXMMU_LUT37H0x00450A01, //GFXMMU_LUT38L0x00007620, //GFXMMU_LUT38H0x00450A01, //GFXMMU_LUT39L0x000079E0, //GFXMMU_LUT39H0x00450A01, //GFXMMU_LUT40L0x00007DA0, //GFXMMU_LUT40H0x00460901, //GFXMMU_LUT41L0x00008170, //GFXMMU_LUT41H0x00460901, //GFXMMU_LUT42L0x00008550, //GFXMMU_LUT42H0x00460901, //GFXMMU_LUT43L0x00008930, //GFXMMU_LUT43H0x00460901, //GFXMMU_LUT44L0x00008D10, //GFXMMU_LUT44H0x00470801, //GFXMMU_LUT45L0x00009100, //GFXMMU_LUT45H0x00470801, //GFXMMU_LUT46L0x00009500, //GFXMMU_LUT46H0x00470801, //GFXMMU_LUT47L0x00009900, //GFXMMU_LUT47H0x00470801, //GFXMMU_LUT48L0x00009D00, //GFXMMU_LUT48H0x00480701, //GFXMMU_LUT49L0x0000A110, //GFXMMU_LUT49H0x00480701, //GFXMMU_LUT50L0x0000A530, //GFXMMU_LUT50H0x00480701, //GFXMMU_LUT51L0x0000A950, //GFXMMU_LUT51H0x00480701, //GFXMMU_LUT52L0x0000AD70, //GFXMMU_LUT52H0x00490601, //GFXMMU_LUT53L0x0000B1A0, //GFXMMU_LUT53H0x00490601, //GFXMMU_LUT54L0x0000B5E0, //GFXMMU_LUT54H0x00490601, //GFXMMU_LUT55L0x0000BA20, //GFXMMU_LUT55H0x00490601, //GFXMMU_LUT56L0x0000BE60, //GFXMMU_LUT56H0x004A0501, //GFXMMU_LUT57L0x0000C2B0, //GFXMMU_LUT57H0x004A0501, //GFXMMU_LUT58L0x0000C710, //GFXMMU_LUT58H0x004A0501, //GFXMMU_LUT59L0x0000CB70, //GFXMMU_LUT59H0x004A0501, //GFXMMU_LUT60L0x0000CFD0, //GFXMMU_LUT60H0x004B0401, //GFXMMU_LUT61L0x0000D440, //GFXMMU_LUT61H0x004B0401, //GFXMMU_LUT62L0x0000D8C0, //GFXMMU_LUT62H0x004B0401, //GFXMMU_LUT63L0x0000DD40, //GFXMMU_LUT63H0x004B0401, //GFXMMU_LUT64L0x0000E1C0, //GFXMMU_LUT64H0x004C0301, //GFXMMU_LUT65L0x0000E650, //GFXMMU_LUT65H0x004C0301, //GFXMMU_LUT66L0x0000EAF0, //GFXMMU_LUT66H0x004C0301, //GFXMMU_LUT67L0x0000EF90, //GFXMMU_LUT67H0x004C0301, //GFXMMU_LUT68L0x0000F430, //GFXMMU_LUT68H0x004D0201, //GFXMMU_LUT69L0x0000F8E0, //GFXMMU_LUT69H0x004D0201, //GFXMMU_LUT70L0x0000FDA0, //GFXMMU_LUT70H0x004D0201, //GFXMMU_LUT71L0x00010260, //GFXMMU_LUT71H0x004D0201, //GFXMMU_LUT72L0x00010720, //GFXMMU_LUT72H0x004E0101, //GFXMMU_LUT73L0x00010BF0, //GFXMMU_LUT73H0x004E0101, //GFXMMU_LUT74L0x000110D0, //GFXMMU_LUT74H0x004E0101, //GFXMMU_LUT75L0x000115B0, //GFXMMU_LUT75H0x004E0101, //GFXMMU_LUT76L0x00011A90, //GFXMMU_LUT76H0x004F0001, //GFXMMU_LUT77L0x00011F80, //GFXMMU_LUT77H0x004F0001, //GFXMMU_LUT78L0x00012480, //GFXMMU_LUT78H0x004F0001, //GFXMMU_LUT79L0x00012980, //GFXMMU_LUT79H0x004F0001, //GFXMMU_LUT80L0x00012E80, //GFXMMU_LUT80H0x004F0001, //GFXMMU_LUT81L0x00013380, //GFXMMU_LUT81H0x004F0001, //GFXMMU_LUT82L0x00013880, //GFXMMU_LUT82H0x004F0001, //GFXMMU_LUT83L0x00013D80, //GFXMMU_LUT83H0x004F0001, //GFXMMU_LUT84L0x00014280, //GFXMMU_LUT84H0x004F0001, //GFXMMU_LUT85L0x00014780, //GFXMMU_LUT85H0x004F0001, //GFXMMU_LUT86L0x00014C80, //GFXMMU_LUT86H0x004F0001, //GFXMMU_LUT87L0x00015180, //GFXMMU_LUT87H0x004F0001, //GFXMMU_LUT88L0x00015680, //GFXMMU_LUT88H0x004F0001, //GFXMMU_LUT89L0x00015B80, //GFXMMU_LUT89H0x004F0001, //GFXMMU_LUT90L0x00016080, //GFXMMU_LUT90H0x004F0001, //GFXMMU_LUT91L0x00016580, //GFXMMU_LUT91H0x004F0001, //GFXMMU_LUT92L0x00016A80, //GFXMMU_LUT92H0x004F0001, //GFXMMU_LUT93L0x00016F80, //GFXMMU_LUT93H0x004F0001, //GFXMMU_LUT94L0x00017480, //GFXMMU_LUT94H0x004F0001, //GFXMMU_LUT95L0x00017980, //GFXMMU_LUT95H0x004F0001, //GFXMMU_LUT96L0x00017E80, //GFXMMU_LUT96H0x004F0001, //GFXMMU_LUT97L0x00018380, //GFXMMU_LUT97H0x004F0001, //GFXMMU_LUT98L0x00018880, //GFXMMU_LUT98H0x004F0001, //GFXMMU_LUT99L0x00018D80, //GFXMMU_LUT99H0x004F0001, //GFXMMU_LUT100L0x00019280, //GFXMMU_LUT100H0x004F0001, //GFXMMU_LUT101L0x00019780, //GFXMMU_LUT101H0x004F0001, //GFXMMU_LUT102L0x00019C80, //GFXMMU_LUT102H0x004F0001, //GFXMMU_LUT103L0x0001A180, //GFXMMU_LUT103H0x004F0001, //GFXMMU_LUT104L0x0001A680, //GFXMMU_LUT104H0x004F0001, //GFXMMU_LUT105L0x0001AB80, //GFXMMU_LUT105H0x004F0001, //GFXMMU_LUT106L0x0001B080, //GFXMMU_LUT106H0x004F0001, //GFXMMU_LUT107L0x0001B580, //GFXMMU_LUT107H0x004F0001, //GFXMMU_LUT108L0x0001BA80, //GFXMMU_LUT108H0x004F0001, //GFXMMU_LUT109L0x0001BF80, //GFXMMU_LUT109H0x004F0001, //GFXMMU_LUT110L0x0001C480, //GFXMMU_LUT110H0x004F0001, //GFXMMU_LUT111L0x0001C980, //GFXMMU_LUT111H0x004F0001, //GFXMMU_LUT112L0x0001CE80, //GFXMMU_LUT112H0x004F0001, //GFXMMU_LUT113L0x0001D380, //GFXMMU_LUT113H0x004F0001, //GFXMMU_LUT114L0x0001D880, //GFXMMU_LUT114H0x004F0001, //GFXMMU_LUT115L0x0001DD80, //GFXMMU_LUT115H0x004F0001, //GFXMMU_LUT116L0x0001E280, //GFXMMU_LUT116H0x004F0001, //GFXMMU_LUT117L0x0001E780, //GFXMMU_LUT117H0x004F0001, //GFXMMU_LUT118L0x0001EC80, //GFXMMU_LUT118H0x004F0001, //GFXMMU_LUT119L0x0001F180, //GFXMMU_LUT119H0x004F0001, //GFXMMU_LUT120L0x0001F680, //GFXMMU_LUT120H0x004F0001, //GFXMMU_LUT121L0x0001FB80, //GFXMMU_LUT121H0x004F0001, //GFXMMU_LUT122L0x00020080, //GFXMMU_LUT122H0x004F0001, //GFXMMU_LUT123L0x00020580, //GFXMMU_LUT123H0x004F0001, //GFXMMU_LUT124L0x00020A80, //GFXMMU_LUT124H0x004F0001, //GFXMMU_LUT125L0x00020F80, //GFXMMU_LUT125H0x004F0001, //GFXMMU_LUT126L0x00021480, //GFXMMU_LUT126H0x004F0001, //GFXMMU_LUT127L0x00021980, //GFXMMU_LUT127H0x004F0001, //GFXMMU_LUT128L0x00021E80, //GFXMMU_LUT128H0x004F0001, //GFXMMU_LUT129L0x00022380, //GFXMMU_LUT129H0x004F0001, //GFXMMU_LUT130L0x00022880, //GFXMMU_LUT130H0x004F0001, //GFXMMU_LUT131L0x00022D80, //GFXMMU_LUT131H0x004F0001, //GFXMMU_LUT132L0x00023280, //GFXMMU_LUT132H0x004F0001, //GFXMMU_LUT133L0x00023780, //GFXMMU_LUT133H0x004F0001, //GFXMMU_LUT134L0x00023C80, //GFXMMU_LUT134H0x004F0001, //GFXMMU_LUT135L0x00024180, //GFXMMU_LUT135H0x004F0001, //GFXMMU_LUT136L0x00024680, //GFXMMU_LUT136H0x004F0001, //GFXMMU_LUT137L0x00024B80, //GFXMMU_LUT137H0x004F0001, //GFXMMU_LUT138L0x00025080, //GFXMMU_LUT138H0x004F0001, //GFXMMU_LUT139L0x00025580, //GFXMMU_LUT139H0x004F0001, //GFXMMU_LUT140L0x00025A80, //GFXMMU_LUT140H0x004F0001, //GFXMMU_LUT141L0x00025F80, //GFXMMU_LUT141H0x004F0001, //GFXMMU_LUT142L0x00026480, //GFXMMU_LUT142H0x004F0001, //GFXMMU_LUT143L0x00026980, //GFXMMU_LUT143H0x004F0001, //GFXMMU_LUT144L0x00026E80, //GFXMMU_LUT144H0x004F0001, //GFXMMU_LUT145L0x00027380, //GFXMMU_LUT145H0x004F0001, //GFXMMU_LUT146L0x00027880, //GFXMMU_LUT146H0x004F0001, //GFXMMU_LUT147L0x00027D80, //GFXMMU_LUT147H0x004F0001, //GFXMMU_LUT148L0x00028280, //GFXMMU_LUT148H0x004F0001, //GFXMMU_LUT149L0x00028780, //GFXMMU_LUT149H0x004F0001, //GFXMMU_LUT150L0x00028C80, //GFXMMU_LUT150H0x004F0001, //GFXMMU_LUT151L0x00029180, //GFXMMU_LUT151H0x004F0001, //GFXMMU_LUT152L0x00029680, //GFXMMU_LUT152H0x004F0001, //GFXMMU_LUT153L0x00029B80, //GFXMMU_LUT153H0x004F0001, //GFXMMU_LUT154L0x0002A080, //GFXMMU_LUT154H0x004F0001, //GFXMMU_LUT155L0x0002A580, //GFXMMU_LUT155H0x004F0001, //GFXMMU_LUT156L0x0002AA80, //GFXMMU_LUT156H0x004F0001, //GFXMMU_LUT157L0x0002AF80, //GFXMMU_LUT157H0x004F0001, //GFXMMU_LUT158L0x0002B480, //GFXMMU_LUT158H0x004F0001, //GFXMMU_LUT159L0x0002B980, //GFXMMU_LUT159H0x004F0001, //GFXMMU_LUT160L0x0002BE80, //GFXMMU_LUT160H0x004F0001, //GFXMMU_LUT161L0x0002C380, //GFXMMU_LUT161H0x004F0001, //GFXMMU_LUT162L0x0002C880, //GFXMMU_LUT162H0x004F0001, //GFXMMU_LUT163L0x0002CD80, //GFXMMU_LUT163H0x004F0001, //GFXMMU_LUT164L0x0002D280, //GFXMMU_LUT164H0x004F0001, //GFXMMU_LUT165L0x0002D780, //GFXMMU_LUT165H0x004F0001, //GFXMMU_LUT166L0x0002DC80, //GFXMMU_LUT166H0x004F0001, //GFXMMU_LUT167L0x0002E180, //GFXMMU_LUT167H0x004F0001, //GFXMMU_LUT168L0x0002E680, //GFXMMU_LUT168H0x004F0001, //GFXMMU_LUT169L0x0002EB80, //GFXMMU_LUT169H0x004F0001, //GFXMMU_LUT170L0x0002F080, //GFXMMU_LUT170H0x004F0001, //GFXMMU_LUT171L0x0002F580, //GFXMMU_LUT171H0x004F0001, //GFXMMU_LUT172L0x0002FA80, //GFXMMU_LUT172H0x004F0001, //GFXMMU_LUT173L0x0002FF80, //GFXMMU_LUT173H0x004F0001, //GFXMMU_LUT174L0x00030480, //GFXMMU_LUT174H0x004F0001, //GFXMMU_LUT175L0x00030980, //GFXMMU_LUT175H0x004F0001, //GFXMMU_LUT176L0x00030E80, //GFXMMU_LUT176H0x004F0001, //GFXMMU_LUT177L0x00031380, //GFXMMU_LUT177H0x004F0001, //GFXMMU_LUT178L0x00031880, //GFXMMU_LUT178H0x004F0001, //GFXMMU_LUT179L0x00031D80, //GFXMMU_LUT179H0x004F0001, //GFXMMU_LUT180L0x00032280, //GFXMMU_LUT180H0x004F0001, //GFXMMU_LUT181L0x00032780, //GFXMMU_LUT181H0x004F0001, //GFXMMU_LUT182L0x00032C80, //GFXMMU_LUT182H0x004F0001, //GFXMMU_LUT183L0x00033180, //GFXMMU_LUT183H0x004F0001, //GFXMMU_LUT184L0x00033680, //GFXMMU_LUT184H0x004F0001, //GFXMMU_LUT185L0x00033B80, //GFXMMU_LUT185H0x004F0001, //GFXMMU_LUT186L0x00034080, //GFXMMU_LUT186H0x004F0001, //GFXMMU_LUT187L0x00034580, //GFXMMU_LUT187H0x004F0001, //GFXMMU_LUT188L0x00034A80, //GFXMMU_LUT188H0x004F0001, //GFXMMU_LUT189L0x00034F80, //GFXMMU_LUT189H0x004F0001, //GFXMMU_LUT190L0x00035480, //GFXMMU_LUT190H0x004F0001, //GFXMMU_LUT191L0x00035980, //GFXMMU_LUT191H0x004F0001, //GFXMMU_LUT192L0x00035E80, //GFXMMU_LUT192H0x004F0001, //GFXMMU_LUT193L0x00036380, //GFXMMU_LUT193H0x004F0001, //GFXMMU_LUT194L0x00036880, //GFXMMU_LUT194H0x004F0001, //GFXMMU_LUT195L0x00036D80, //GFXMMU_LUT195H0x004F0001, //GFXMMU_LUT196L0x00037280, //GFXMMU_LUT196H0x004F0001, //GFXMMU_LUT197L0x00037780, //GFXMMU_LUT197H0x004F0001, //GFXMMU_LUT198L0x00037C80, //GFXMMU_LUT198H0x004F0001, //GFXMMU_LUT199L0x00038180, //GFXMMU_LUT199H0x004F0001, //GFXMMU_LUT200L0x00038680, //GFXMMU_LUT200H0x004F0001, //GFXMMU_LUT201L0x00038B80, //GFXMMU_LUT201H0x004F0001, //GFXMMU_LUT202L0x00039080, //GFXMMU_LUT202H0x004F0001, //GFXMMU_LUT203L0x00039580, //GFXMMU_LUT203H0x004F0001, //GFXMMU_LUT204L0x00039A80, //GFXMMU_LUT204H0x004F0001, //GFXMMU_LUT205L0x00039F80, //GFXMMU_LUT205H0x004F0001, //GFXMMU_LUT206L0x0003A480, //GFXMMU_LUT206H0x004F0001, //GFXMMU_LUT207L0x0003A980, //GFXMMU_LUT207H0x004F0001, //GFXMMU_LUT208L0x0003AE80, //GFXMMU_LUT208H0x004F0001, //GFXMMU_LUT209L0x0003B380, //GFXMMU_LUT209H0x004F0001, //GFXMMU_LUT210L0x0003B880, //GFXMMU_LUT210H0x004F0001, //GFXMMU_LUT211L0x0003BD80, //GFXMMU_LUT211H0x004F0001, //GFXMMU_LUT212L0x0003C280, //GFXMMU_LUT212H0x004F0001, //GFXMMU_LUT213L0x0003C780, //GFXMMU_LUT213H0x004F0001, //GFXMMU_LUT214L0x0003CC80, //GFXMMU_LUT214H0x004F0001, //GFXMMU_LUT215L0x0003D180, //GFXMMU_LUT215H0x004F0001, //GFXMMU_LUT216L0x0003D680, //GFXMMU_LUT216H0x004F0001, //GFXMMU_LUT217L0x0003DB80, //GFXMMU_LUT217H0x004F0001, //GFXMMU_LUT218L0x0003E080, //GFXMMU_LUT218H0x004F0001, //GFXMMU_LUT219L0x0003E580, //GFXMMU_LUT219H0x004F0001, //GFXMMU_LUT220L0x0003EA80, //GFXMMU_LUT220H0x004F0001, //GFXMMU_LUT221L0x0003EF80, //GFXMMU_LUT221H0x004F0001, //GFXMMU_LUT222L0x0003F480, //GFXMMU_LUT222H0x004F0001, //GFXMMU_LUT223L0x0003F980, //GFXMMU_LUT223H0x004F0001, //GFXMMU_LUT224L0x0003FE80, //GFXMMU_LUT224H0x004F0001, //GFXMMU_LUT225L0x00040380, //GFXMMU_LUT225H0x004F0001, //GFXMMU_LUT226L0x00040880, //GFXMMU_LUT226H0x004F0001, //GFXMMU_LUT227L0x00040D80, //GFXMMU_LUT227H0x004F0001, //GFXMMU_LUT228L0x00041280, //GFXMMU_LUT228H0x004F0001, //GFXMMU_LUT229L0x00041780, //GFXMMU_LUT229H0x004F0001, //GFXMMU_LUT230L0x00041C80, //GFXMMU_LUT230H0x004F0001, //GFXMMU_LUT231L0x00042180, //GFXMMU_LUT231H0x004F0001, //GFXMMU_LUT232L0x00042680, //GFXMMU_LUT232H0x004F0001, //GFXMMU_LUT233L0x00042B80, //GFXMMU_LUT233H0x004F0001, //GFXMMU_LUT234L0x00043080, //GFXMMU_LUT234H0x004F0001, //GFXMMU_LUT235L0x00043580, //GFXMMU_LUT235H0x004F0001, //GFXMMU_LUT236L0x00043A80, //GFXMMU_LUT236H0x004F0001, //GFXMMU_LUT237L0x00043F80, //GFXMMU_LUT237H0x004F0001, //GFXMMU_LUT238L0x00044480, //GFXMMU_LUT238H0x004F0001, //GFXMMU_LUT239L0x00044980, //GFXMMU_LUT239H0x004F0001, //GFXMMU_LUT240L0x00044E80, //GFXMMU_LUT240H0x004F0001, //GFXMMU_LUT241L0x00045380, //GFXMMU_LUT241H0x004F0001, //GFXMMU_LUT242L0x00045880, //GFXMMU_LUT242H0x004E0101, //GFXMMU_LUT243L0x00045D70, //GFXMMU_LUT243H0x004E0101, //GFXMMU_LUT244L0x00046250, //GFXMMU_LUT244H0x004E0101, //GFXMMU_LUT245L0x00046730, //GFXMMU_LUT245H0x004E0101, //GFXMMU_LUT246L0x00046C10, //GFXMMU_LUT246H0x004D0201, //GFXMMU_LUT247L0x000470E0, //GFXMMU_LUT247H0x004D0201, //GFXMMU_LUT248L0x000475A0, //GFXMMU_LUT248H0x004D0201, //GFXMMU_LUT249L0x00047A60, //GFXMMU_LUT249H0x004D0201, //GFXMMU_LUT250L0x00047F20, //GFXMMU_LUT250H0x004C0301, //GFXMMU_LUT251L0x000483D0, //GFXMMU_LUT251H0x004C0301, //GFXMMU_LUT252L0x00048870, //GFXMMU_LUT252H0x004C0301, //GFXMMU_LUT253L0x00048D10, //GFXMMU_LUT253H0x004C0301, //GFXMMU_LUT254L0x000491B0, //GFXMMU_LUT254H0x004B0401, //GFXMMU_LUT255L0x00049640, //GFXMMU_LUT255H0x004B0401, //GFXMMU_LUT256L0x00049AC0, //GFXMMU_LUT256H0x004B0401, //GFXMMU_LUT257L0x00049F40, //GFXMMU_LUT257H0x004B0401, //GFXMMU_LUT258L0x0004A3C0, //GFXMMU_LUT258H0x004A0501, //GFXMMU_LUT259L0x0004A830, //GFXMMU_LUT259H0x004A0501, //GFXMMU_LUT260L0x0004AC90, //GFXMMU_LUT260H0x004A0501, //GFXMMU_LUT261L0x0004B0F0, //GFXMMU_LUT261H0x004A0501, //GFXMMU_LUT262L0x0004B550, //GFXMMU_LUT262H0x00490601, //GFXMMU_LUT263L0x0004B9A0, //GFXMMU_LUT263H0x00490601, //GFXMMU_LUT264L0x0004BDE0, //GFXMMU_LUT264H0x00490601, //GFXMMU_LUT265L0x0004C220, //GFXMMU_LUT265H0x00490601, //GFXMMU_LUT266L0x0004C660, //GFXMMU_LUT266H0x00480701, //GFXMMU_LUT267L0x0004CA90, //GFXMMU_LUT267H0x00480701, //GFXMMU_LUT268L0x0004CEB0, //GFXMMU_LUT268H0x00480701, //GFXMMU_LUT269L0x0004D2D0, //GFXMMU_LUT269H0x00480701, //GFXMMU_LUT270L0x0004D6F0, //GFXMMU_LUT270H0x00470801, //GFXMMU_LUT271L0x0004DB00, //GFXMMU_LUT271H0x00470801, //GFXMMU_LUT272L0x0004DF00, //GFXMMU_LUT272H0x00470801, //GFXMMU_LUT273L0x0004E300, //GFXMMU_LUT273H0x00470801, //GFXMMU_LUT274L0x0004E700, //GFXMMU_LUT274H0x00460901, //GFXMMU_LUT275L0x0004EAF0, //GFXMMU_LUT275H0x00460901, //GFXMMU_LUT276L0x0004EED0, //GFXMMU_LUT276H0x00460901, //GFXMMU_LUT277L0x0004F2B0, //GFXMMU_LUT277H0x00460901, //GFXMMU_LUT278L0x0004F690, //GFXMMU_LUT278H0x00450A01, //GFXMMU_LUT279L0x0004FA60, //GFXMMU_LUT279H0x00450A01, //GFXMMU_LUT280L0x0004FE20, //GFXMMU_LUT280H0x00450A01, //GFXMMU_LUT281L0x000501E0, //GFXMMU_LUT281H0x00450A01, //GFXMMU_LUT282L0x000505A0, //GFXMMU_LUT282H0x00440B01, //GFXMMU_LUT283L0x00050950, //GFXMMU_LUT283H0x00440B01, //GFXMMU_LUT284L0x00050CF0, //GFXMMU_LUT284H0x00440B01, //GFXMMU_LUT285L0x00051090, //GFXMMU_LUT285H0x00440B01, //GFXMMU_LUT286L0x00051430, //GFXMMU_LUT286H0x00430C01, //GFXMMU_LUT287L0x000517C0, //GFXMMU_LUT287H0x00430C01, //GFXMMU_LUT288L0x00051B40, //GFXMMU_LUT288H0x00430C01, //GFXMMU_LUT289L0x00051EC0, //GFXMMU_LUT289H0x00430C01, //GFXMMU_LUT290L0x00052240, //GFXMMU_LUT290H0x00420D01, //GFXMMU_LUT291L0x000525B0, //GFXMMU_LUT291H0x00420D01, //GFXMMU_LUT292L0x00052910, //GFXMMU_LUT292H0x00420D01, //GFXMMU_LUT293L0x00052C70, //GFXMMU_LUT293H0x00420D01, //GFXMMU_LUT294L0x00052FD0, //GFXMMU_LUT294H0x00410E01, //GFXMMU_LUT295L0x00053320, //GFXMMU_LUT295H0x00410E01, //GFXMMU_LUT296L0x00053660, //GFXMMU_LUT296H0x00410E01, //GFXMMU_LUT297L0x000539A0, //GFXMMU_LUT297H0x00410E01, //GFXMMU_LUT298L0x00053CE0, //GFXMMU_LUT298H0x00400F01, //GFXMMU_LUT299L0x00054010, //GFXMMU_LUT299H0x00400F01, //GFXMMU_LUT300L0x00054330, //GFXMMU_LUT300H0x00400F01, //GFXMMU_LUT301L0x00054650, //GFXMMU_LUT301H0x00400F01, //GFXMMU_LUT302L0x00054970, //GFXMMU_LUT302H0x003F1001, //GFXMMU_LUT303L0x00054C80, //GFXMMU_LUT303H0x003F1001, //GFXMMU_LUT304L0x00054F80, //GFXMMU_LUT304H0x003F1001, //GFXMMU_LUT305L0x00055280, //GFXMMU_LUT305H0x003F1001, //GFXMMU_LUT306L0x00055580, //GFXMMU_LUT306H0x003E1101, //GFXMMU_LUT307L0x00055870, //GFXMMU_LUT307H0x003E1101, //GFXMMU_LUT308L0x00055B50, //GFXMMU_LUT308H0x003E1101, //GFXMMU_LUT309L0x00055E30, //GFXMMU_LUT309H0x003E1101, //GFXMMU_LUT310L0x00056110, //GFXMMU_LUT310H0x003D1201, //GFXMMU_LUT311L0x000563E0, //GFXMMU_LUT311H0x003D1201, //GFXMMU_LUT312L0x000566A0, //GFXMMU_LUT312H0x003D1201, //GFXMMU_LUT313L0x00056960, //GFXMMU_LUT313H0x003D1201, //GFXMMU_LUT314L0x00056C20, //GFXMMU_LUT314H0x003C1301, //GFXMMU_LUT315L0x00056ED0, //GFXMMU_LUT315H0x003C1301, //GFXMMU_LUT316L0x00057170, //GFXMMU_LUT316H0x003C1301, //GFXMMU_LUT317L0x00057410, //GFXMMU_LUT317H0x003C1301, //GFXMMU_LUT318L0x000576B0, //GFXMMU_LUT318H0x003B1401, //GFXMMU_LUT319L0x00057940 //GFXMMU_LUT319H};#ifdef __cplusplus}#endif#endif /*__ gfxmmu_lut_H *//*** @}*//*** @}*//************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/Obviously I disabled all touchscreen stuff in the demo codeI made other modifications for the width, height, etcessentially, all the modifications I made to the BSP LCD drivers, are in the files here:http://internetsomething.com/lcd/bsp-example/I'll see if I can get the screen to do anything useful on the STM32F769I Disco board, although I only have about an hour, and I haven't been near C or STM32 in what feels like a year, and I was only just starting to learn it then too, so it's not very clear to me really

author: carl0s
author_rank: Unknown
timestamp: August 03, 2019, 03:57:53 pm
content: Oh, actually, it has been a year. About 1yr and 2 weeks :-)

author: TiN
author_rank: Super Contributor
timestamp: August 03, 2019, 04:05:39 pm
content: Differential pairs are not routed differentially, as they should be. Good idea to calculate impedance to your stackup so you can maintain correct trace width/spacing to have good SI.Avoid 90 bends, use 45 degree or arcs. All power connect by wide trace or better yet copper pour shape.Do not use thermal connection for GND vias, you just introducing more inductance/impedance without any good reason.All parts with GND connections should have just via next to pad right next to pad, no traces. Nice touch to have evenly distributed GND vias around GND pads of that Mictor connector.

author: carl0s
author_rank: Unknown
timestamp: August 03, 2019, 07:58:46 pm
content: Quote from: TiN on August 03, 2019, 04:05:39 pmThank you. I'll take this on board for next time. The differential pairs are length-matched. Is that not what you mean?

author: luiHS
author_rank: Frequent Contributor
timestamp: August 04, 2019, 06:44:09 am
content: Quote from: carl0s on August 03, 2019, 03:42:34 pmPerfect, thanks for your information, very useful for me.However, there is a signal, the TE (Tearing effect), I don't know if you are using it. For pictures, it is perhaps not important, but to play videos may be essential, it is a synchronization signal that sends the screen to the program, to avoid an effect that would cause half of the upper image not to be synchronized with the other half, let's say half of the screen would show the current frame and the other half still the previous frame.This octagonal screen does have the TE signal, but I have other screens that do not. I suppose that the screens that do not have the TE signal would not serve to play video, just to see images.In the list of commands sent to me by the seller of the screen, there is command 35, data 00, related to the activation of the TE signal.Quote from: carl0s on August 03, 2019, 03:42:34 pmI also have the same kit you used to do your tests with round screens. I read something about specific routines to save space in RAM, eliminating all the pixels that are outside the circular area of ​​the screen. As soon as I get my screen to work, I will see if setting up that routine correctly, I can optimize the performance of the program. Notwithstanding the example sources for the STM32F769, they are for rectancular screens such as the one included in Discovery, these routines of the STM32L4R9I-DISCOVERY kit should be added.Quote from: carl0s on August 03, 2019, 03:42:34 pmI will also check all the parameters, in the Cube for the F769, there is also the Drivers / BSP directory with the sources for the lcd that define all those parameters. The sources in the Cube for Discovery with the F769 are for visualizing images. The source for playing videos is for the EVAL board.Both, Discovery and EVAL evaluation boards, use the same microcontroller, the differences in practice to be able to use the EVAL example source code in Discovery are these.1.- The EVAL has two SD cardholders, the Discovery only one. In the EVAL sources the cardholder that does not have the Discovery is used, I think the SD1. It would be necessary to edit the sources and change it, it seems simple.2.- The EVAL Card Detect is connected through an I2c expander, while in the Discovery it goes directly to a GPIO port. It also seems a simple change to make.3.- The SDRAM in the EVAL is double, 256 Megabytes, in the Discovery we have 128 Megabytes. I don't know if this can be a problem to be able to run the program that plays videos. If 256 megabytes of SDRAM were necessary for the video player, then I will make my own board, with the F769, the SDRAM and an SD card holder, in addition to the backlight voltage booster.For the voltage booster, for the backlight, I use this scheme with several jumpers, to select several voltages, for the different display models I have, each one requires a different voltage.

author: carl0s
author_rank: Unknown
timestamp: August 06, 2019, 11:24:03 am
content: I've been trying to do something with the STM32F769I-DISCO. Firstly trying to build an empty StemWin 'hello world'. I previously compiled the example projects, and they all work fine, but I couldn't get anything to display on the board that CubeMX/STM32CubeIDE had created. The plan was to get that working, seeing as though it's the kit exactly as chosen in the CubeMX 'board selector (including screen)', and then once working, see if I could get the round/octagonal screen to do something useful.Anyway I've had to 'work from home' today due to sleep deprivation trying to figure out why STM32CubeIDE would not do a Hello World even with the original screen. It's because the LCD_LL_Reset() isn't implemented - seems CubeMX (which is now not really called CubeMX as it's integrated into the IDE that used to be called TrueStudio but is now STM32CubeIDE) just doesn't use the BSP stuff at all. That's why in the Graphics 'Platform Settings' it says 'BSP API: Unknown':So I just copied the BSP reset function (which is used by the examples) into the empty LCD_LL_Reset() function that CubeMX generated.Code:/* Configures the LCD reset pin. *//* USER CODE BEGIN Config_LCD_Reset_Pin */static void LCD_LL_Reset(void) {GPIO_InitTypeDef gpio_init_structure;__HAL_RCC_GPIOJ_CLK_ENABLE();/* Configure the GPIO on PJ15 */gpio_init_structure.Pin = GPIO_PIN_15;gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP;gpio_init_structure.Pull = GPIO_PULLUP;gpio_init_structure.Speed = GPIO_SPEED_HIGH;HAL_GPIO_Init(GPIOJ, &gpio_init_structure);/* Activate XRES active low */HAL_GPIO_WritePin(GPIOJ, GPIO_PIN_15, GPIO_PIN_RESET);HAL_Delay(20); /* wait 20 ms *//* Desactivate XRES */HAL_GPIO_WritePin(GPIOJ, GPIO_PIN_15, GPIO_PIN_SET);/* Wait for 10ms after releasing XRES before sending commands */HAL_Delay(10);}/* USER CODE END Config_LCD_Reset_Pin */That then worked - I had a working Hello World on the original screen.Moving onto the octagonal screen, I still told CubeMX that I was using the OTM8009A screen, just so I could see where they usually put the DSI commands and stuff. Selecting 'Other screen' left me a bit in the dark about that.It was in HW_Init.c at line 370 in this case (will be different depending what HW peripherials CubeMX is setting up I suppose)I obviously changed to One Data Lane in the DSIHOST -> Data and Clock lanes configurationand you can see I've put those same DSI init commands here as what I did before.Code:/* Initialize the OTM8009A LCD Display IC Driver (KoD LCD IC Driver)* depending on configuration set in 'hdsivideo_handle'.*//* Send Display off DCS Command to display */// HAL_DSI_ShortWrite(&(hdsi),// 0,// DSI_DCS_SHORT_PKT_WRITE_P1,// OTM8009A_CMD_DISPOFF,// 0x00);// OTM8009A_Init(OTM8009A_FORMAT, OTM8009A_ORIENTATION_LANDSCAPE);HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, 0x36, 0x48);HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P0, DSI_EXIT_SLEEP_MODE, 0x0);Anyway at least it's doing something finallyI don't have any video stuff to try though I'm afraid.Got to admit, this had made me even more eager to focus on Python and MicroPython as much as possible. It's freakin' horrible. Well, trying to get TouchGFX & STM32CubeIDE to play nicely together was anyway. I was probably screwing around with that 'til 2am

author: luiHS
author_rank: Frequent Contributor
timestamp: August 06, 2019, 08:29:48 pm
content: Quote from: carl0s on August 06, 2019, 11:24:03 amHas the example of a video player for EVAL (JPEG_MJPEG_VideoDecoding) worked for you on Discovery and with the octagonal screen?.There is one more difference between EVAL and Discovery. The EVAL uses a crystal and the internal oscillator for the clock signal, while the Discovery uses an external oscillator.

author: carl0s
author_rank: Unknown
timestamp: August 06, 2019, 09:24:06 pm
content: Quote from: luiHS on August 06, 2019, 08:29:48 pmHi. I haven't tried video examples on either screen.I have had quite a bit of trouble getting consistent results to get this screen working with a fresh CubeMX project.What I have realised is that, I must send the command to enable tearing effect (for which there is already an empty stemwin function - LCD_ReqTear(), otherwise I just get a dotty screen.Code:stemwin_wrapper.c: void LCD_ReqTear(void) { HAL_DSI_ShortWrite(&hdsi, 0, DSI_DCS_SHORT_PKT_WRITE_P1, DSI_SET_TEAR_ON, 0x0); }in the StEmWin code.Then the DSIHOST must be set for 'refresh framebuffer: on tearing effect event, and external source ( DSI_TE_EXTERNAL).

author: carl0s
author_rank: Unknown
timestamp: August 07, 2019, 06:06:45 pm
content: OK I'm getting somewhere now.Previously, I was trying to figure out why I just got 'crap' when the unit was first powered on, but then the image was there was Reset was pressed.Turns out it wasn't refreshing at all and was just showing the old static image after Reset.That is because tearing effect needed to be set up properly on both ends (as per my edited post above).I figured this out by testing a number count. The numbers didn't countNow I have a big number counter. This is with DMA2D (Chrom-ART accelerator) disabled. StEmWin will make use of it when it's enabled, but so far that's giving me a black screen (maybe alpha issue).Anyway, check it out:http://internetsomething.com/lcd/big_numbers_no-chrom-art.mp4

author: luiHS
author_rank: Frequent Contributor
timestamp: August 07, 2019, 07:07:46 pm
content: Quote from: carl0s on August 07, 2019, 06:06:45 pmThat looks very good.Is it an MJPEG video or a real-time animation?I understand that you are trying to make an application using Cube, from scratch. Is that so?Have you not tried with the examples already made that are in the example source package inen.STM32Cube_FW_F7_V1.15.0?, Specifically with the examplesJPEG_DecodingUsingFs_DMAfor Discovery, andJPEG_MJPEG_VideoDecodingfor the EVAL evaluation board.As soon as I have a free moment, I want to try those two examples, with the round screens, changing the initialization commands. In my case, what interests me most is the play of MJPEG videos and some JPEG images.

author: carl0s
author_rank: Unknown
timestamp: August 07, 2019, 08:21:47 pm
content: Quote from: luiHS on August 07, 2019, 07:07:46 pmHi. It's just real-time generated text, with stEmWin (emWin free version for ST).It's the second example after "Hello world" on page 56 of the 1300 page manual (https://www.segger.com/downloads/emwin/UM03001)It looks like this:Code:void GRAPHICS_MainTask(void) {/* USER CODE BEGIN GRAPHICS_MainTask *//* User can implement his graphic application here *//* Hello Word example */int i = 0;GUI_Clear();GUI_SetColor(GUI_WHITE);GUI_SetFont(&GUI_FontD80);while(1){GUI_DispDecAt( i++, 40, 120, 4);if (i > 9999) {i = 0;}}/* USER CODE END GRAPHICS_MainTask */}I am trying to start with minimal unknown code. I'm trying to work from a blank CubeMX build and ensure the peripherals work. I'm hoping that along the way I'll begin to understand what's what and recognise the various things in the generated code. Building the examples and altering them is probably going to be too difficult at this stage. I'm still trying to figure out what's involved in getting the Chrom-ART DMA2D controller to do something.QuoteYes exactly. It seems like an interesting thing to figure out how to go from nothing, to working screen, in minimal steps with point and click CubeMX

author: carl0s
author_rank: Unknown
timestamp: August 07, 2019, 09:11:41 pm
content: Same thing is now super fast compared to before.This is mostly down to CPU DCache and CPU ICache though. The DMA2D made some improvement before the CPU caches were enabled, but nothing like the same improvement that those caches made. I think this simple text demo isn't the best thing to benchmark DMA2D. That's more for shifting large blocks of pixel bytes. Anyway the DMA2D stopped hanging the system once I ticked the box to enable the global interrupt under NVIC. Another thing to read up on ..http://www.internetsomething.com/lcd/big_numbers_superfast_with_cpudcache_cpuicache.mp4

author: luiHS
author_rank: Frequent Contributor
timestamp: August 08, 2019, 03:09:24 pm
content: Do you know what the IC controller chip is on your round screen? I would like to start doing my tests with the same screen model. I have here three different models of screens, two are octagonal and one totally round (2.1 inches).The controller chips are ST7796S, ST7701S and HX8379-C, fortunately I have the data sheet of the three, the one of the HX8379-C was quite difficult to get.2.4 inches, octagonal outline, ST7796S controller chip, 320x320 pixel, Active area 60mm,TE available2.47 inches, octagonal outline, HX8379-C controller chip, 480x480 pixel, Active area 62mm, TE not available2.1 inches, round outline, ST7701S controller chip, 480x80 pixel, Active Area 53mm,TE available

author: carl0s
author_rank: Unknown
timestamp: August 08, 2019, 04:59:52 pm
content: Quote from: luiHS on August 08, 2019, 03:09:24 pmMine is the 2.4" which the manufacturer describes as 3.4", with ST7796S and 17 pin 0.3mm FPC connector, no touch.Please could you post pictures of all 3 of your screens? Would be interesting to see the differences.Also, TE can be sent as a MIPI packet, without its own pin. maybe that's what your 2.47" can do ?

author: carl0s
author_rank: Unknown
timestamp: August 08, 2019, 05:28:24 pm
content: If your 2.47" screen is the one I've just found on the internet, then it's not MIPI-DSI is it? It has SPI and parallel RGBIf that's correct, then maybe you just use VSYNC.https://kingtechgroup.en.alibaba.com/product/60791460985-807281342/HX8379_C_2_5inch_50pin_24bit_tft_lcd_display_module.htmlOh wait, I just found the MIPI ~2.47" 480*480 screen. I guess maybe you use DSI-TE, i.e. it comes as a DSI packet.I'm going to order a couple of those because I'm interested in the increased resolution, although the lower brightness is a downer.

author: luiHS
author_rank: Frequent Contributor
timestamp: August 08, 2019, 11:17:18 pm
content: These are my round screens, I have some smaller 1.2 and 1.39 inches, also MIPI.I also bought two HDMI controller boards to connect the screens to the computer, for initial tests.

author: carl0s
author_rank: Unknown
timestamp: August 10, 2019, 07:54:46 am
content: Thanks for the pictures. I have a couple of the 480*480 HX8379-C coming to have a play with.I think because they are GRAM-less, they are operated in Video mode, where hsync and vsync is sent along with raw pixel data, so no tearing effect line is used.The 320*320 panel that I have been using (st7796) has a GRAM/framebuffer and works in adapted command mode.Check ST application note AN4860.This is the same as my 800*800 ILI9881C screen, which I have not used yet because it requires 3 lane MIPI.

author: luiHS
author_rank: Frequent Contributor
timestamp: September 19, 2019, 03:17:43 am
content: How are you doing with your tests with the round screens? I have already designed the PCBs to use the two 2.1 and 2.4 inch screens.What I do notice when testing the 2.4 screen is that there is a certain Tearing effect, as if the TE signal was not being used, that makes when playing videos, when scenes with rapid changes come out, a certain cut is shown in the middle of the screen .The 2.4 screen is much brighter than the 2.1 screen, and although it has less resolution, I think it looks better.

author: carl0s
author_rank: Unknown
timestamp: September 19, 2019, 11:38:33 am
content: Hey LuiGreat work. I can see the tearing too..Is that stm32F769 with mjpeg video? I think it looks great.I have done zero work really. I am still playing with SSD2828 bridge for the 4-lane display. No real reason other than to not give up. but it's just a part time hobby for me and I'm just too tired in the evenings lately to do anythingI agree the 320*320 Panasys screen is great and bright.What about the 480*480 one with the 0.2mm pitch connector? I have a couple of those, but no breakouts for the connector yet and not bothered about having a PCB made just yet.

author: carl0s
author_rank: Unknown
timestamp: September 19, 2019, 11:44:53 am
content: Are you sending the TE enable DSI cmd? (DSI_SET_TEAR_ON)I have found that I don't get any screen output without it.. not sure if I mentioned that on here previously.

author: luiHS
author_rank: Frequent Contributor
timestamp: September 19, 2019, 07:44:43 pm
content: Quote from: carl0s on September 19, 2019, 11:38:33 amYes, my PCB boards are with the 769, in addition to an SDRAM, SD card holder and backlight voltage booster.About the connectors, the 320*320 2.1-inch screen needs a 0.5 mm pitch connector, and the 480*480 2.4-inch screen needs a 0.3 mm pitch connector. Both connectors available in Mouser.

author: luiHS
author_rank: Frequent Contributor
timestamp: September 19, 2019, 07:46:03 pm
content: Quote from: carl0s on September 19, 2019, 11:44:53 amI will check it, I do not remember now.

author: carl0s
author_rank: Unknown
timestamp: September 20, 2019, 03:36:33 pm
content: Quote from: luiHS on September 19, 2019, 07:44:43 pmCool.Yes I have the connectors.

author: luiHS
author_rank: Frequent Contributor
timestamp: September 20, 2019, 08:18:29 pm
content: I receveid my new PCB for the 2.1 inches round screen. Ready to assemble and test.Next week I will receive PCB for the 2.4 inches, I hope I can solve the TE problem, its a good round screen, good size and very bright, but the tearing effect spoils something when playing videos with fast movements.

author: carl0s
author_rank: Unknown
timestamp: September 20, 2019, 08:38:11 pm
content: In your video it is the 2.4" screen already. Ha, I wondered about that.. the connector is going under the piece of paper isn't it?

author: luiHS
author_rank: Frequent Contributor
timestamp: September 21, 2019, 12:09:30 am
content: Quote from: carl0s on September 20, 2019, 08:38:11 pmThe first tests were with an HDMI controller board, to check the resolution and brightness of each screen.Now I go with the PCBs that have all the electronics based on the 769, and connect with 3 wires, 2 wires for 5 volt power supply and a third wire for a serial port to control which videos are played.