Transmitting over SSC using PDC at AT91SAM9261

Hello out there...

I'm trying to send a block of data using the Peripheral DMA Controller (PDC) over the SSC-0. As transmitter and receiver of the SSC are independent and the PDC is full duplex capable, sending and receiving at the same time should be possible. But I can't get the PDC transfer going! Word by word transmissions work fine and the TK and TF signals are fine too. Nevertheless, if I activate the PDC I don't see any data running over the TD line.

Can you give me a hint on what is usually the "fault"? Or even an example for the AT91SAM92xx controller?

Thanks in advance akuehn

Reply to
Andreas Kuehn
Loading thread data ...

I have the SSC running with the PDC but am not able to share the code (it was developed specifically for a customer). If you post your initialisation function I might be able to suggest something though.

--
Regards,
Richard.

+ http://www.FreeRTOS.org
13 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.
Reply to
FreeRTOS.org

Here what I did so far. I mean register configuration of the SSC0 to perform a continuous data transfer of 16 long words per PDC call.

/** * Serial Synchronous Controller (SSC) definitions concerning * speed and protocoll. * */ #define SSC_WORD_SIZE 32 // Bit #define SSC_NUMBER_OF_WORDS 16 // WORDS #define SSC_PERIOD 0xff // (Bit x Words)/2 -1 #define SSC_FSLEN (1 -1) // length of frame sync bit #define SSC_DATNB (16 -1) // DATANB +1 #define SSC_DATLEN (32 -1) // Word length

#define RCMR_VAL ((SSC_PERIOD

Reply to
Andreas Kuehn

Hmm. There is nothing obvious. You make more use of the Atmel libraries than I do, so I presume some of the setup I do manually is done within your call to AT91F_SSC_Configure(), for example, setting up the baud rate and clocking modes.

I am also using PortB for outputs, whereas you seem to be using PortA. I presume this is just because of the pin multiplexing within the SAM7.

You are calling SetTx and SetNextTx from the initialisation routine, whereas I only call SetRx and SetNextRx from the initialisation, and call SetTx/SetNextTx when I actually have data to send. Could it be that the data being sent by these calls is completing prior to you configuring the interrupts? I don't think this can be the case unless the PDC is already in an enabled state though as you do not enable it until the end of your function. Just a thought.

--
Regards,
Richard.

+ http://www.FreeRTOS.org
13 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.
Reply to
FreeRTOS.org

Well yes! It's the same with me. I did move the PDC transfer/receive pointer stuff out of the initialization. It is now much clearer but I still have no data signals on my scope. Frame (TF) and Clock (TK) are realy fine and well detectable but no data. Okay. I have to go through the configuration again. Possibly there is something screwed up leaving the output desserted. ;-/

Thank you so far.

Regards akuehn

PS: Does someone else could give a comment?

Reply to
Andreas Kuehn

Double check that you have not inadvertently put the SSC into loopback mode. This would prevent the signals from being actually output. Running out of ideas after that :o(

--
Regards,
Richard.

+ http://www.FreeRTOS.org
13 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.
Reply to
FreeRTOS.org

ies

ate

I

all

he

the

ur

ame

de.

Hey out there...

I'm back from holidays and the problem is still there ;-)

In the meantime I cleared up my code sequence, deleted dublications and gave it something like a structure. The receiver reacts on every transmission frame signal but the sender does not send any data. Btw. SSC does not have a loopback mode. It's the SPI that comes with this feature. Again I went through the Atmel Manual and it is probably the PDC itself that comes with this limitation. On page 233 of the manual one can find the sentence: "The full-duplex peripherals feature eighteen mono-directional channels in pairs (transmit only or receive only)".

I'm not sure if I understand that right but it sounds like, you either transmit or receive using a PDC-channel. But it is possible to have two channels fully configured. Does that make sense to someone?

Cheers akuehn

Reply to
akuehn3

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.