Home/Support/Support Forum/Use and configuration of SPI in IMX53 and IMX6
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Use and configuration of SPI in IMX53 and IMX6

0 votes
Hello, I am using the imx53 board and connectore6 too. I need to use SPI, I have been following the spidev_test example and works fine. Now I want to build my own app, I need to know how do you do the configuration for SPI. In the example I could see some configurations like bits per word, max speed, delay and so on. But I want to know how do the configuration of others registers, to slave mode and others.
I need to configured the spi as slave mode.
Thanks
asked Feb 8, 2017 in Linux by emmanuel_perea New to the Community (38 points)

Please log in or register to answer this question.

2 Answers

0 votes
You'd have to look in respective Hardware manuals of i.mx53 and i.mx6 to find out exactly what resisters to set for slave mode. There is no slave mode driver , because it is very device specific, you'd have to write your own driver that would make i.mx processor look like an SPI slave simulationg an EEPROM for example.
answered Feb 9, 2017 by LeonidM Veteran of the Digi Community (3,863 points)
Hi leonid, is in te hardware a resistor to change for slave mode? I have been reading but I didn't find nothing about that.
I have been reading in forums about make a patch to configure the imx6 in slave mode. I found a patch that modifies the spi-imx driver but I dont know if work.
Don't you have more information about that or tell me which regsters changes for slave mode?
0 votes
i have a related question, i want to use de cc 6ul like master and another device (accelerometer) like slave, but i don't understand how to do it. If you solve your answer, could you please share your info? it would be helpful
answered Feb 10, 2017 by g3ntl3m4n New to the Community (3 points)
In the connectcore6 the yocto layer only has spi master support, if I want to change it to slave mode I have to do my own driver. I don't know what yo want to do exactly. Is an external accelerometer?
Hi Emmanuel, yes it is an external accelerometer, i just want to acquire data from it so i can process it with the connectcore6. The configuration that i want to achieve is simpler the connectore as master and the sensor as slave, i don't have any spi in my dev folder, do you know if it's necessary to enable the spi generic driver before bitbake the image?
Best regards.
Yes here https://www.digi.com/resources/documentation/digidocs/90001945-13/#reference/bsp/r_serial_peripheral_interface.htm%3FTocPath%3DDigi%2520Embedded%2520Yocto%7CSystem%2520development%7CLinux%2520v3.14%2520Board%2520Support%2520Package%7CDevices%2520and%2520interfaces%7C_____18 you can read the kernel configuration. In my case, for default the spi is enabled, and the driver is called spidev0.0, you maybe have the same, in /dev search spidevx.x with some numbers in x.x
Sorry, the driver is called spi.c the spidev0.0 is the node in linux
...