the infamous RA8875 (again!) pullups on every SPI pins

sumotoy

Well-known member
I'm working from time to time to discover the RA8875 chip but get stuck when I tried to connect other SPI devices, for example the SD library get stuck, etc. etc. No matter witch library I plan to use, after plug the oscilloscope I discover that apart the infamous MISO pin, even MOSI,CS and SCLK are pullup and in particular SCLK it's pulldown until the RA8875 chip has concluded his turn on cycle then pullups.
I have tried to isolate all the RA8875 SPI pins with several chips, 4050 non inverting buffer, 74hc125 but as soon I connect any spi device, it get stuck.
Before all, I've applied the MISO trick of Paul since it works even if the datasheet of the 74hc125 shows a 150nS for the enable pin, I'm lucky that RA can work at max 6.6Mhz with SPI, so I'm wondering if I have to delay all 3 lines to prevent missed data for waveform mis-aligned.
Apparently the SCLK it's the most critical, I got RA8875 and SD working by using a port of a 74hc125 on SCLK drived by RA8875 CS (as the MISO suggested by Paul) it works but of course I got garbage at high speed because it's clearly just a workaround.
The second working solution was use several ports of a 74hc125 to isolate MOSI and SCLK drived by a separate processor pin that isolate display SPI lines, it works but it's a waste of pin to me, must be an easiest solution.
Question is, since the RA8875 spi lines are internally pullup, should I use an open drain non inverting buffer like 74LVC07A?
I cannot understand why the 74hc4050 or 74hc125 it's not able to isolate RA8875 from other devices, someone can illuminate me?

Second question, someone tried if the Adafruit RA8875 board has the same problem? I know that it has a 4050 as frontend but my experiment shows that it's not sufficent, I'm wondering if pullups coming from RA8875 chip or bad chinese design (prolly)
 
Last edited:
To move our conversation from your Github repo issue section I have done some investigating with my display . . .

I have tested my display as you requested and there seems to be pull-ups on all SPI pins, MISO, MOSI, SCLCK and CS.

The display PCB is marked up ER-TFTM070-5 V1.0

I am however using the on board SD card on the same SPI port, as I said I am currently using Teensy 3.1 so I only have one SPI port on board.

Just got the magnifying glass and multimeter out.

As far as I can tell R1, R2, R3 & R48 are pull-ups for CS, SDO, SDI & SCLCK respectively. This is further verified by the suggested configurations in section '4.4 Jump Point Description' of the East Rising data sheet.

The outer side of R1, R2, R3 & R48, nearest to the edge of the PCB, seem to be connected to VDD by a diode. I can't see it, but there is a forward voltage drop of 0.78V when I use the diode test on my meter.

The jump point description for JP3 pin 7, SDI, is 0R when configured for 3 wire SPI and 10K when configured for 4 wire SPI. In 3 wire mode this pin is unused. I have read elsewhere that others have removed R1-R3 without issue. I presume that removing R1-R3 will therefore remove the pullup on CS, MOSI and SCLCK. There is no mention of R48 in the jump point descriptions and there is no resistor fitted here on my board so I am slightly puzzled as to what is pulling that up. C1 also connects SDI to ground and C2 connects SCLCK to ground.

For 3 wire SPI JP3 pin 7, SDI, has no connection which seems in some way to verify my findings I think.
 
good cach experimentalist! Following (carefully) with microscope lines SCLK, MOSI, CS, and MOSI discover that are effectively connected to + out of U2 regulator! I've readed carefully the RA8875 and there's no mention about pullups on SPI lines so it's probably another 'Made in China Fail' design, since those pullups already destroy a Teensy 3.1 pin 13 port (Teensy get really stressed by those pullups in a output). My hot air solder it's already turned on, I'm gonna try to get rid of those resistors.
Btw I've checked the Adafruit schematics https://github.com/adafruit/Adafruit-RA8875-Breakout-Board-PCB and (apart a 4050 buffer straigh in the SPI ports of RA chip) they don't use any pullups but MISO has the non-tristate bug as described by Paul so I pray that's the only exposed hardware error of this chip.
 
