SPI Final Word!

Started by Henk Visser in AT91SAM ARM12 years ago 4 replies

This is just a little follow-up for those looking to get SPI working on their project. 1.) Program the PIO controllers to assign the SPI...

This is just a little follow-up for those looking to get SPI working on their project. 1.) Program the PIO controllers to assign the SPI pins to their peripheral functions. 2.) Configure the PMC to enable the SPI clock. 3.) If using interrupts program the AIC before configuring the SPI. Make sure that the SPI_PCS field of the SPI


SPI PDC Transfers

Started by Leighton Rowe in AT91SAM ARM12 years ago 3 replies

I plan to implement SPI DMA Transfers using the AT91SAM7S256 eval board with an SPI Device, and I'd like some clarification on how the SPI_PDC...

I plan to implement SPI DMA Transfers using the AT91SAM7S256 eval board with an SPI Device, and I'd like some clarification on how the SPI_PDC pointers access the data while the PDC's enabled. > From the SPI section in the AT91SAM7S256 user manual (latest), I notice that both SPI Transmit & Receive registers have 16-bit data fields (TD & RD), yet the SPI communicates data 8-bits at a tim


Re: SPI Interrupts - some interesting behaviour...

Started by kara...@onlinefavbar.com in AT91SAM ARM10 years ago

