On 16/07/14 17:08, geetha wrote: > I am new to Beaglebone & not too familiar with Linux. > > My application requires data to be acquired from a device on SPI & > transmit it on LAN. > > I am using the preloaded Angstrom OS. > > I have setup the environment for development by precisely following > > http://jkuhlm.bplaced.net/hellobone/ > > With this platform, I am able to develop application for LAN transmission. > > For SPI interface I have followed > > http://elinux.org/BeagleBone_Black_Enable_SPIDEV > > I have to use SPI0. I am able to reach properly upto the step of > compiling & running the spidev_test code. Following are my questions > > 1. Does the preloaded Angstrom has SPI device built in the > kernel or should the kernel be rebuilt by including the spidev.c?
Yes, SPI is included in the Angstrom kernel. > 2. Will the gcc libraries compile the SPIdev_test code? I > am getting ‘undefined error for SPI_TX_QUAD’ and many more which I > am finding defined in spi.h which is not in gcc include. Can I > simply copy spi.h file into the include directory and compile? Where did you get spidev.c from? You must use the same source as the kernel; if you use a newer source it may not compile with the older version of the kernel you are using. > 3. With reference to the below segment in the .dts file, > sclk is mentioned as input. However, I would like BBB to be master > to generate clock for the external device. In such case, should the > change the value to 0x10? No, this a "quirk" with the spi driver, the clock is set as INPUT but it will also OUTPUT on the pin. > > 4. fragment@0 { > > 5. target = <&am33xx_pinmux>; > > 6. __overlay__ { > > 7. spi0_pins_s0: spi0_pins_s0 { > > 8. pinctrl-single,pins = < > > 9. 0x150 0x30 /* spi0_sclk, INPUT_PULLUP | MODE0 */ > > 10. 0x154 0x30 /* spi0_d0, INPUT_PULLUP | MODE0 */ > > 11. 0x158 0x10 /* spi0_d1, OUTPUT_PULLUP | MODE0 */ > > 12. 0x15c 0x10 /* spi0_cs0, OUTPUT_PULLUP | MODE0 */ > > 13. >; > > 14. }; > > 15. }; > > 16. }; > > 4. The pin mapping file shows that the SPI pins are mapped to 84,….. > How to verify that it has been correctly mapped to the processor pin number. This data can be found in the am335x TRM; you have to find the pinctrl register in the TRM and then match the offset 0x150 to the table and double check that it is SPI. > > Request help for these trivial questions. > > Thanks > -- Jack Mitchell (j...@embed.me.uk) Embedded Systems Engineer Cambridgeshire, UK http://www.embed.me.uk -- -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.