spi and cs timing

zmemw16
Tue Dec 22, 2015 1:02 pm
in the Re: New SdFat library (with and without DMA) thread
http://www.stm32duino.com/viewtopic.php?f=13&t=20

i found a discussion about the select signal timing, prompting me to post this
zmemw16 wrote:daft idea, but could this manifest itself as display flicker on the tft ili9341 displays i’ve been trying to get to work?
i get a white screen, with the shade of white changing in sync with test mode changing.
the working one, now one and a bit as something waggled with a second and it showed bits of the test display with much flickering.
i was beginning to think it might be timing in the init sequence for the controller.

stephen


mrburnette
Tue Dec 22, 2015 8:36 pm
@stephen,

I have used the ILI9341 in several projects
http://www.hackster.io/rayburne/mesmeri … -stm32f103
http://www.hackster.io/rayburne/10-arduino-o-scope
http://www.hackster.io/rayburne/color-b … time-clock

And have not witnessed the flicker you describe. Have you a test-case that will produce the problem using the latest STM32 soak-core?

I have a Saleae Logic 8-channel unit, I can maybe give your problematic code a test on my Maple Mini… but likely next week as grandson is here through weekend.

Ray


zmemw16
Tue Dec 22, 2015 10:34 pm
@ray,
it’s got to be something stupid that i’m doing or i don’t realise i’m doing it.

i have a single baite maple mini that works with all of the displays 2.2/2.4 etc.
i’ve had a second baites do something in colour, but it’s not consistent.
then when i change the maple out for either any the baites ones or a couple of
unsigned ones, all i get is a white’ish screen with changes of whiteness about
where it prints out to serial and does a delay between tests
.
i’ve replicated the circuit wire by wire and now have 3 or 4 bread boards, all doing nada,
except for the ‘one”.

added a 1000uF and a couple of 47nF caps on Vcc/Gnd rails.

i think i’v overwritten the master maple, i remember commenting out all the delays in the
graphicstest sketch and boy does it race through.

i’ve done this with chinese?? nano’s and most recently after wiping
everything with a totally pristine arduino 1.6.5r5, no add ons at all bar adafruit gfx & ili9341
libraries, hanging a display directly wired to a uno clone as well, just white
also i always have the same issue with the shield variants as well.

i get the same with your projects as well.

the ‘working’ baites is marked with black permanent marker and two elastic bands around the
end so i know not to touch.
what i really would like to do is read back the flash and write that to another maple, see what
happens then

i think i was a bit brain dead when it worked and now not quite sure which sketch had the
magic … … …

i’ve had spi fun before, so i’ll hang the openbench logic sniffer in there and see.
also wondering about my usb hubs, currently cascaded, but no errors when i upload programs
or appear to, compiler and upload messages set to all.

basics,
i never use spi ss, normally set it as an output and high and not connected to anywhere.
doesn’t seem to matter whether it hardware or software spi, level shifters available, but not in use.
these displays are operational at 3v3 or 5v? not entirely sure, but istr them not being 5v at some point.

what i might do next is power one off a 5v psu/wallwart? either from hub or from wall, the nominal 3v3 is 3.220v
the usb 5v doesn’t seem to around?
so i’ve plenty to play with at the weekend, might resolder the usb connectors on the tv sticks.
i’ve realised i watch gold rush and deadliest catch & not much else and my kindle is getting
hammered.

just setup arduino 1.6.5r5, board manager added cortx-m3 for 1.6.5, set the avr cores back
to 1.6.5 from 1.6.8, with development as of 20-11-15 and i get
/home/stephen/sketchbook/hardware/Arduino_STM32/tools/linux/maple_upload: line 40: /home/stephen/sketchbook/hardware/Arduino_STM32/tools/linux/dfu-util/dfu-util: cannot execute binary file: Exec format error


mrburnette
Wed Dec 23, 2015 12:26 am
zmemw16 wrote:

i’ve replicated the circuit wire by wire and now have 3 or 4 bread boards, all doing nada,
except for the ‘one”.

these displays are operational at 3v3 or 5v? not entirely sure, but istr them not being 5v at some point.

what i might do next is power one off a 5v psu/wallwart? either from hub or from wall, the nominal 3v3 is 3.220

zmemw16
Wed Dec 23, 2015 4:44 pm
istr something, i’m about to do a search for ‘shorted track pin’ or ‘close track pin’
just one on each, not what i’m after.

something about a track being very close to a pin, a pill or maple mini. i recall looking at a board
and deciding it wasn’t in that case.

srp


mrburnette
Wed Dec 23, 2015 9:42 pm
There are a number of “Baite Maple Mini” clone distributors but I buy directly from the Baite store on Aliexpress these days.

I ordered my first few clones from eBay ($3.50) and they had visible “rework” on the boards, obvious from flux used with handsoldering. But, all three worked. My next order came from Aliexpress Baite Electronics and all 10 boards were perfect… no rework. I ordered again 5x boards from Aliexpress but not Baite (but at $3.50 vs $4) and one of the 5 had obvious rework but this time no sloppy flux.

