Thorsten
Joined: 08 Oct 2012 Posts: 1
|
PIC24HJ128Gp504 SPI DMA Problem |
Posted: Mon Oct 08, 2012 8:02 am |
|
|
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 |
|