I just desoldered R1, R2, R3, leaved open, no more pullup on CS, SCLK and MOSI. Cannot find R48 on my board.
Now display works better than before, it initialize steady (before at high speed I got one white screen every 20 cold start). It's too early to say but I'm pretty sure that it's much better desolder those resistor! As I said, I got a Teensy 3.1 with a SCLK gone in peace for those absurde resistors so I would raccomand caution to other user when using this display with teensy. Now I can finally test with other SPI devices and with Paul's 74hc125 solution I can live with it.
C1 and C2 smell like another 'china failure design' as well, gonna remove immediately.
 
Last edited:
Ok, removed also C1 and C2, signals into oscilloscope looks much better, before signals gets rounded, display works steady with no problems.
 
So, to be clear, you have removed R1, R2, R3, C1 & C2? Will this help with the SD compatibility do you think or is that purely the known MISO tri-state bug? I still do not understand how I am using the on board SD card without issue up until your 0.69 version of the library with no extras, just T3.1 and the display. Maybe the SD card I am using?
 
Well, before I have intermittent failures with any other devices on SPI, the SD library was not working, the SdFat yes but have failures from time to time. Now everithing works out of the box! I don't think it's a good idea a condenser on SCLK and MOSI.
Btw I'm using the 74hc125 on MISO all the time. Now I can finally finish the RA library! Do not forget that that I got a pin fried for those pullups (probably because I was on breadboard where wires are always instable).
 
Last edited:
It's just a bypass capacitor, any polyester will be ok. The link you provide it's ok.
About the 0.68, 0.69, let continue on GitHub. I have time today so I can work with library again.
 
Hi,I have just seen that you added a couple of lines of code to the library from me, thanks for the credit.

Just got a delivery of a couple of 74HC125 today. Looking at your diagram (https://github.com/sumotoy/RA8875/wiki/Fix-compatibility-with-other-SPI-devices) I am not exactly sure how to connect the chip select (CS). Do I just connect it in parallel with the display chip select?

What is the significance of the red and green colour coding in the diagram? Green 3.3V, red 0V?
 
Last edited:
Do I just connect it in parallel with the display chip select?

The answer appears to be yes, to answer my own question. I have found some more info in other threads and thought I would reference them here for the benefit of others who stumble upon this one.

The wiring in the post below by Paul Stoffregen and the circuit diagram below that both seem to confirm that the CS line is just connected in parallel.

. . . the RA8875 chip does not tri-state its MISO pin when CS is high.

Here is the example, with both MISO pins run through a 74HC125 tri-state buffer chip, controlled by the 2 chip selects.

View attachment 2990
(click for full size)

 
sumotoy, are you here over easter? I have an unused RA8875 5" 480*272 here and I might need your help when setting it to SPI mode...

(Also one resistor fell of when I unpacked it. Support told me to solder it "back into place" but the solder pads obviously never had any paste applied. I'm curious if I'll ever get this thing going.)
 
It is an er-tftm050-2, and the resistor that fell off was r23 or r24. I can upload a picture later

I have a ER-TFTM050-3 and it has R23 but no R24. That is R23 is soldered in place R24 has a place holder but is not present. I am pretty sure we both have the same circuit board though so can have a look if you send some pics.
 
Here's a picture:
DSC_0238_70.jpg
The resistor was R24, labeled 16R5 (so 16.5 Ohms). Support said that it's part of the backlight.
 
Well, after 'days' of experiments here's what I found:
1) the pullup resistors and condensers on Eastrising display, my opinion, should be desoldered! Using the display alone (or even a couple) it doesn't compromise anithing but using other SPI devices together can drive to problems.
2) I'm very unlucky with SD cards, I have at list 15 here, different brands, but just one works out of the box together with the display, an old 2Giga one unbranded! I've try to get 2 brands suggested here on ebay but are very unreliable and probably are cinese fake!
3) The SD holder of the Eastrising display it's too far from the SPI display pins, drive SD at high speed can be a problem due the cable lenght.
4) I really don't know WHY but disconnect the sck of the display bring any of my SD card to life even with 74hc125 on MISO, have tried to isolate the display sck wit another 74hc125 port (always enabled) but still got the same problem. The only way it's connect a 74hc125 port to MISO, another one to SCK, all drived by CS pin!
The RA8875 work at max SPI speed of 6.67Mhz in write and 3.3Mhz in read, I have try to increase the SPI speed but stop to work immediately so use very high optimized SPI routines it's almost useless with it, maybe some improvement with DMA SPI can be an idea.
I got the expensive adafruit board with a 5" display and get the same results, I don't like this board, it's too expensive, display it's expensive too, and it's a pain to use with the ultrathin cable, also a lot of chip features are missed and cannot be added.
I'm actually ordered 2 display from BuyDisplay because mine it almost dead, too much experiments have damaged something and the glass touch it's cracked.
Christoph, I have an UL E257834 (20140 120XS001) EastRising and R24 it's unpopulated. R23 it's present btw.
 
