Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: SPI driver not working: Polling Method
PostPosted: Thu Dec 16, 2010 5:23 pm 
Offline

Joined: Mon Jun 16, 2008 12:50 pm
Posts: 9
Dear Friends,

I have AT91SAM9M10G45-EKES Kit and using kernel version 2.6.30. I am trying to build polling based SPI driver that communicates with the Dataflash provided with the kit.

Please find the attached code with the post http://pastebin.com/qK4yXGYm . I am not able to get the Clock signal on the oscilloscope when I load the own build driver. I also tried putting the debug statments on the atmel_spi.c driver with the source and found the values of CSR0 and MR registers. I used those values on my driver based on polling.

Can anyone pointout the missing link into the driver? Any suggestions are warmly welcome?

Have a Good Day,
Thank you,
Ankur.

OUTPUT:
---------------------------------------------------------------------------------------------------------------------
root@at91sam9m10g45ek:~# insmod inter_spi.ko
PMC_PCSR 43f0003c
The SPI is running at Clk_get_rate = 133333333!
SPI Clock Enabled !!..
PMC_PCSR 43f0403c
Value of SPI_MR 0x0 SPI_SR 0xf0 SPI_CSR0 0x0
Value of SPI_MR 0xe0011 SPI_SR 0xf0 SPI_CSR0 0x0
Chip Select goes Low !!
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902
SPI Enabled
Entering While
Read value1: e0000
Read value2: e0000
Read value3: e0000
Read value4: e0000
Read value5: e0000
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902
Read value1: e0000
Read value2: e0000
Read value3: e0000
Read value4: e0000
Read value5: e0000
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: