This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use McBSP to connect ADS1271 on the C6748?

Other Parts Discussed in Thread: ADS1271

Hi!

I wanna to use McBSP on the C6748 to connect  ADS1271. The ADS1271 works at SPI mode. The schematic is  as follows.

The code is as follows:

void McBSPInit(void)
{
configureMcbsp();

HWREG(SOC_MCBSP_0_CTRL_REGS + MCBSP_SPCR) = 0; 

HWREG(SOC_MCBSP_0_CTRL_REGS + MCBSP_PCR) = HWREG(SOC_MCBSP_0_CTRL_REGS + MCBSP_PCR)
| MCBSP_PCR_CLKRM //CLKR is an output pin and is driven by the internal sample-rate generator.
| MCBSP_PCR_CLKRP; //Receive data sampled on rising edge of CLKR.

unsigned int FramePeriod;
unsigned char FrameWidth,SampleRate;

FramePeriod = 200;
FrameWidth = 1;
SampleRate = 200;

HWREG(SOC_MCBSP_0_CTRL_REGS + MCBSP_SRGR) = HWREG(SOC_MCBSP_0_CTRL_REGS + MCBSP_SRGR)
| MCBSP_SRGR_CLKSM //CLKSM=1,SCLKME=0,McBSP internal input clock.
| ( FramePeriod << MCBSP_SRGR_FPER_SHIFT ) //Range is 1 to 4096 sample-rate generator clock (CLKG) periods.
| ( FrameWidth << MCBSP_SRGR_FWID_SHIFT )
| ( SampleRate << MCBSP_SRGR_CLKGDV_SHIFT ); //Frame width value plus 1 specifies the width of the frame-sync pulse (FSG) during its active period.

unsigned char RevWordLength1;

RevWordLength1 = MCBSP_RCR_RWDLEN1_24BIT;

HWREG(SOC_MCBSP_0_CTRL_REGS + MCBSP_RCR) = ( 0 << MCBSP_RCR_RPHASE_SHIFT ) //Single-phase frame
| ( MCBSP_RCR_RCOMPAND_MSB << MCBSP_RCR_RCOMPAND_SHIFT ) //No companding, data transfer starts with MSB first.
| ( MCBSP_RCR_RDATDLY_0BIT << MCBSP_RCR_RDATDLY_SHIFT ) //0-bit data delay
| ( 0 << MCBSP_RCR_RFRLEN1_SHIFT ) //1 word in phase 1
| ( RevWordLength1 << MCBSP_RCR_RWDLEN1_SHIFT ); //Receive word length1 is 24 bits.

Delay(100);

HWREG(SOC_MCBSP_0_CTRL_REGS + MCBSP_SPCR) =MCBSP_SPCR_RRST 
| MCBSP_SPCR_GRST;
}

ADC_SYNPN is to provide a 1MHZ pulse to start ADC conversion. But McBSP0_FSR0 never generate signal from ADS1271. The reason is that

ADS1271 cannot  work on SLK "always on" mode?

How can I use McBSP on C6748 to read ADS1271? Should I change ADS1271 mode to Frame-Sync mode? Note my sample rate should be 50*1024HZ. 

Thank you for help!!!