The FCC pinout is:
GPIO
GPIO
CS
GND
GND
MOSI
MISO
SCK
GND
GPIO
GPIO
GPIO
GND
GND
POWER
POWER
GND
GND
POWER
POWER
Possibly not ideal, but maybe not the worst?
/**
* @brief Set the mode of the SPI for the required peripheral
* This must be called before using each peripheral in turn
* @param mode: SPI_MODE_STLED316, SPI_MODE_ADS1118 or SPI_MODE_MCP3550 or SPI_MODE_HI3593 etc
*
* There were some weird problems related to different SPI devices not playing together, and the SPI clock
* mode of one affecting another. One was in the form of STLED316 display artefacts with the HI3593.
* One solution was to run all slaves with the clock parked LOW, which was incorrect per data sheet for some.
* Most devices should not actually care anyway i.e. they should sample data only on the clock *edge*. But
* What obviously does matter is which clock edge is used to sample the data and that must be set right.
* The ADS1118 is the only one on which the data is sampled on the *falling* clock edge.
* This is handy: https://visualgdb.com/tutorials/arm/stm32/spi/
* and https://peter-ftp.co.uk/screenshots/202102233910802613.jpg
*
* One explanation for this which somebody found: Depending on SPI phase/polarity, the initial clock/data levels
* after setup might be wrong. Since that bus has a whole bunch of SPI-slaves, I have to control the NCS-pin by
* firmware anyways. So simple solution: after changing config, keep all NCS idle/high and send a single packet.
* After that the idle polarity of the clock/data lines correspond to the configuration.
* This was attempted and made some difference but also broke some other stuff.
*
* STLED316 clock modes marked **** work but brightness control fails and display occassionally flickers, which
* suggests that the data coming out of the SPI is being read incorrectly. However this could be due to other
* SPI device activity before or after the STLED316.
*
* SPI3 runs off APB1 which is 42MHz.
*
* This function works regardless of whether the SPI transfer is done with HAL_SPI_TransmitReceive() or with
* SPI3_DMA_TransmitReceive().
*
*/
void spi3_set_mode(uint8_t mode)
{
// SPI configuration
switch (mode) {
case SPI_MODE_STLED316: // options *** below work but should not
m_spi.Init.Direction = SPI_DIRECTION_2LINES;
m_spi.Init.DataSize = SPI_DATASIZE_8BIT;
// m_spi.Init.CLKPolarity = SPI_POLARITY_HIGH; // ****
m_spi.Init.CLKPolarity = SPI_POLARITY_LOW; // ***
// m_spi.Init.CLKPhase = SPI_PHASE_2EDGE; // ****
m_spi.Init.CLKPhase = SPI_PHASE_1EDGE; // ***
m_spi.Init.NSS = SPI_NSS_SOFT;
m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; // 650kHz (max 1MHz)
m_spi.Init.FirstBit = SPI_FIRSTBIT_LSB; // LSB first - unusual
m_spi.Init.CRCPolynomial = 7;
m_spi.Init.Mode = SPI_MODE_MASTER;
m_spi.Instance = STLED316S_SPI;
break;
case SPI_MODE_ADS1118:
m_spi.Init.Direction = SPI_DIRECTION_2LINES;
m_spi.Init.DataSize = SPI_DATASIZE_16BIT;
m_spi.Init.CLKPolarity = SPI_POLARITY_LOW; // correct per data sheet
m_spi.Init.CLKPhase = SPI_PHASE_2EDGE; // likewise - sample on -ve ck edge
m_spi.Init.NSS = SPI_NSS_SOFT;
m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; // 2.6MHz (max 4MHz for ADS1118)
m_spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
m_spi.Init.CRCPolynomial = 7;
m_spi.Init.Mode = SPI_MODE_MASTER;
m_spi.Instance = ADS1118_SPI;
break;
case SPI_MODE_MCP3550:
m_spi.Init.Direction = SPI_DIRECTION_2LINES_RXONLY;
m_spi.Init.DataSize = SPI_DATASIZE_8BIT;
// m_spi.Init.CLKPolarity = SPI_POLARITY_HIGH;
m_spi.Init.CLKPolarity = SPI_POLARITY_LOW; // SPI mode 0,0, uses 4 bytes
// m_spi.Init.CLKPhase = SPI_PHASE_2EDGE;
m_spi.Init.CLKPhase = SPI_PHASE_1EDGE;
m_spi.Init.NSS = SPI_NSS_SOFT;
m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; // 2.6MHz (max 5MHz for MCP3550)
m_spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
m_spi.Init.CRCPolynomial = 7;
m_spi.Init.Mode = SPI_MODE_MASTER;
m_spi.Instance = MCP3550_SPI;
break;
case SPI_MODE_HI3593:
m_spi.Init.Direction = SPI_DIRECTION_2LINES;
m_spi.Init.DataSize = SPI_DATASIZE_8BIT;
m_spi.Init.CLKPolarity = SPI_POLARITY_LOW; // This is actually correct per data sheet
m_spi.Init.CLKPhase = SPI_PHASE_1EDGE; // and so is this
m_spi.Init.NSS = SPI_NSS_SOFT;
m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_8; // 5.2MHz (max 10MHz for HI3593)
// m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4; // 10.5MHz (max 10MHz for HI3593)
m_spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
m_spi.Init.CRCPolynomial = 7;
m_spi.Init.Mode = SPI_MODE_MASTER;
m_spi.Instance = HI3593_SPI;
break;
case SPI_MODE_NEO_M9N:
m_spi.Init.Direction = SPI_DIRECTION_2LINES;
m_spi.Init.DataSize = SPI_DATASIZE_8BIT;
m_spi.Init.CLKPolarity = SPI_POLARITY_LOW;
m_spi.Init.CLKPhase = SPI_PHASE_1EDGE;
m_spi.Init.NSS = SPI_NSS_SOFT;
m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; // 64: 650kHz (max 1MHz for 125kbyte/sec max data rate)
m_spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
m_spi.Init.CRCPolynomial = 7;
m_spi.Init.Mode = SPI_MODE_MASTER;
m_spi.Instance = NEO_M9N_SPI;
break;
case SPI_MODE_LY68L6400:
m_spi.Init.Direction = SPI_DIRECTION_2LINES;
m_spi.Init.DataSize = SPI_DATASIZE_8BIT;
m_spi.Init.CLKPolarity = SPI_POLARITY_LOW;
m_spi.Init.CLKPhase = SPI_PHASE_1EDGE;
m_spi.Init.NSS = SPI_NSS_SOFT;
m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; // 2: 21MHz - max possible on this box
m_spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
m_spi.Init.CRCPolynomial = 7;
m_spi.Init.Mode = SPI_MODE_MASTER;
m_spi.Instance = LY68L6400_SPI;
break;
default:
break;
}
HAL_SPI_Init(&m_spi);
}
/code].... putting the scope on the CLK line makes the unreliability go away ....Break the CLK line and insert a 0402 SMD inductor into the break, try ~15nH to start.
How am I supposed to see what the waveform is like when the scope takes it from non working to working?
... Is that impossible really?There are geniuses gathered here, and you are asking about such a trifle as connecting an oscilloscope probe through a resistor.
Thanks, yes, I'll look at polarity etc too
.... If you put the scope on the clk signal there is a small capacitance added tot the clk ....You are misleading people. Connecting the probe introduces a complex circuit, the main component of which is the ground connection loop from the probe.
I am almost 99% sure the clock polarity is inverted.
Reasoning: If you put the scope on the clk signal there is a small capacitance added tot the clk so the rising edges are a little behind the data edges in this situation, but just enough to make the data stable.
Benno
There are geniuses gathered here, and you are asking about such a trifle as connecting an oscilloscope probe through a resistor.
I am almost 99% sure the clock polarity is inverted.
Reasoning: If you put the scope on the clk signal there is a small capacitance added tot the clk so the rising edges are a little behind the data edges in this situation, but just enough to make the data stable.
...And of course, ignore Postal2 (I think it's obvious to most at this point?)Did I stop you from giving a newbie the wrong directions?
You are talking about adding some extra resistance in the same order of the load that the tip capacitance presents at the x0MHz of SPI, which sounds like a marginal solution on a marginal problem....And of course, ignore Postal2 (I think it's obvious to most at this point?)Did I stop you from giving a newbie the wrong directions?
You can connect the oscilloscope via a 100..300 ohm resistor (sometimes I connected even through 10k), but it is better to solder the chip resistors end-on at different points - where you are interested in looking, and touch the free ends of the resistors with a probe.
You are talking about adding some extra resistance in the same order of the load that the tip capacitance presents at the x0MHz of SPI, ....Yes, that's exactly it.
For a crystal in a feedback loop the change in reactance by adding some comparable tip resistance may well produce a significantly different result, but that does not apply to general probing. Any tip resistor would need to be >>> the probe loading to make a substantial difference in the general case. An SPI line driver does not substantially change with reactance (while keeping impedance similar).You are talking about adding some extra resistance in the same order of the load that the tip capacitance presents at the x0MHz of SPI, ....Yes, that's exactly it.
If you have a quartz crystal that has an unreliable start, you will never detect it by directly connecting the probe to its terminal - it will start at the moment you connect it. This is solved by connecting through a resistor (as well as doing it for adjusting the resonance of the coils with a trimmer core).
In the described case, resonance occurs - you need to use a resistor.
So do I need the clk line transitioning half way through the data bit?Yes, that would be the first thing to check, that the data is stable around the sampling edge.... But...
My ethernet device states this in the datasheet:and
.....
Input data on SDI is latched on the rising
edge of clock SCL. Output data on SDO is clocked on the falling edge of SCL.
My LCD device datasheet states this:
Only SPI mode 0 is supported.
Is this mode 0?You tell us:
My ethernet device states this in the datasheet:
SCL is expected to stay low when SPI operation is idle. SPI operations start with the falling edge of SCS_N and end with
the rising edge of SCS_N. A single read or write access consists of a 27-bit command/address phase, then a 5-bit turnaround (TA) phase, then an 8-bit data phase. For burst read or write access, SCS_N is held low while SCL continues to
toggle. For every 8 cycles of SCL, the device will increment the address counter, and the corresponding data byte will
be transferred on SDI or SDO in succession.
All commands, addresses and data are transferred most significant bit first. Input data on SDI is latched on the rising
edge of clock SCL. Output data on SDO is clocked on the falling edge of SCL.
Is this mode 0?
My LCD device datasheet states this:
Only SPI mode 0 is supported.
So do I need the clk line transitioning half way through the data bit?
Thanks,
G
...And of course, ignore Postal2 (I think it's obvious to most at this point?)Did I stop you from giving a newbie the wrong directions?
.... Better solution: have a selection of appropriate probes for different situations.This is impossible. In some cases, when connecting the probe changes the operation of the device (as in this case), it is enough to connect a 10 cm long wire instead of the probe, holding it with insulated tweezers, including for starting the quartz. Therefore, it is customary to use a resistor in such cases. Of course, the signal obtained in this way is slightly distorted, but the question was precisely about how to view it.
Your technical advice is hit-or-miss and your attitude is consistently annoying. That's enough for me to enable "ignore user".OK.
Unreliable data transmission with SPI is 99 % caused by wrong clock/data timing configuration
We're these people born geniuses or did they have to learn too?
It's impressive how after almost two pages of posts the clock/data timing relationship has not been verified.
...... is nonsense.If you give a monkey glasses, it will put them on its butt.
How do you block somebody?
.... usually good practice to insert a 22R or 33R series resistor in the output signals ....It's hard to explain to people how strong resonance can be. And it happens precisely on the signal fronts, and it doesn't matter that the clock frequency is 5 MHz. Northy wanted to see this, and everyone should see this too.
What does that 10cm wire achieve that a different probe could not? Electrically..... Better solution: have a selection of appropriate probes for different situations.This is impossible. In some cases, when connecting the probe changes the operation of the device (as in this case), it is enough to connect a 10 cm long wire instead of the probe, holding it with insulated tweezers, including for starting the quartz. Therefore, it is customary to use a resistor in such cases. Of course, the signal obtained in this way is slightly distorted, but the question was precisely about how to view it.
What does that 10cm wire achieve that a different probe could not? ...It is meant that touching critical points with a small piece of wire hanging in the air directly causes undesirable effects. In order for the oscilloscope probe not to cause such effects, the chip resistor must be at its end. I have not seen such probes, but I have seen a resistor soldered by the manufacturer with a tap to the measurement point many times (I hope everyone has seen it). Therefore, if the oscilloscope probe affects the circuit when connected, you can solder the chip resistor to the circuit and touch the probe through it. The choice of resistor value depends on the expected impedance of the circuit.
I think Postal2 is dropping in ChatGPT answers.
In a well designed digital circuit there are no "critical points". ...I just bought an mp3 player board with an unstable quartz crystal that even senses touch on the case.
I came late to the party and would like to know what kind of probe was used for the measurement.I recently checked the MIPI DSI CLK frequency, which was 200 MHz, with a Micsig oscilloscope and the included ~200 MHz probes. The scope showed about 50 mV amplitude from one of the differential outputs relative to ground. However, I had to turn off all the lights except the incandescent ones to see it.
10:1 >100Mhz with short ground connection?
I think Postal2 is dropping in ChatGPT answers.I usually hear the word "ChatGPT" from stupid people, I have never tried it, but I actually attended a XILINX seminar about AI and I know how it works.
A crystal oscillator is an analog circuit. SPI data transfer is a digital circuit.In a well designed digital circuit there are no "critical points". ...I just bought an mp3 player board with an unstable quartz crystal that even senses touch on the case.
https://www.eevblog.com/forum/projects/diy-mp3oggflac-player-feasible/msg5681177/#msg5681177 (https://www.eevblog.com/forum/projects/diy-mp3oggflac-player-feasible/msg5681177/#msg5681177)
You can have a good design, but the component will let you down.
...
A crystal oscillator is an analog circuit. SPI data transfer is a digital circuit.Perhaps I was not clear enough. The "empty wire" example applies to analog circuits and RF. The case described here involves introducing an additional resonant circuit into the main circuit, formed by the connected probe, its capacitance, the inductance of the probe-to-ground loop, and the inductance of the section of the design from the probe connection to the circuit in which the resonance occurs. Therefore, an attempt to simulate a probe connection with a capacitance of 10 pF gave the opposite effect.
... With a wrong configuration ...So, you're implying that while the device's author turned away, someone snuck up and changed the polarity? Please show an example of a standard library that has a non-standard signal phase by default.
A SPI transfer that fails or becomes unreliable by adding short wires is typical for a wrong configuration of the clock/data timing relationship. With a wrong configuration setup/hold times are marginal and the circuit shows exactly that strange behavior the OP reported. It will be gone with a valid digital configuration. Trying to make the wrong digital design work better by some analog mods is a waste of effort.
Regards, Dieter
Although peter-h regularly posts his code for the non-standard ADS1118, scaring people.
A bit more about this:
..Chinese TFT driver chips are known for their issues. E.g. the ILI9488 doesn't three-state its SPI data output. One needs to add an external gate to make it SPI bus compatible. Many TFT displays available from China don't have that gate. Instead they provide two separate SPI interfaces for display and touchscreen. And of course their example software won't even try to read from the display driver chip.
A lot of SPI slaves have weirdly bodged SPI interfaces. Like this one
https://www.eevblog.com/forum/projects/anyone-using-the-u-blox-neo-m9n-gps/ (https://www.eevblog.com/forum/projects/anyone-using-the-u-blox-neo-m9n-gps/)
and others have rediculously low max SPI clock speeds e.g. the STLED316 (max 1MHz).
AFAIK the Ramtex library doesn't read the display either. There is no fundamental reason to.
Who?QuoteAlthough peter-h regularly posts his code for the non-standard ADS1118, scaring people.
Rubbish. A troll...
................
case KDE_SPI_MODE_ADS1118:
m_spi.Init.Direction = SPI_DIRECTION_2LINES;
m_spi.Init.DataSize = SPI_DATASIZE_16BIT;
m_spi.Init.CLKPolarity = SPI_POLARITY_LOW; // correct per data sheet
m_spi.Init.CLKPhase = SPI_PHASE_2EDGE; // likewise - sample on -ve ck edge
m_spi.Init.NSS = SPI_NSS_SOFT;
m_spi.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; // 2.6MHz (max 4MHz for ADS1118)
m_spi.Init.FirstBit = SPI_FIRSTBIT_MSB;
m_spi.Init.CRCPolynomial = 7;
m_spi.Init.Mode = SPI_MODE_MASTER;
m_spi.Instance = ADS1118_SPI;
break;
................
Well, many microcontroller-based systems will not have enough RAM to keep a full frame buffer in the microcontroller. So one may want to read the prior pixel contents from the display (for specific pixels or a small local area) before drawing some moving objects or traces.
case KDE_SPI_MODE_ADS1118:
.... your posts usually make a bit of sense ....Thank you, captain.
Hi all,
Sorry for the silence, I've not been feeling well for a few days.
.... If so do I just try resistors on the outputs ....You need only one resistor or inductor on the CLK line, absolutely nothing else.
... ignore Postal2. ....For those who have read this thread from the beginning, it is clear who should be ignored.
QuoteWell, many microcontroller-based systems will not have enough RAM to keep a full frame buffer in the microcontroller. So one may want to read the prior pixel contents from the display (for specific pixels or a small local area) before drawing some moving objects or traces.
See this thread
https://www.eevblog.com/forum/projects/graphics-on-an-embedded-system-tft-display-need-help-with-some-pointers/ (https://www.eevblog.com/forum/projects/graphics-on-an-embedded-system-tft-display-need-help-with-some-pointers/)
Reading back the display is some way down the list of doing it efficiently.
The data for the world map must have come from somewhere. Probably stored as a block of data in FLASH. So, since you know the initial position of the moving object, fetch that little rectangle from the FLASH and send it out over SPI (which deletes the said object) and then draw the object in its new position.
It's impressive how after almost two pages of posts the clock/data timing relationship has not been verified.End of page 3, finally the part numbers are revealed and the data sheets all have clear and unambiguous statements about the clock phase requirements/settings. So its one of those threads:
The LCD chip has no proper timing diagram :-//If we can find it trivially, either you're providing the wrong part numbers to us or you've not bothered looking.
... which is why your posts usually make a bit of sense but are of no use to anybody working on something specific.You are right. I see.
What a weird and obsolete microcontroller
... I have made the design reliable (it seems) with a 49R resistor in the CLK line. ....Well done.
.... a Pi filter for cables between boards. ...Your frequency is 5 MHz. Up to 10 MHz you only need to worry about ringing on the CLK line, if it concerns the reliability of your device and there are no requirements for interference from your device.
I have made the design reliable (it seems) with a 49R resistor in the CLK line.
Your frequency is 5 MHz. Up to 10 MHz you only need to worry about ringing on the CLK line
Possibky only by luck. ...I guess when you do something, it's just luck that helps you.
.... According to the AD forum post i linked above ....It's called a "relay race", you asked on one forum, dragged it here, someone will drag it to a third... It's a common thing.
A correct SPI transfer doesn't need those resistors nor any other termination.
That was an official contribution from an AD employee, labeled "ADApproved". Don't try to confuse people. You aren't the one who knows better..... According to the AD forum post i linked above ....It's called a "relay race", you asked on one forum, dragged it here, someone will drag it to a third... It's a common thing.
... Don't try to confuse people. ...If anyone is confusing people, it's you and your company. If you hadn't posted your nonsense about the configuration, the author would have solved everything in 1 day.
Just try the three other configurations.
... while everybody else deals with SPI clocking issues by choosing the correct clocking configuration, ...Based on the symptoms described by the author, even a monkey can understand what is going on.
Guys, I'm sorry if you are upset with me, it's not what I wanted.
.... So I added the 49R9 to the clk line as a quick test as it had been suggested that was the most important trace. Yes, I should add them to all, but it's particularly fiddly to do. ....If you have a requirement for interference from your device, then you will have to install resistors on all lines. If you are only concerned about reliability, then installing additional resistors will not affect anything. The fact is that ringing occurs only on the signal fronts, it will have time to fade before the time of strobing.
.... At 5MHz do I not need any filtering either side of the FFC cable?If you install resistors on all lines, then no filters are needed. Filtering is needed again because of interference. For reliability, you only need one resistor, which you have already installed.
Guys, I'm sorry if you are upset with me, it's not what I wanted.
I have used a logic analyser to confirm that the timing is correct as per the detailed timing diagrams from the data sheets that I'd missed.
I had a look around with the scope today and there was a lot of ringing. So I added the 49R9 to the clk line as a quick test as it had been suggested that was the most important trace. Yes, I should add them to all, but it's particularly fiddly to do. I'll look at it tomorrow.
At 5MHz do I not need any filtering either side of the FFC cable?
If you have a requirement for interference from your device, then you will have to install resistors on all lines. If you are only concerned about reliability, then installing additional resistors will not affect anything. The fact is that ringing occurs only on the signal fronts, it will have time to fade before the time of strobing.
... That would be easier to verify if you posted a screen capture or photograph of the logic analyzer screen. ...Northy, take a screenshot of the ringing; if you screenshot something that is already clear, then no improvement will occur in heads.
... That would be easier to verify if you posted a screen capture or photograph of the logic analyzer screen. ...Northy, take a screenshot of the ringing; if you screenshot something that is already clear, then no improvement will occur in heads.
Well, quite obviously the best idea is a scope capture of both SCK and MOSI. It will show both signal integrity issues such as ringing, and clock relationship to data in a single capture.Yes, I already asked about it. Because my picture, posted earlier, is not very informative. And a real screenshot would be useful. And useful, as we see, for many people.
OP busy making the clock signal ring like mad.
OP busy making the clock signal ring like mad.He doesn't want to say that he used a series resistor to see the ringing, so as not to offend you.
Oh yes, you can probe the signal and then probe the ground plane next to the signal and take the difference.....I already understood from your previous statements that it turns out that some people might have such a thought.
... We have a GHz scope and i have done work at 50 psec time scales. .....
If you give a monkey glasses, it will put them on its butt.
Inserting resistors into on-board SPI signals is unnecessary and may in fact result in a transmission sensitive to crosstalk and EMI.
... Adding inductor in series as suggested by our dear Postal2 is a colossally bad idea, I think, though. ...The inductor would dampen the resonance without reducing the amplitude. But it doesn't make much difference, a resistor would work too, if that's what you're used to. I would put a resistor too, if it were 50 cm closer on the table.
Oh yes, you can probe the signal and then probe the ground plane next to the signal and take the difference of the two traces to remove the contribution of your ground lead antenna.
This kind of probe work is possible (ground checking), but only if you synchronize the oscilloscope with the signal you are searching for.Oh yes, you can probe the signal and then probe the ground plane next to the signal and take the difference of the two traces to remove the contribution of your ground lead antenna.
I know you realize this is not the best approach but for anyone else reading: this is a method of last resort, ....
..... or are too lazy to use it, .....Definitely.
... I do measurements all the time with a typical 6" alligator clip ground lead. But I just know how to recognize probe ringing and ignore it when that's not what I am looking for. And when I care about that sort of thing I do install the low indictance ground pin.I completely agree.
... Adding inductor in series as suggested by our dear Postal2 is a colossally bad idea, I think, though. ...The inductor would dampen the resonance without reducing the amplitude. But it doesn't make much difference, a resistor would work too, if that's what you're used to. I would put a resistor too, if it were 50 cm closer on the table.
I don't understand why I have to explain obvious things.... Adding inductor in series as suggested by our dear Postal2 is a colossally bad idea, I think, though. ...The inductor would dampen the resonance without reducing the amplitude. But it doesn't make much difference, a resistor would work too, if that's what you're used to. I would put a resistor too, if it were 50 cm closer on the table.
Please nobody else listen to this, this is terrible advice.
Inductors don't dampen resonances except by accident: they *store* energy and are more likely to make your problem worse rather than better. They do push the resonant frequency down, which might or might not help, but saying it is damping is completely wrong.
Please nobody else listen to this, this is terrible advice.
Inductors don't dampen resonances except by accident: they *store* energy and are more likely to make your problem worse rather than better. They do push the resonant frequency down, which might or might not help, but saying it is damping is completely wrong.
QuotePlease nobody else listen to this, this is terrible advice.
Inductors don't dampen resonances except by accident: they *store* energy and are more likely to make your problem worse rather than better. They do push the resonant frequency down, which might or might not help, but saying it is damping is completely wrong.
Agree 100%. Postal2's postings have been previously discussed in various threads...
QuoteYour frequency is 5 MHz. Up to 10 MHz you only need to worry about ringing on the CLK line
Nonsense; ringing is related to the edge properties, not the clock frequency.
... At 5MHz do I not need any filtering ....
.... The fact is that ringing occurs only on the signal fronts, it will have time to fade before the time of strobing. ...
If you see ringing on a prove and have lost the ground pin attachment for your probe or are too lazy to use it, this is what you should do: take a measurement with the ground clip attached. Then, fold it up as close to the prove body as you can get, aiming for a 5:1 reduction in loop area. If the ringing you observe changes significantly, then basically don't trust your measurement until you get a low indictance ground pin.
I do measurements all the time with a typical 6" alligator clip ground lead. But I just know how to recognize probe ringing and ignore it when that's not what I am looking for. And when I care about that sort of thing I do install the low indictance ground pin.
Inductors don't dampen resonances
.... or by choosing a lossy inductor (lossy core material). Ferrite beads ....You are right, I have a lot of different ferrite, sometimes ferrite works wonders. But in this described effect ferrite is absent:
... If I replace the 50mm FFC cable with a 120mm FFC cable, the screen becomes more reliable (as in there's less corruption). .....
.... A 450 ohm series resistor at the probing point, ....Yes, that's right.
....The dumps show how ringing ....I2C just doesn't reach the speeds where ringing becomes a problem.
Maybe you missed it, but above it has already been explained that ringing does not depend on clock frequency but on rise and fall times. ....Okay, okay, you scared me, from now on I will use the most sophisticated means of suppressing ringing on the I2C bus.
I2C just doesn't reach the speeds where ringing becomes a problem.
STM32 IO pins use the exact same switching MOSFET structures in I2C and SPI modes, ....What can you suggest to eliminate this terrible interference on the I2C bus?