Not familiar with S12XHZ, but SRRS bit description says that "1 Enables slew rate control and disables digital input buffer". So I want to ask if you set SRRS bits for both MISO and MOSI, or just for output pin? SRRS descriptions sounds like what you get and if SRRS is set then you can't read this pin. Also SPI also can't read properly from SPI input pin if SRRS=1?
Good suggestion but the only pin that I am attempting to set slew rate on is the SCLK pin, which is an output. If I don't enable slew rate control on SCLK it works fine, if I do set slew rate control on SCLK it doesn't. Even an MISO pin shorted high will read as zero with SCLK slew rate limited.
Did any of you actually read Quimney's posts? Everything you've suggested he already explained in his original post with the exception of the reduced drive which he addressed later.
Quimney wrote:What I can say is that I think I will pass EMC now that I have reduced the drive on the port pins. I don't need the full drive and the edges are much improved. Reducing the drive seems to have no ill effects on the SPI module so it's time to move on for now.
I'm sorry I can't be of any help Quimney. Hopefully Freescale is aware of your issue and will be able to provide an intelligent response. Best of luck.
Shur
Shur wrote:Did any of you actually read Quimney's posts? Everything you've suggested he already explained in his original post with the exception of the reduced drive which he addressed later.
Taken.
I wonder what is the principal difference between enabled slew rate control and enabled reduced drive. Is enabled slew rate control producing nicier edges? S12XHZ docs seem being silent about this.
Slew rate limits the rise and fall time of the signal with the full drive capability and the spec defines what the rate will be so it should be predicatable...
Reducing the drive can have a similar effect on the rise/fall times but only because less energy is going into changing the signal. The actual shape of the resulting waveform is going to be very dependant on what loads you have on the line. With a very light load the risetime doesn't change much, as the load increases it has more trouble changing state and the risetime is affected more severely.
Reducing the drive seems to do a better job of reducing the overshoot due to the decrease in energy. changing slew rate will change the slope/risetime but the overshoot is often still present.
Bottom line: slew rate will slow the rise time according to the datasheet. Reducing the drive can have a similar same effect but it will be circuit dependant.
Thanks for your explanation. I didn't think full drive and slew rate control is possible in these micros. Also pdf search for "slew rate" failed and I thought there no related word in Electrical Characteristics. It looks like there are 4 possible slew/drive_strength modes, since datasheet specifies defferent slew rates for slew enabled with partial drive and slew enabled with full drive. Good to know.