BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Rudolph

Pages: [1] 2 3 ... 29
1
This is my first time using QSPI which was partly the cause of my confusion.  I couldn't figure out if it was something with my custom hardware or my firmware that was causing me so much trouble.  I'm using a STM32WB55REV for my two custom boards, one is the sender, and one is the receiver, the receiver is the one connected to a Riverdi display with the BT817Q.

Oh, yes, I still do not have a Nucleo with the STM32WB55.
I am not so invested in STM32 lately since I played with the STM32H7 and could not figure out how to use DMA for the SPI.
And I have seen that other newer devices lik H503 also started using the new DMA unit, not a fan so far.


Quote
I do not see in your code to which address the command is written to.
numberCommand.Instruction = 0xB0; // Get the first byte, should 0xB0 (0x10) to write
And the rest?

If I understand correctly, the QSPI is broken into Command and Address (excuse the variable names, I've been copy/pasting and have to come back to refactor everything, just trying to get something working initially):

Code: [Select]
numberCommand.Instruction = 0xB0; // Get the first byte, should 0xB0 (0x10) to write
numberCommand.Address     = 0x2578;

Yes, as expected, did not see that. :-)

Quote
CS likely is hardware controlled?

Correct, the CS is completely out of my hands which is making it difficult to create the same kind of flow of your library where you setup the _burst commands because I haven't figured out how to keep the CS line pulled low while transmitting the rest of the EVE commands. 

I do not know about the QSPI controller but for the other SPIs I am using
eve_spi_handle.Init.NSS = SPI_NSS_SOFT;

I have too many controllers in support for which hardware controlled CS either is not supported or does not work correctly.

Quote
What does this look like on the logic analyzer? The whole sequence for this function and perhaps some bits and pieces before and after.

I've captured waveforms with my Digilent AD 3 and Waveforms software, but they don't really have a QSPI decoder, so I had no idea what I was looking at.  As per the suggestion from BRT, I connected an oscilloscope to the QSPI lines and they didn't look well-formed which is what prompted me to change the skew rate, again suggested by BRT.  This has seemed to resolve the issue for me.

That is sound advice, for STM32 I am also setting GPIO_SPEED_FREQ_HIGH as maximum.
But then, after I ran into issues some years ago with a Teensy 4.1, I am also using series resistors on my evalboard adapter PCBs, 56R in all lines.
I used to have 10R in series and 22pF to GND as a low impact low-pass filter to smoothen the edges a little bit, but this did not work with the Teensy.

I do not have an oscilloscope available that could accurately measure what is actually going on the SPI, especially without adding load.
My theory is that too agressive switching is leading to refelections on the lines and this is why dampening with a series resistor helps.
Voodoo. ;D

2
I do not see in your code to which address the command is written to.

numberCommand.Instruction = 0xB0; // Get the first byte, should 0xB0 (0x10) to write

And the rest?
The intended target is probably REG_CMDB_WRITE?
I never used HAL_QSPI_Command() or HAL_QSPI_Transmit().
CS likely is hardware controlled?

What does this look like on the logic analyzer? The whole sequence for this function and perhaps some bits and pieces before and after.

And then I would not be immediately concerned about this:
TFT_qspi_cmd_rotate(1);
space = TFT_qspi_read16(REG_CMDB_SPACE); //When it fails, always 4084

Yes ok, I get that it hangs for you it it does that but some commands just need a few cycles to complete and immediately reading back REG_CMDB_SPACE might be just too fast in this case.
My EVE_cmd_setrotate() function is setup as a standalone function and waits for the command to complete, so reading REG_CMDB_SPACE untill it returns 0xffcU.

What STM32 are you even using? Some STM32H7xx?

3
Test and Review Area / Re: EVE Asset Builder
« on: December 31, 2024, 10:51:08 AM »
I converted some fonts with EAB 2.12.2 and it does not reset anything anymore when swithing the font - and I really like that. :-)

However, there is an issue in the flash utilities for a while now, the generated .map file looks like this now:
default-fl.blob                     : 0     : 4096
Rubik-Bold_24_ASTC.glyph            : 4096  : 34368
Rubik-Bold_24_ASTC.xfont            : 38464 : 309 
Rubik-Bold_24_ASTC.xfont.padding    : 38773 : 11   
Rubik-Regular_20_ASTC.xfont         : 38784 : 309 
Rubik-Regular_20_ASTC.xfont.padding : 39093 : 11   
Rubik-Regular_20_ASTC.glyph         : 39104 : 34368
Rubik-Regular_24_ASTC.xfont         : 73472 : 309 
Rubik-Regular_24_ASTC.xfont.padding : 73781 : 11   
Rubik-Regular_24_ASTC.glyph         : 73792 : 34368

The issue is this .padding "file" that was introduced a while ago.
This does not only add a bunch of mostly useless lines, this had the effect that the size for the .xfont file can no longer be directly
used for the CMD_FLASHREAD call as CMD_FLASHREAD requires the number of bytes to be read to be a multiple of 4.
In a previous version of EAB the length of the .xfont file was set to 320 and while that "wasted" 11 bytes of precious RAM_G, at least it worked.

