FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [April 2008 Threads] SPI Driver Help Posted by Allure99 on April 3, 2008 Hi,
I am using using AT91SAM7 (as SPI master)trying to talk to another Micro(MSP430: SPI slave)
Q1, Do i need PDC for this?
Q2, What are the different for the ISR handler using PDC and Non PDC?
Q3: Any one has sample Driver code for this?
Many Thanks!
RE: SPI Driver Help Posted by Çağlar Akyüz on April 3, 2008 Hi,
A1) You don't need to use PDC, but it is easier and more CPU friendly.
A2) The difference is that you don't need ISR for the PDC that much. You will probably want to know end of transfer so you will only handle PDC related ENDTx or ENDRX flag in the ISR for the PDC. For the other case, you will need to handle many more flags in the interrupt handler.
A3) There are some example codes posted to this forum(or to theAT91SAM yahoogroup) If you are asking for a complete freeRTOS driver, then you have to do it yourself. I have never seen any. But mechanism is similar for any driver. For example you can take a serial driver as basis and replace usart related calls with the spi ones.
Regards, Caglar
RE: SPI Driver Help Posted by Allure99 on April 4, 2008 Hi Caglar,
Thanks for your reply. I think i have configure the but not the ISR.
I Refer a sample code From atmel that write/ read external flash through SPID (PDC) and it only service SPI_RXBUFF flag in its SPID handler.
I am a bit confuse which flag to service on ISR.
Do u mind to show me where can i get more detail on how to handle SPI PDC ISR.
Thanks again.
kind regards HS
RE: SPI Driver Help Posted by Çağlar Akyüz on April 4, 2008 Yes that's correct. You can use either RXBUFF or ENDRX. RXBUFF means both of the buffers are completed, ENDRX means only current buffer completed.
Do you have a code without interrupt using dma(pdc) to transfer/receive from sam7x to msp430?
RE: SPI Driver Help Posted by Allure99 on April 4, 2008 Ok I am clearer now.
I am trying the SPI driver with onboard at45 dataflash to help my self understand how SPI work.
Next step will be then to get the SAM7x and MSP430 talking to each others.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|