Cannot write to SSC PDC registers! (SOLVED)

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

fmandarino
Location: Toronto, Canada
Posts: 5
Joined: Thu Mar 17, 2005 1:30 pm

Cannot write to SSC PDC registers! (SOLVED)

Wed Apr 19, 2006 9:42 pm

Hi,

I am working on an I2S audio driver for Linux 2.6.16.1 running on a KwikByte KB9202 board attached to a WM8731_EV2 board.

I have followed the Atmel SSC to I2S Application Note to set up the SSC, and have allocated DMA memory using dma_alloc_coherent() to obtain physical memory addresses for the PDC pointers.

For some reason, I am finding that I am completely unable to write to the PDC pointer (e.g., RPR) or counter registers (e.g., RCR). They are set to 0 when the SSC is reset, and do not change at all when I write non-zero values to them.

I can write to the SSC registers just fine. I can also set the TXTEN and RXTEN bits in the PTCR, and the same bits get set in the PTSR. But I cannot change the values in the pointer or counter registers.

If I enable the ENDRX, ENDTX, RXBUFF and TXBUFE interrupts, the interrupt fires immediately as there are zero values in the counters.

I have other devices (USART and SPI) using a PDC running on this board, and there is no problem writing to their pointer and counter registers.

I looked at all PDC coding examples that I can find and I can't see what I am missing.

Has anyone seen this before? Or can anyone think of a reason why this is happening?

Thanks,
Frank
Last edited by fmandarino on Thu Apr 20, 2006 4:43 pm, edited 1 time in total.
Frank Mandarino
Endrelia Technologies Inc.
Toronto, Canada
fmandarino
Location: Toronto, Canada
Posts: 5
Joined: Thu Mar 17, 2005 1:30 pm

SOLVED

Thu Apr 20, 2006 4:43 pm

Oooops. My fault. I wasn't setting the SSC1 peripheral clock properly. I was writing peripheral ID to PMC_PCER instead of (1 << peripheral ID).

../fam
Frank Mandarino
Endrelia Technologies Inc.
Toronto, Canada

Return to “LINUX”

Who is online

Users browsing this forum: Google [Bot] and 2 guests