My current belief: Baite dIstributed Baite Maple Mini boards are 1st quality products. Boards failing the Baite QA (IMO) go out the backdoor to be reworked and I have seen these products as low as $3 USD with free shipping. But I have no real evidence on what is really happening.

Ray


zmemw16
Thu Dec 24, 2015 12:16 am
ray,
most of my maple minis’ are baite and i have a few maybe 3 ‘unsigned’ maple minis’,
i have no problems at all with them.
they are all a reasonable quality, never seen any rework or extra flux on them, only mine
from soldering headers.

my belief is that it’s timing, flicker, occasional colour and other odd behaviors.
i’v read somewhere or somewhen something about one of the pills(?) having a track to pin
clearance issue adjacent to the corners of the processor, where they appear to have done some
serious squeezing together in order to fit.

i have a couple of sketches, one loops over pins 4 to 11, and pulses the pin its number of times.
pin 3 is a single start pulse to trigger the OLS.
they look perfectly fine.
i have a second sketch edited from using_spi example with a separate functions setting CS,RST
and DC either high or low.
i take CS,RST and DC in sequence to low, send the data and return the control lines high in reverse,
so i see three cs lines with decreasing active time.
the separation on the last edges of sck and data look funny, almost coincident which i wasn’t expecting.
first edges of those signals look reasonably spaced. memo repeat with 100MHz and 200MHz sampling.
ok i know bread board is a seriously large capacitive item.

the 3v3 is sitting at around about 3.250v / 3.255v

currently i’ve got the latest STM32 development branch soft linked, tomorrow i’ll relink to the current
‘normal’ version.

my next attempt will be with a TXS0108E 8 bit level shifter, ‘A’ side 1.8/2.5/3.3v ‘B’ side is 2.5/3.3/5 shifter module
A <= B, it’ll be 3v3 — 3v3, already got the ols connector.

i might be be trying a s/w bit bang as well, as i’ve already tried with divider by 64 / 128 / 256
btw i’ve been updating my maples as i go to the v2 bootloader, huge upload speed increase,

stephen


mrburnette
Thu Dec 24, 2015 5:58 pm
zmemw16 wrote:ray,
most of my maple minis’ are baite and i have a few maybe 3 ‘unsigned’ maple minis’,
i have no problems at all with them.
they are all a reasonable quality, never seen any rework or extra flux on them, only mine
from soldering headers.

zmemw16
Thu Dec 24, 2015 10:59 pm
mrburnette wrote:[All my minis are branded “Baite” but my belief is there is a front-door and a back-door to the Baite assembly area.

zmemw16
Fri Dec 25, 2015 11:11 pm
mea culpa, it usually is!
i normally use dupont cable and a bread board, in this case i used 2 20cm m-m sets, colours 1-7 to connect the
maple to the tft.
power lines are separate bkk & white

so its a maple mini to 7 way meeting another 7 way to the tft, then i hang the openbench logic sniffer off the middle
tft pin 6 is led and is also separated out to a 100R to 3v3

so having screwed up the defines, the wires got crossed and crossed back differently.
so i ended up using a pen and paper to do a table with the maple connections against the display pins and the colours they should be at each end.

rewired it, now it’s working.

fitted my bread board friendly zif socket with row of single connectors each side, make sure which side you want the single line of holes left on b-b to be.

cycled through 9 maples upgrading the boot loader, programmed them for stm_graphics as well,
observed the tft.

then cycled through half a dozen 2.3/2.4 tft’s and randomly changed the maple
one maple fatality, no smoke, which might recover with a soldering iron, supply pin pushed / pulled in lifting it off the b-b

all worked, so it was most definitely a timing issue.
i knew it, had to be me, just once please, oh please

hxmny
stephen


mrburnette
Sat Dec 26, 2015 12:47 am
zmemw16 wrote:
<…>
rewired it, now it’s working.
<…>
all worked, so it was most definitely a timing issue.

zmemw16
Sat Dec 26, 2015 1:39 am
ray,
about 20yrs ago, i had a software problem involving tangents of angles in all 3 axes. suffice to say +/-90degrees. something was causing a spike in the calcs and a system crash.
now as i had many variables, x,y,z, angle rates, all with dot and double dots etc, etc, i thought one way would be to take sets of 5 channels and feed them into some oss 5d visualization software i’d found and look for spikes. the oss s/w target was for weather i think
they wouldn’t let me have the data, more correctly the time on the rig to record it.
i still wish i could have done it.

i still wish i had a flow chart for some rt s/w i wrote, it covered 2 sheets of a3 in 2mm text handwritten. took me about 2 months. it waggled a big bit of machined metal, about 35mm thick metal, outside dimensions in metres; with hydraulic rams.

the feline is looking at me again with expectations, what for i haven’t the faintest, food no, water no, head scratch is more probable, that ties up my left hand and mouse.
take 3.00x glasses, hold at a suitable angle and distance from the led strip behind me and you get the cat chasing lots of white dots.

stephen


Leave a Reply

Your email address will not be published. Required fields are marked *