SAM4S: using end of transmission interrupt

Go To Last Post
2 posts / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all.

I have encountered a problem using interrupt in the SSC module.

In my system I work in this manner:

1. Only the transmitter is enabled

2. I am the slave and I am in continuous mode.

That means, the TK is input and the TD is output.

Every time an outer master device is clocking my TK I have to give the data on the TD pin.

I use these line to enable the interrupt:


	NVIC_SetPriority(SSC_IRQn, 0);
	ssc_enable_interrupt(SSC, SSC_IER_ENDTX);

and the interrupt handler:


void SSC_Handler(void)
	SSC->SSC_THR = ssc_value; //Load new data

HOWEVER the interrupt is firing again and again!

even if the master is not clocking the TK...


And I dont know why...


Any ideas?


Thank you very much for any idea, this is very very important

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did  you get it to work? I have similar problem on the V71. I like the SSC_Handler to fire at sample rate. I took sample code that makes a sine wave and verified that the sine wave at the codec output appears on a scope.

I used the below code to enable the interrupt at what is supposed to be sample rate of 48 kHz. I put a toggle of a GPIO pin at the SSC_Handler(). The handler is toggling the state once every 223ns, which is 4.4MHz.