Adjust SPI Frequency in IMX7D

Dear Jaski.
Thanks for the reply.
If the toradex driver is taking care of data transaction?

When 8 led connected to shift register and send data from 0 to 255 …before sending spi data all led is blinking at once for each data …after that correct value is set .

The led blinking is not happening when i tried using GPIOpin 13 and Linux pin Number139 pin as my CS Signal.

Yeah, the SPI driver is taking care of data transaction with the clock speed and data you set.

What is GPIO PIN 13? The liux pin number 139 corresponds to GPIO5_IO11 as described here.

Did you measure the CS output with an oscilloscope?

chip select handle by spi driver or handle by spi program…?

usually chip select is handled by spi driver. However the user can also use a gpio and do the handling of chip select himself in the spi program.

send me uart code example…for imx7d …?

ok thank you …

is your issue solved?

Ask a new question, please?

send me any link… how to use uart in imx7d…?

send me any link …how to use uart in imx7d

Dear Jaski,

I have viewed results of spi in LOGIC Analyzer,

by connecting SPI pins from Colibri IMX7D in IRIS and VIOLA BOARD. link text

The SPI driver you’ve mentioned is not taking care of data that is being sent.

The DATA starts before CS has reached low state and Clock seems to start a bit late.

Kindly help.
Thanks and Regards.

hi @narayanamohan,
Thanks for your images. The Spi Driver is working perfectly. It is not important, what the data line does, when there is no clock. First chip select has to go down, which means that the Spi Slave is listening. Then the sent data is sampled exactly at rising/falling edge (depends on your settings) of the Spi Clock.

Since you have a logic analyzer, you can also check in the logic analyzer, if the data is sent correctly. If not, then there is wrong setting somewhere.

By the way, in the image you sent, 16 bits are sent at one time, which is wrong for you usage. You need to send 8bits per Chip select line cycle.

imx7d is 16 bit processor …so what is the problem when sending 16 bit data at one time …?

actually imx7 is a 32bit processor, but that is not an issue.

The issue is that for your application serial to parallel converter, you need to send 8 bits and then do a chip select toggling to shift the register’s data to the outputs as it can be seen on the page the 12 of the datasheet of the SN74HC595. If you don’t do that then half of your data will be just lost and not used by serial to parallel converter.