hi , i am building my own spi drivers i am using micro vision
every time i write to the DR register the data is sent correctly and the desired received data is written in the DR register (i know because it appears in the debugging mode)
when i try to get that data into a variable it reads zero
my code
#define sram 0x20000000
int main(void){
SYSCTL_Type* pSYSCLC;
pSYSCLC=SYSCTL;
pSYSCLC->RCGCSSI |= (1<<2);
pSYSCLC->RCGCGPIO |= (1<<1);
GPIOA_Type* pGPIO;
pGPIO = GPIOB;
pGPIO->DIR |= (1<<4);
pGPIO->DIR |= (1<<5);
pGPIO->DIR &= ~(1<<6);
pGPIO->DIR |= (1<<7);
pGPIO->DATA |= (uint32_t)(1<<5);
pGPIO->AFSEL |= (1<<4);
pGPIO->AFSEL |= (1<<5);
pGPIO->AFSEL |= (1<<6);
pGPIO->AFSEL |= (1<<7);
pGPIO->PCTL |= (0x2222<<16);
pGPIO->PUR |= (0xF<<4);
pGPIO->DEN |= (0xF<<4);
SSI0_Type *pSSI;
pSSI = SSI2 ;
pSSI->CR1 &= ~(uint32_t)(1<<1);
pSSI->CR1 &= ~(uint32_t)(1<<2);
pSSI->CR0 |= (0x7<<8);
pSSI->CPSR = (0x2);
pSSI->CR0 |= (1<<6);
pSSI->CR0 |= (1<<7);
pSSI->CR0 |= (0x7<<0);
pSSI->CR1 |= (1<<1);
pGPIO->DATA &= ~(uint32_t)(1<<5);
pSSI->DR |=(0x80);
while((pSSI->SR & (1<<4))) ;
*((uint32_t *) sram) = pSSI->DR ;// = pSSI->DR ;
pGPIO->DATA |= (uint32_t)(1<<5);