主题中讨论的其他器件: MSPWARE
您好!
如何在 MSP430F67791中连接外部 WIN Bond 闪存。
如何访问(读取/写入) MSP430F67791中 提供的任何 API? 我可以参考的任何示例应用程序?
谢谢你。
Ashokkumar
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.
您好!
如何在 MSP430F67791中连接外部 WIN Bond 闪存。
如何访问(读取/写入) MSP430F67791中 提供的任何 API? 我可以参考的任何示例应用程序?
谢谢你。
Ashokkumar
您好、先生、
现在、我有 MSP430F67791接口 W25q64 Winbond 芯片、但通信无法正常工作、发生了什么情况?
这是我的以下代码详细信息、
接口引脚详细信息、以供您参考、
SCLK P3.3  SCK 
SOMI P3.4  DO 
SIMO P3.5  DI 
CS   P3.6  CS 
void SPI_init (void) 
{ 
UCA1CTL1 = UCSWRST; 
P3OUT &=~BIT6;            //清除 P1.0 
P3DIR |= BIT6;               //将 P1.0设置为输出方向 
P3SEL0 = BIT3| BIT4 | BIT5;  //将 P3.0、P3.1、P3.2设置为非 IO 
UCA1CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC;  
UCA1CTL1 |= UCSSEL_2;// SMCLK 
UCA1BR0 |= 0x02; 
UCA1BR1 = 0x00; 
UCA1MCTLW = 0; 
UCA1CTL1 &=~UCSWRST; 
}
void SPI_chipHigh (void) 
{ 
P3OUT |= CS; 
} 
void SPI_chipLow (void) 
{ 
P3OUT &=~CS; 
} 
int datacount=0;
unsigned char data=0;
unsigned char GCU_Tx_Data[10]; 
unsigned char GCU_recged_Data[10]; 
uint8_t sFLASH_SendByte (unsigned char * UDATA、unsigned char 计数) 
{ 
while (!(UCA1IFG &= UCTXIFG)); 
for (datacount=0;<count;datacount++) 
UCA1TXBUF = UDATA[数据连接]; 
while (!(UCA1IFG & UCRXIFG)); 
UDATA[0]= UCA1RXBUF; 
返回* UDATA;
}
unsigned char read_SingleBytes (unsigned int Liu Flash_Add){ 
unsigned char lcu_read_Data=0; 
SPI_chipLow (); 
GCU_Tx_Data[0]= 0x03;                       //读取  
GCU_Tx_Data[1]=(Liu Flash_Add >> 16)和0xFF; 
GCU_Tx_Data[2]=(Liu Flash_Add >> 8)和0xFF; 
GCU_Tx_Data[3]=(Liu Flash_ADD >> 0)和0xFF; 
LCU_READ_Data=sFLASH_SendByte (&GCU_Tx_Data[0]、4); 
SPI_chipHigh (); 
返回(LCU_READ_Data); 
} 
while (1)
{
Read_SingleBytes (0x000000);
}
如果有任何编码问题、请告诉我准确的原因以及如何尽快正确指导我。
您好!
请阅读我们 的《MSP430MCU 上常见 eUSCI 和 USCI 串行通信问题解决方案 》应用报告,特别是 第4章常见 SPI 通信问题。 这将有助于您快速入门。 
此致、
James
MSP 客户应用