Using ARM Microcontroller SSC

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

Hello

 

I am trying to use the SSC for an application which acquires data from a serial data stream when a FRAME SYNC DATA Pattern occurs whithin the data stream. For this purpose I selected the COMPARE 0 Start Mode.

Since I am new to the ARM3 Microcontroller, can any one post a simple sketch which works  for the SSC using serial data on RD, Clock on RK and retreiving Data continuously from RHR when FRAME SYNC DATA is detected?

 

Thanks for any help.

Last Edited: Sun. Aug 27, 2017 - 10:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Read the datasheet/documentation. What have you tried? Have you looked at the SSC Unit Tests example? or if you're using a SAM3 then their SSC examples?

With that in mind, for your application:

// SSC_RCMR:
// CKS = MCK
// CKO = NONE
// CKI = 0
// CKG = NONE
// START = CONTINUOUS (data transfers start as soon as you call ssc_enable_rx(SSC))
// STOP = 1 (After starting a receive with Compare 0, receiver operates in continuous mode until Compare 1 detected)
// STDDLY = 1 (This will depend on your RX Sync Data line)
// PERIOD = (DATLEN - 1) [for example, 32 bit size = period of 31]

// SSC_RFMR:
// DATLEN = (DATLEN - 1)
// LOOP = 0
// MSBF = 1
// DATNB = 0 (DATNB = number of data words to be received after each transfer start)
// FSLEN = length of sampled data compared to Compare 0 or Compare 1 register
// FSOS = NONE
// FSDEN = 0
// FSEDGE = POSITIVE
// FSLEN_EXT = (FSLEN + (FSLEN_EXT * 16) + 1) [if DATNB = 32, FSLEN = 15, FSLEN_EXT = 1]