CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC24HJ128Gp504 SPI DMA Problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Thorsten



Joined: 08 Oct 2012
Posts: 1

View user's profile Send private message

PIC24HJ128Gp504 SPI DMA Problem
PostPosted: Mon Oct 08, 2012 8:02 am     Reply with quote

Hi @ all,

I am trying the first time the DMA Controller in the PIC24. I just want to transmit one Array of Data out to the SPI2 Hardware.

This "Code" I use:
Code:
setup_dma(0, DMA_OUT_SPI2,    DMA_byte );
dma_start(0, DMA_CONTINOUS, &pixel5[0] );


My array look so:
Code:
#BANK_DMA
unsigned int8 pixel5[550] = {};

So what I get out from that:

If I didn't do a normal "spi_write2" in the Main loop, I didn't get anything out from SPI. But if I send i.e. spi_write2(0x01); then the DMA send out 2 additional bytes. But why not 550 like the Arraysize ? I checked already the Listing, and it seems there is everything ok. Did I have to activate some Interrupts for the SPI? I hope someone could help.

Best Regards

Thorsten
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group