Hi,
I am trying to configure DM6437 EVM as SPI slave with Master being MSP430. I have properly configured MSP430 to give 4 pin configuration.
DM6437 EVM, i used McBSP0 as SPI slave and used U65 ports of pins for the connections. What i see when i connected the MSP430 to DM6437 SPI pins is that RRDY bit is turning ON , but i dont see any data in DRR register. I checked all my configuration and they seem to be fine.
Please let me know how do i proceed.
Please find below my code , for the same.
/*
* EVMDM6437 SPI Suite
*
*/
#include "stdio.h"
#include "evmdm6437.h"
#define SPCR_RESET 0x00000000
#define PCR_RESET 0x00000000
#define SRGR_RESET 0x20000001
#define XCR_RESET 0x00000000
#define RCR_RESET 0x00000000
#define SPCR_SLAVE 0x00001800
#define SAMPLE_RATE_ENABLE 0x00410001
#define PCR_SLAVE 0x00000008
#define SRGR_SLAVE 0x20000001
#define XCR_SLAVE 0x00010000
#define RCR_SLAVE 0x00010000
#define SPCR_RRDY 0x00000002
void init_McBSP0_slave();
void main( void )
{
float temp=3.142;
int i=0;
temp *=1.2;
/* Initialize BSL */
EVMDM6437_init( );
init_McBSP0_slave();
MCBSP0_SPCR |=0x00000001;//RRST pin
MCBSP0_SPCR |=0x00010000;//XRST pin
_wait(2);
MCBSP0_DXR_8BIT = 'a';
while(1)
{
while (MCBSP0_SPCR & SPCR_RRDY)
{
printf("\n %d :***:%c ",i++,MCBSP0_DRR_8BIT);
}
}
printf( "\n***ALL Tests Passed***\n" );
SW_BREAKPOINT;
}
void init_McBSP0_slave()
{
/* All default or reset values are set */
MCBSP0_SPCR = SPCR_RESET;
MCBSP0_PCR = PCR_RESET;
MCBSP0_SRGR = SRGR_RESET;
MCBSP0_XCR = XCR_RESET;
MCBSP0_RCR = RCR_RESET;
/* Initialise McBSP0 as slave device */
MCBSP0_SPCR |= SPCR_SLAVE;//0x00000800;
MCBSP0_PCR |= PCR_SLAVE; //0x08
MCBSP0_SRGR |= SRGR_SLAVE; //0x20000001;
MCBSP0_XCR |= XCR_SLAVE;//0x00
MCBSP0_RCR |= RCR_SLAVE;//0x00
MCBSP0_SPCR |= SAMPLE_RATE_ENABLE; //Enable Sample rate and Receive buffer.
_wait(2);
}