Hello, did you solved this issue? I also configured SPI in slave mode, but cannot trigger any SW interrupt using *AT91C_AIC_ISCR = (0x1 < <...

Hello, did you solved this issue? I also configured SPI in slave mode, but cannot trigger any SW interrupt using *AT91C_AIC_ISCR = (0x1 < < AT91C_ID_SPI); I initialized the SPI slave device so: /* Get clock */ *AT91C_PMC_PCER = (1 < < AT91C_ID_PIOA) | /* Need PIO too */ (1 < < AT91C_ID_SPI); /* SPI clock domain */ // setup PIO pins for SPI bus *AT91C_PIOA_ASR = AT


SPI help

Started by at91sam7s in AT91SAM ARM13 years ago 2 replies

I want to communicate with a SPI serial flash. I've seen enough code to initialize the SPI port. However, I can't find any sample code that...

I want to communicate with a SPI serial flash. I've seen enough code to initialize the SPI port. However, I can't find any sample code that will show me how to tx and rx bytes in page mode. In the AT91_CDROM, I see a file called : AT91M55800A-BasicSPI-GHS3_6-2_0.zip Can I re-use some of the code for the SAM7S64? Are the SPI registers the


SPI and CSAAT=0

Started by saiberion in AT91SAM ARM10 years ago 6 replies

Hi, I have a problem concerning the SPI chip select. The spi is connected to a pld. Due to the logic inside the pld there is a problem after...

Hi, I have a problem concerning the SPI chip select. The spi is connected to a pld. Due to the logic inside the pld there is a problem after access on spi devices with addresses the need PCS3 to be active. After a spi access when all CS lines are to be risen it occurs that a shift register connected to a address that only differs in PCS3 bit does a shift because SCK is still high whi...


AT91SAM9G20 - user space SPI driver for ADC128S052

Started by razvan_ionut_stoian in AT91SAM ARM7 years ago

Hi! I am a newbie to AT91 and learning to drive an SPI capable ADC using SPI. Although I managed to setup the interface on the board (all...

Hi! I am a newbie to AT91 and learning to drive an SPI capable ADC using SPI. Although I managed to setup the interface on the board (all waveforms look fine on the scope), the "READ Data" register of the SPI sends garbage. Here's a snippet of the code I wrote: while(1){ usleep(10000); for(i=0;i


AT91SAM7S-EK (AT91SAM7S256) SPI Problems

Started by basi...@hotmail.com in AT91SAM ARM7 years ago 3 replies

Hi there, I have no experience with SPI so I am coming across problems. I have looked at other example codes and the general initialisation...

Hi there, I have no experience with SPI so I am coming across problems. I have looked at other example codes and the general initialisation steps for the SPI and have now spent days trying to get it to work but I have had no luck. Basically I have the AT91SAM7S-EK development board and I have put on a FM25CL64 NVRAM chip which I want to communicate to the board via SPI. Below is my Initiali...


AT91SAM7A3 weird behavior of SPI peripheral

Started by Cho in AT91SAM ARM10 years ago 3 replies

Recently I have been working on SPI interface on AT91SAM7A3, and I found out an weird behavior. Although I already have the workaround but I...

Recently I have been working on SPI interface on AT91SAM7A3, and I found out an weird behavior. Although I already have the workaround but I just want to share this with people who had worked on SPI on any AT91SAM processor, and see if there is a better solution. Before I explain the situation, I would like to explain my configuration. I configure the SPI so the chip select (CS) does not ...


Re: SPI Port DMA

Started by marcradzikowski in AT91SAM ARM9 years ago 4 replies

Gentlemen, I'm currently using an AT91SAM7S microprocessor to read a 1000-sample vector from an SAR A/D converter via a SPI port. The...

Gentlemen, I'm currently using an AT91SAM7S microprocessor to read a 1000-sample vector from an SAR A/D converter via a SPI port. The samples are taken every 16.6us, which amount to a total time of 16.6ms. It seems best to use the SPI port DMA feature to move the SPI data into the internal SRAM. What is most important though is that the micro is able to maintain a fixed sample ...


max speed of SPI is 30 or 55 Mb/s?

Started by naderus2000 in AT91SAM ARM11 years ago 2 replies

i read in the spi tutorial from at91.com that the max speed of spi is 55Mb/s but in the datasheet write that the max clock speed on IO pin in...

i read in the spi tutorial from at91.com that the max speed of spi is 55Mb/s but in the datasheet write that the max clock speed on IO pin in 30 mhz.so i want to what is the max speed of SPI in master mode?


spi0 damaged

Started by cocxy2006 in AT91SAM ARM11 years ago 4 replies

is there anybody who had experience with a possibly, damaged spi interface? I tried to etablish a connection between an ad-converter and...

is there anybody who had experience with a possibly, damaged spi interface? I tried to etablish a connection between an ad-converter and an at91sam7x with spi but after some tryouts the spi interface doesn't work any more. in my programm I had a loop to get all data of the adc. in this loop i had to enable and disable the spi interface to get data synchrone to a external clock. but...


SPI startup help wanted

Started by embedded_osde in AT91SAM ARM12 years ago 1 reply

Hi, actual I'm working on AT91SAM7Sxx using USB with the classes RNDIS / CDC-Ethernet .. and MassStorage. Now I will create a MassStorage- ...

Hi, actual I'm working on AT91SAM7Sxx using USB with the classes RNDIS / CDC-Ethernet .. and MassStorage. Now I will create a MassStorage- Bridge to MMC/SD-cards connected via SPI. I have to port my fine working SPI-port on ATMega128 to AT91SAM7S.. Can anyone give me help for startup the SPI-interface on AT91SAM7S ?


AT 91SAM7SE512 SPI chip select stuck low

Started by tranglan81 in AT91SAM ARM10 years ago 5 replies

Hi, In the AT91_SPI_ CSR[0] Reg. I set(AT91C_SPI_CSAAT & (0x0 < < 3)). I'm expecting the chip select active after tranferred, but don't see...

Hi, In the AT91_SPI_ CSR[0] Reg. I set(AT91C_SPI_CSAAT & (0x0 < < 3)). I'm expecting the chip select active after tranferred, but don't see it going high at all. Below is my setup for the SPI to interface with an external UART SC16I752. Excepting for the SPI Cs when it went low and stuck low, the other spi signals work fine. Any advise provided would be helpful. AT91PS_SPI pSPI = AT91C_


SPI

Started by pacific_beach_dude in AT91SAM ARM12 years ago

I have been trying to use SPI code for the AT91RM9200DK to work on my AT91SAM7S64. What am I a missing here? When I look at the SPI clock ...

I have been trying to use SPI code for the AT91RM9200DK to work on my AT91SAM7S64. What am I a missing here? When I look at the SPI clock line it is always low and the data line (MOSI) is always high. I don't see any data being set out! Thanks for any tips. -Henk ---- AT91F_SPI_CfgPIO(); AT91F_SPI_CfgPMC(); AT91F_SPI_


AT91SAM9 SPI slave mode sample code?

Started by Dan Lyke in AT91SAM ARM9 years ago 5 replies

I'm trying to use the AT91SAM9XE in SPI slave mode. Looking through the source to the Atmel supplied SPI code for the AT91SAM7S256 I'm...

I'm trying to use the AT91SAM9XE in SPI slave mode. Looking through the source to the Atmel supplied SPI code for the AT91SAM7S256 I'm having trouble figuring out how to convert some of the functions. Anyone got a suggestion for SAM9 SPI slave mode sample code? Thanks. Dan ------------------------------------


AT91SAM7X SPI RDRF Strangeness

Started by Chris DeLise in AT91SAM ARM10 years ago

I've seen notes elsewhere on this forum about RDRF behavior on the '7X, but none exactly describe what I'm seeing. I'm doing non-interrupt SPI...

I've seen notes elsewhere on this forum about RDRF behavior on the '7X, but none exactly describe what I'm seeing. I'm doing non-interrupt SPI I/O in an ISR that is invoked to respond to a hardware condition. The AT91 is the SPI Master and I need to exchange three words quickly with a CPLD. That's been working for a while, but one in a while the read data was wrong. The odd part is the code was...


SPI Interrupts - some interesting behaviour...

Started by Phil in AT91SAM ARM11 years ago

Hi All, I am using the AT91SAM7S with IAR EWB. There seems to be some issues with the clearing of interrupts when using the SPI peripheral in...

Hi All, I am using the AT91SAM7S with IAR EWB. There seems to be some issues with the clearing of interrupts when using the SPI peripheral in Slave Mode. Using the other peripherals like UART and Timer/Counters the interrupts work as expected. However when Enabling the interrupts for the SPI (I am trying to catch RDRF and NSSR), I only ever get one call to the ISR and that is all. ...


SPI + DMA possible BUG

Started by Foltos in AT91SAM ARM12 years ago

Hi all, I just detected the following strange problem of the DMA controller. If trying to send and receive at the same time, and the data is...

Hi all, I just detected the following strange problem of the DMA controller. If trying to send and receive at the same time, and the data is sent from FLASH, then the PDC module gets confused. (Number of received bytes is wrong.) My program tries to read 512 bytes over the SPI using the PDC to get the bytes from the SPI module, and to send 512 0xff bytes to generate SPI clock. Since t


SPI/LED Question

Started by Thomas Gal in AT91SAM ARM12 years ago 25 replies

I'll happily follow up this post with code etc. if necessary but I'm hoping it ends up being something really simple. I'm working with an ...

I'll happily follow up this post with code etc. if necessary but I'm hoping it ends up being something really simple. I'm working with an LED display connected via the SPI intercae on the ship. Auxilliary to the SPI is another pin which controls Data/Command mode as is common on these things. Now I have no problem issuing commands, and the data goes down the


SPI1 [two channels?]

Started by ffre...@yahoo.com in AT91SAM ARM11 years ago 1 reply

I need to use two SPI channels simultaneously. The AT91SAM7 data sheet stat= es that the device has two SPI interfaces, SPI0 and SPI1. However,...

I need to use two SPI channels simultaneously. The AT91SAM7 data sheet stat= es that the device has two SPI interfaces, SPI0 and SPI1. However, there is= , for instance, only one SPI_CS. Can somebody please explain if it is possi= ble at all to use two devices at the sime time, one will be interrupt initi= ated, (although I\'m not using any SPI interrupts) and running in the backg= round. Th...