0

I'm trying to simulate a certain µController to characterize and measure a certain chip.

I need to write my data on the negative edge of the master clock and read the data coming from the slave in the positive edge of the master clock. Is there any way I can have this kind of freedom in my code? Or do I have to do it manually without using the predefined SPI interface?

Also, I would like to have my master clock running continuously without going idle… is there a way to do that too?

migrated from stackoverflow.com May 19 '15 at 19:14

This question came from our site for professional and enthusiast programmers.

1

To set the spi to shift out on falling edge and shifting in on rising edge of the clock you need to set the spi mode to 0 or 2 (depends on idle clock polarity).

More info here

To continuously generate clock signal as far as I remember you will need to write to the SPI dummy values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy