ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Having trouble to run 'spidev_test' on Phytec 3250 board.


From: Quentin YANG
Subject: Re: [Ltib] Having trouble to run 'spidev_test' on Phytec 3250 board.
Date: Mon, 23 Aug 2010 08:45:32 +1000

Thanks. Mike.
My eeprom device is under the path below.
address@hidden /]# head /sys/devices/dev:ssp0/spi0.0/eeprom
I did see communication signals on the SPI bus from the scope when running '#head /sys/devices/dev:ssp0/spi0.0/eeprom'.

After disabling the 'CLK' for touch screen and commented off some 'touch screen' relevant control codes.
Both dev:ssp0 and dev:ssp1 are working on my Phytec 3250 board.

This post is closed now. Thanks for all your replies.


Regards,
Quentin



On Fri, Aug 20, 2010 at 10:26 AM, Mike Nelson <address@hidden> wrote:
Greetings:

Testing SPI on the Phytec LPC3250 board is easy, because there is
already a SPI EEPROM device driver bound to the SPI bus.

1. From the command line, create a text file with some arbitrary ASCII
text.  Let's call it "ascii.txt"
2. Then at the command line type "head eeprom".  You will see the
first few locations of the SPI EEPROM.  Linux will do the best it can
at interpreting the binary contents of the EEPROM as characters.
3. At the command line type "cat ascii.txt > eeprom".  This will write
the contents of the text file to the EEPROM starting at the first
location in the device.
4. Then type "head eeprom" again, and you should see the contents of
"ascii.txt" in the EEPROM.

Regards:

Mike Nelson, http://michaeltnelson.com
mobile: 1-650-291-7343
office: 1-650-257-7565



On Thu, Aug 19, 2010 at 16:47, Quentin YANG <address@hidden> wrote:
> Hi Jorge,
>
> Good luck.
> Let me know when you have success to get SPI working on your hardware.
> I am doing the same here on Phytec board. : - )
>
> Regards,
> Quentin
>
>
> On Fri, Aug 20, 2010 at 8:58 AM, Jorge A. Castro
> <address@hidden> wrote:
>>
>> Hi Quentin
>>
>> Thanks for the information. I'm now trying to test some drivers in my
>> board (like I2C, SPI and CAN), and this application may help me to find out
>> if SPI is properly working.
>>
>> Thanks again.
>>
>> Regards
>>
>> Jorge Castro
>>
>> On 08/19/2010 04:52 PM, Quentin YANG wrote:
>>
>> Hi Jorge,
>>
>> You can find the 'spidev_test.c' under '
>> X:\lpc3250\ltib-qs\rpm\BUILD\linux-2.6.34\Documentation\spi\'
>> Just copy and compile it in user space. (i.e.,
>> X:\lpc3250\ltib-qs\rootfs\home\user\ )
>>
>> I attached my 'spidev_test'  project.
>> (It's an Eclipse Makefile project.)
>>
>> Regards,
>> Quentin
>>
>>
>>
>> On Fri, Aug 20, 2010 at 1:33 AM, Jorge A. Castro
>> <address@hidden> wrote:
>>>
>>> Hi Quentin,
>>>
>>> I'm using a LPC3250 from Future Design Inc, which is pretty similar than
>>> Phytec 3250. I'm wondering if I can find that spidev_test in order to test
>>> this drive in my board. Do you know where to find it? I was looking in the
>>> LTIB configuration but I didn't found it.
>>>
>>> Thanks,
>>>
>>> Jorge
>>>
>>> On 08/18/2010 07:30 PM, Quentin YANG wrote:
>>>
>>> Hi Kevin,
>>>
>>> I can successfully run 'spidev_test' from user space as shown below.
>>>
>>> address@hidden debug]# ./spidev_test
>>> spi mode: 0
>>> bits per word: 8
>>> max speed: 500000 Hz (500 KHz)
>>> 00 00 00 00 00 00
>>> 00 00 00 00 00 00
>>> 00 00 00 00 00 00
>>> 00 00 00 00 00 00
>>> 00 00 00 00 00 00
>>> 00 00 00 00 00 00
>>> 00 00
>>>
>>> But when I passed on command line option '-O' , I received error message.
>>>
>>> address@hidden debug]# ./spidev_test -O
>>> can't set spi mode: Invalid argument
>>> Aborted
>>>
>>> 'dmesg' shows:
>>> ......
>>> spidev spi1.0: setup: unsupported mode bits 2
>>> ......
>>>
>>> According to source code: driver/spi/spi.c
>>> ............................
>>>     bad_bits = spi->mode & ~spi->master->mode_bits;
>>>     if (bad_bits) {
>>>         dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
>>>             bad_bits);
>>>         return -EINVAL;
>>>     }
>>> ..............................
>>>
>>> It seems has something to do with '~spi->master->mode_bits'.
>>>
>>> Any comments on this error?
>>> What could be the reason?
>>>
>>>
>>> Question Two:
>>> Have you ever tried to run 'spidev_test' on dev:ssp1 on Phytec board?
>>> I could not see any 'SPI CLK signal' on PCM-988/GPIO Expansion Board
>>> Patch Field 43E although I was able to run 'spidev_test'.
>>> I am wondering whether it's hardware related or just firmware's problem?
>>> If you can run 'spidev_test' on your phytec board on dev:ssp1, then I can
>>> rule out the possibility of hardware fault.
>>>
>>> I am waiting for the arrival of our Hardware debugger TRACE32, which is
>>> the last resort.
>>>
>>> Thanks
>>>
>>> Regards,
>>> Quentin
>>>
>>>
>>>
>>> _______________________________________________
>>> LTIB home page: http://ltib.org
>>>
>>> Ltib mailing list
>>> address@hidden
>>> http://lists.nongnu.org/mailman/listinfo/ltib
>>>
>>>
>>> --
>>> Jorge A. Castro
>>> Canam-Technology, Inc.
>>>
>>> _______________________________________________
>>> LTIB home page: http://ltib.org
>>>
>>> Ltib mailing list
>>> address@hidden
>>> http://lists.nongnu.org/mailman/listinfo/ltib
>>>
>>
>>
>>
>> --
>> Jorge A. Castro
>> Canam-Technology, Inc.
>>
>> _______________________________________________
>> LTIB home page: http://ltib.org
>>
>> Ltib mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/ltib
>>
>
>
> _______________________________________________
> LTIB home page: http://ltib.org
>
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]