Can we please get rid of the .padding entry again and perhaps round up the length of the file to the next multiple of 4?
That would be 312 in this case.
Yes, that still is 3 bytes more than necessary. But you need to use 312 as a minumum with CMD_FLASHREAD anyways and the destination address for CMD_FLASHREAD needs to 4-byte aligned as well, so you can not place the .xfont files of 309 bytes length back-to-back anyways.
I rather have small holes in the .map and not extra lines that are not really helping.

4
Discussion - EVE / EVE Screen Editor issue
« on: December 29, 2024, 07:29:01 PM »
As I am still not seeing the board "Discussion - Software" while beeing logged in, I am asking here.
I wrote an email to the board admin address a while ago about this.

I am working on an exporter script for ESE that generates code which is compatible with my library FT81x / BT81x library.
I used one of the existing exporter scripts as a starting point and things are starting to make sense.

However, I just found that comments seem to be stripped from the data that is send to the converter script.
All comments, lines that only have a comment end up empty, lines that end up in comments have the comments removed.

All exporter scripts have this however:
  if (line.lstrip()).startswith("//"):
and
  functionName, functionArgs, comment = parseCommand(line, functionMap, convertArgs)

My .ese file:
        "",
        "/* foo */",
        "// foo",
        "VERTEX_FORMAT(0) // boo",
        "",

The result when printing out each line raw with
f.write("//  " + line + "\n")
plus either the parsed command line or
f.write("    \n")
in case the line was empty:
// 
   
// 
   
//  VERTEX_FORMAT(0)
    EVE_vertex_format(0);
// 
   

So, not only are all comments stripped, the lines with comments end up beeing empty lines instead of beeing removed.
Is this actually working as intended?

5
Discussion - EVE / Re: CMD_ARC
« on: December 12, 2024, 05:15:41 PM »
This is one of these posts I could have reacted on with just a big thumbs up if that would be an option.  ;D

6
Discussion - EVE / CMD_ARC
« on: December 11, 2024, 05:49:19 PM »
The BT82X Series Programming Guide 1.0 is released. :-)
I only saw it two days ago and I did not really have much time for it so far though.

One thing, I found CMD_ARC, nice.
But, this is the description:
"The arc command draws a circular arc. The end caps of the arc are rounded. If the angles specify a complete circle, a disc is drawn."

Is that correct? So not a circle, but a a fully filled round area like with POINTS?

void cmd_arc( int16_t x, int16_t y, unint16_t r0, unint16_t r1, uint16_t a0, uint16_t a1 );

That u*n*int16_t is an interesting typo. :-)

But more importantly, why is the inner and out radius limited to 1..511?
Hmm, yes, radius, not diameter, so quite big - but still, no flat arc over the complete height of the display for example.

And is there any way to influence the roundness of the end caps?

7
I was just looking at what accelerometers are available on Mouser, sorted by price, as to detect the orientation of the display the simplest option should do.
And the most inexpensive option that is available today is a MXC4005XC with an I2C interface.

Then it hit me, EVE already is using I2C for the touch sensor.
And at least electrically it would be a no-brainer to add a second chip to the existing I2C bus, the only thing to look out for would be the chips adresses.
So what is missing in order to support an optional accelerometer is some software in the EVE chip to detect such an accelerometer on startup, read the registers if a accelerometer is present, calculate the orientation of the device from it and then provide the information in a register.

REG_ORIENTATION
Bit 2 – 0: screen orientation information bits.
0b’000: Default landscape orientation
0b’001: Inverted landscape orientation
0b’010: Portrait orientation
0b’011: Inverted portrait orientation

Well, maybe that is a dumb idea as I have no idea so far how complicated it is to implement this in software.
Hmm, I could add an accelerometer with SPI to my controller board for EVE,
this might be something extra to do untill BT820 are available to play with. :-)

8
Discussion - EVE / Re: CMD_SYNC in FT81x?
« on: November 15, 2024, 07:22:35 PM »
Thank you for the confirmation, I will shuffle a few bits around in my library then.  :)

9
Discussion - EVE / Winstar BT81x modules
« on: November 12, 2024, 04:59:31 PM »
I am always looking for EVE modules to include support for in my library and I just found these from Winstar:

WF43WTYBEDST0 - 4.3" IPS 480x272 resistive touch, BT816
WF43WTYBEDSG0 - 4.3" IPS 480x272 capactice touch, BT815
WF50FSYBGDST0 - 5.0" IPS 800x480 resistive touch, BT816
WF50FSYBGDSGA - 5.0" IPS 800x480 capacitive touch, BT815

These might be Arduino shields and these might come in different versions.
Like with a SD socket, Arduino pins soldered in or a flash-chip - but none of these options are in the datasheets I found.

There is a 20pin header (FFC connector not populated) that looks like Winstar started with the pinout from Riverdi,
but pins 9 to 16 are different.
There is no Audio Out, the IOs are different and there are CSCL, CSDA, CRST and CINT pins for the ILI2130 CTP.

I wonder if the CTP is even connected to the BT815.

I am curious, but I can not find a distributor I would buy these from.
And Winstar only offers a short-form datasheet on their website.