Last edited:
Hi Christoph, looks like exact of mine! I see you still not prepared for SPI (still in parallel mode). I confirm my R24 its unpopulated.
And your help will be very appreciated ;). The library seems works well now but actually my display it's unstable and I'm so pissed off the SD problems that I've decided to take a break with it.
 
Last edited:
I see you're quite frustrated with this board just like many others. I'll at least try to make it work. So before I do that I have to remove R1, R2 and R3 as well as C1 and C2, and configure the jumpers for SPI as per the datasheet (or are there any surprises as well?).

Regarding SPI speed there seem to be different opinions on the possibility to modify the controller's PLL settings. I think I'll just try that as soon as I have it working with a slow SPI. Of course DMA is also on my list, and an implementation of a ugfx driver
 
As I said, this display works really well! It doesn't need a fast SPI because the internally accellerated macros so I'm really happy with it, I can as very large FFT display (with 512 bands in almost real time) and Teesny it's using a fraction of his power to do this, as far I know none display it's capable to do that at the time I'm writing this (probably spending a fortune with 4G processor will be faster but cost really too much expensive, around 300 US!).
The SSD1963 it's a completely other world, it's a frame buffer based display, it doesn't have accellerated macros so it will use a lot Teensy resources, btw it's really fast to handle large pixel data.
The ONLY problem with RA8875 it's dealing with other SPI devices in the same SPI bus, I'm actually forced to use external hardware to do that, Paul described the MISO problem, not tristate and can be a problem with other SPI devices that use MISO (as SD), btw nobody can explaing me why SCK create such as big problems with other devices, I'm actually convinced that my display have some troubles, I have no other explaination, so I've ordered a couple new.
You can try yours, you will be happy, expecially if you use layers with XOR,AND,Etc. operations that are unique of this display and let you use masking technique to draw very fast volume bars, on a SSD you probably have to deal with the entire bar.
 
About the RA8875 SPI speed, it's hardwired with the Xtal you are using. System clock/3(only write cycle), System clock/6(with read cycle). So...
6.67Mhz and 3.34Mhz
There's no escape or PLL for getting around this as far I know... Probably changing the Xtal with a faster one?
 
According to the datasheet the XTAL frequency is not the system frequency. f_xtal is fed into a PLL, and f_sys is the output of that PLL. There are two registers for setting the PLL, and the datasheet also describes an example of getting 60 MHz f_sys from a 20 MHz f_xtal (exactly what I'd be aiming for). That would allow 20 MHz SPI writes, and 10 MHz reads.
 
Here's the bottom side of my display with R1..R3, C1 and C2 removed and - to the best of my knowledge - configured for 4-wire SPI:
DSC_0239_70.jpg
When I supply power to it, nothing happens (I would have expected the backlight to turn on or something like that). I'll just try some demo code on it, I guess...
 
Back
Top