Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

SPI Flash Communication Problem

$
0
0

Hello there,

I've already been trying a week to communicate with a SPI Flash Memory (Spansion S25Fl256S )

I'm using a MSP430FR5739 and trying to establish communication but I''ve never got a single byte in return from the Memory.

I've analyzed the communication using a logic analyzer.

Here's what I've got :

For the time being I'm trying with the Read_ID command.

I Enable the chip, send the clock signal and the command (0x90), then keep on sending the clock signal but there's no returned data from the memory...)

I'm really confused because all the timings, voltage and configuration have been double checked and modified in all ways... but I cannot get it to work untill now ...

Here's my init code for the eUSCB0 SPI Module:

void InitSPI()
{
P1SEL1 |= BIT3 + BIT6 + BIT7; //Select eUSCI Pin Function
P2SEL1 |= BIT2; //Select eUSCI Pin Function
P3DIR |=BIT7;
P3OUT |=BIT7;
UCB0CTLW0 |= UCSWRST; // **Put state machine in reset**
__no_operation();
//UCB0CTLW0 |= UCCKPH + UCCKPL+ UCMSB+ UCMST + UCSYNC; // 4-pin, 8-bit, SPI master
// CKPH = 1 CKPL=1 , MSB
UCB0CTLW0 |= UCMSB+ UCMST + UCSYNC; // 4-pin, 8-bit, SPI master CKPH = 0 CKPL=0 , MSB
UCB0CTLW0 |= UCSSEL__SMCLK; // SMCLK = 4MHz
UCB0BR0 = 0x02; // /2
UCB0BR1 = 0; //
UCB0CTLW0 &= ~UCSWRST; // **Initialize USCI state machine**
__no_operation();
}

Any helpful insight ? Has anyone ever used a Spansion Flash Memory with SPI Communication ?


Viewing all articles
Browse latest Browse all 262198

Trending Articles