Has anyone played with these?



10
Discussion - EVE / CMD_SYNC in FT81x?
« on: November 10, 2024, 11:00:25 AM »
The BRT_AN_088_FT81x_BT88x-Programming-Guide.pdf v1.0 documents CMD_SYNC for FT81x and BT88x.
But the earlier FT81X_Series_Programmer_Guide.pdf v1.0 does not have this command.

Do FT81x have CMD_SYNC?

Edit: I guess FT81x do have CMD_SYNC, I just noticed that CMD_SETBITMAP is command #0x43 while CMD_SYNC is #0x42.
And #0x44 is CMD_FLASHERASE.
So not mentioning CMD_SYNC in the FT81x documentation is likely an oversight which has been correct with BRT_AN_088.

11
Discussion - EVE / minor issue with CMD_SCREENSAVER
« on: November 09, 2024, 05:52:44 PM »
I just actually used CMD_SCREENSAVER and found a minor issue.
The command does not respect the setting of VERTEX_FORMAT and therefore requires to set it to 4 like this with the display-list macro command for it:

EVE_vertex_format(4);
EVE_macro(0);
EVE_vertex_format(0);

I am using a FT813 right now, a BT81x will probably do the same.
This was easy enough to figure out, the only issue is, this is not documented while at least for the BT81x commands like CMD_ANIMXY have a note in the programming guide.

12
Discussion - EVE / BT82x
« on: October 09, 2024, 05:03:35 PM »
Ok, a datasheet is released now, but this leaves me a little confused.

So far EVE5 was anounced as BT822 with 1Gbit of embedded DDR3L.
And now we got a datasheet for a BT820 with up to 4GBit of external DDR memory?

The clock source is a 38.4MHz crystal, but the system clock is 72MHz?

The fonts remained unchanged - really?

As I predicted, the SPI host interface has been updated from 22 bit adressing.
But I am not 100% sure how it is working so far.

Ok, the BT820 has 31 bit adressing with the MSB beeing the "WR" bit, so writing when it is set to '1'.
Also it is Addr3, Addr2, Addr1, Addr0, followed by Data0, Data1 and so on.

As it always was since FT800, address and data use different byte orders, ok then.

When reading from the BT820 there no longer is a simple dummy byte though, first the address is send, then data is read untill 0x01 is returned, when 0x01 was returned the following transfers are for the actual data bytes.
Well, at least reads are less common and usually short.
I wonder how long that polling can last though.

"The transactions are word based, i.e., the data width must be in blocks of 32 bit when accessing the
registers and the DDR memory of the BT820. Addressing to the registers and the DDR memory must also
be word aligned, i.e., the last two bits of the received address is ignored"
"The write data is expected to be in blocks of 32-bit. Any incomplete data is discarded when SS_N deactivates."

Ok, I guess implementing rd8, rd16, wr8 and wr16 functions won't be necessary then.

That seems to be pretty clear so far.

Then we have host commands.
Ok, host commands are always 5 bytes long.
The ACTIVE command is just 0x00 0x00 0x00 0x00 0x00.
And writing parameters such as the the memory configuration is done with:
0xff Command Parameter 0x00 0x00
And then we still have POWERDOWN, STANDBY and SLEEP, at least.

So the host controller will do 32 bit transfers for the most part but still has to be able to do 8 bit tranfers,
for the host commands at startup and to poll for 0x01 during every read sequence, correct?


Now for the touch engine, turns out that resistive touch is not supported directly after all.
It is supported by using an external resistive touch controller that is connected via I2C.
Interesting.

A memory map is missing from the first revision of the datasheet.

And speaking of memory, that 1Gbit still is a surprise for me, I have no idea what this could be filled with.
Well, more can't really hurt, that "24-bit RGB framebuffer up to 2048 x 2048 pixels" would be 16Mbyte.
The registers, fonts, FIFO, ROM(s) and display lists likely also use regions in RAM.


The most interesting question is still when I can buy anything with a BT82x on it though. :-)

13
Discussion - EVE / inexpensive camera module with LVDS interface?
« on: September 30, 2024, 04:35:25 PM »
Not trying to discuss why, yet. :-)

But I am looking for an inexpensive camera module with LVDS interface.
And I am not finding any.

Either the cameras have USB, parallel Interface or MIPI-CSI.
Or I find cameras for 400+ EUR/USD.

Anything from 320x240 up to 2.3MP should do.

Maybe that is just something that is difficult to search for?


14
Ok, no more questions then, the suspense though. :-)

One final remark though, I noticed that the BT822 is using a 38.4MHz crystal on the "Block Diagram" image.
That is an odd value.

15
One thing that just struck me, FT81x and BT81x do "only" have a 22 bit address range, so 4 megabyte.
Does this mean that the BT822 will be using a new memory model with a 30 bit address range in order to support the 27 bit needed to address the 128 megabyte of embedded DDR3L SDRAM plus FIFO plus DL plus registers plus external Flash and so on?

That would indeed be a fundamental change if the first bytes to be send is 32 bit instead of 24 bit and a change that I really would apreciate.         

Pages: [1] 2 3 ... 29