SPI Pin Rise Time Problem MK60DN512VMD10

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI Pin Rise Time Problem MK60DN512VMD10

Jump to solution
813 Views
sryan
Contributor III

I'm using the TWRk60d100m development board and trying to use the SPI to talk to an external memory chip. I looked at the signal on the logic analyzer and it looked like I was sending the correct waveform to the external memory chip but I was getting an incorrect result out. I tried using an Arduino to send the same waveform and got the correct result out of the external memory. I checked both waveforms on the oscilloscope and the only difference I can find is that the rise time for the clock and MOSI (not sure if the MOSI rise time matters) seemed high coming out of the TWRk60d100m dev board. The rise time for the clock was 11ns and the rise time for MOSI was 13.5ns on the TWRk60d100m. On the Arduino the clock had a rise time of 5.9ns and the MOSI had a rise time of 7.0ns. According to the datasheet for the external memory I am using, the maximum rise time for inputs is 9ns, which the TWRk60d100m (which is not communicating correctly with external memory) exceeds and the Arduino (DOES communicate correctly with external memory) does not exceed. Other than that the waveforms of the TWRk60d100m and the Arduino look almost identical as far as I can tell.

I configured the SPI on the TWRk60d100m using processor expert and I have attached a screenshot of how it is configured. PEScreenshot.jpg

My question is whether the rise time is out of my control or if there may be some internal pullup/pulldown resistor that may be affecting the rise time and that I can disable.

I also included screenshots of the waveforms from the TWRk60d100m and the Arduino on the logic analyzer:

Arduino:

ArduinoWaveformScreenshot.jpg

TWRk60d100m:

MK60dn512VMD10WaveformScreenshot.jpg

Tags (2)
0 Kudos
1 Solution
366 Views
sryan
Contributor III

Ok, solved the problem.Processor Expert set the drive strength of the clock pin to low, so now I manually change the PORTD_PCR12 (my clock pin) register so that the drive strength is high before using the SPI. This brought the rise time down to 2.8ns and it is now communicating with the external memory.

View solution in original post

0 Kudos
1 Reply
367 Views
sryan
Contributor III

Ok, solved the problem.Processor Expert set the drive strength of the clock pin to low, so now I manually change the PORTD_PCR12 (my clock pin) register so that the drive strength is high before using the SPI. This brought the rise time down to 2.8ns and it is now communicating with the external memory.

0 Kudos