Non Volatile RAM (F-RAM & NVSRAM) Forum Discussions
Hello Community,
Greetings for the day!
Myself Vipul Prajapati working as Sr. Engineer at Eaton India Innovation Center, Pune, India for the Power system division group. This is with reference to get the details of standard bitbang SPI routine sample code to do word write into cypress FRAM - CY15E016Q.
We are currently working for a project which uses NXP Legacy automotive MCU (PN - M68HC16Z1). To support the ongoing firmware development, we would require to write SPI bitbang routine in existing FW which can write word by word data to FRAM chip. As this project is with legacy development, running from last 18 years with very limited MCU support, It would be difficult for us to write SPI routine which can do the job without affecting the existing FW.
Could you please help us to provide the sample SPI routine which can be utilize to write word by word data to FRAM chip CY15E016Q? Thanks in advance!
Show LessHello,
I'm working on a proven hardware design with FM25V20A. The design has previously been proven working with CY15B104Q 4Mb FRAM device and the application code has been verified as working.
The pull-up on FM25V20A pin 7 has been removed as the Rev I (Aug 2019) Datasheet for FM25V20A states this pin is "DNU" and can be left floating or pulled-up (FM25M20A DS Rev I, page 3).
However a previous revision of the FM25V20A datasheet, Rev D (2014), indicates pin 7 is #HOLD and must be pulled-up when unused.
When pin 7 "DNU" is floating, the application can not access the FRAM device. When pin 7 DNU is pulled up, the application can access the FRAM device correctly. The application does not implement control of #HOLD function on the SPI interface, the SPI interface does not connect to pin 7 in any way.
It appears the DNU pin 7 is actually functioning as a #HOLD pin described in Rev D of the datasheet and not as DNU described in Rev I.
The part marking is:
G2V20A
615552
2019
<square> C
This should indicate the part is from Lot# 615552 and was packaged week 19 of 2020?
I expected the part to behave as the Rev I of the FM25V20A datasheet describes, however, it does not. It looks that the DNU pin MUST be pulled-up - there is no option to leave floating as the datasheet states.
Measuring the voltage at the floating DNU pin reads 0v, no noise or ripple. The oscilloscope is calibrated , 500MHz voltage probe used with a local PCB ground connection.
Is there a documentation error or a fault with the part?
Show Less
/**************************************************
SPI串口初始化
****************************************************/
void SPI_Init(void)
{
SDOSEL = 0; //RC2为SDO
TRISC = 0B00001010; //RC1 input SDI = 1
//RC0 output SCK = 0
//RC2 output SDO = 0
//RC3 INTPUT SS = 1
TRISA = 0B00000010;
//mode 3 CKP = 1,CKE = 1;上升沿发送
SSP1STAT = 0b01000000; // CKE = 1
SSP1CON1 = 0b00110000; // 主模式 WCOL =0;SSP1OV = 0;SSP1EN =1;CKP = 1
SSP1ADD = 0;
SPI_CS=0; //启动从机
WriteSPI(0x06); //写入使能wren指令
SPI_CS=1; //停止从机
__delay_us(10);
SPI_CS=0; //启动从机
WriteSPI(0x01); //写状态寄存器指令
WriteSPI(0x80); //写状态字无保护
SPI_CS=1;
}
/******************************************
WriteSPI 写单字节缓冲储存器
*******************************************/
void WriteSPI(unsigned char i)
{
SSP1IF=0; // clear SSP interrupt bit
SSP1BUF=i;
while(!SSP1IF); // Wait for interrupt flag to go high indicating transmission is complete
}
//**************************************************************************************
// ReadSPI 读单字节缓冲
//**************************************************************************************
unsigned int ReadSPI(void)
{
unsigned char databyte;
SSP1IF=0; // Clear SSP interrupt bit
SSP1BUF = 0x00; // Write dummy data byte to the buffer to initiate transmission
while(!BF); // Wait for interrupt flag to go high indicating transmission is complete
databyte = SSP1BUF; // Read the incoming data byte
return (databyte);
}
//*************************************************************************************
// 从储存器读标志位
//**************************************************************************************
unsigned char Read_SPI_StatusReg(void)
{
unsigned char data_read;
SPI_CS=0;
WriteSPI(0x05); // Send read status register command
data_read = ReadSPI(); // Read the data
SPI_CS=1;
return(data_read);
}
//**************************
//写一个字节进储存器
//**************************
void Write_SPI_Byte(unsigned int address_hi,unsigned int address_lo,unsigned int data)
{
// unsigned int StatusReg;
SPI_CS=0;
WriteSPI(0x06); // Send the set write enable latch command
SPI_CS=1;
__delay_us(10);
SPI_CS=0;
WriteSPI(0x02); // Send write command
WriteSPI(address_hi); // Send high address byte
WriteSPI(address_lo); // Send low address byte
WriteSPI(data); // Send data byte
SPI_CS=1;
}
//********************************
// 从储存器里读一个字节
//********************************
unsigned char Read_SPI_Byte(unsigned int address_hi,unsigned int address_lo)
{
unsigned char readdata;
SPI_CS=0;
WriteSPI(0x03); // Send read command
WriteSPI(address_hi); // Send high address
WriteSPI(address_lo); // Send Low address byte
readdata = ReadSPI(); // Read the data
SPI_CS=1;
return(readdata);
}
Hello.
The voltage of CY14E116L-ZS25XI is 5V in datasheet.
But, the voltage is 3.6 in select guide.
Which is right?
Thanks and Best regards.
Glenn.
Show LessHi Sir,
之前一直使用小容量的铁电,4Kb/i2c , 目前产品已经稳定量产,但是每年会出现几例读写数据出现问题。现在有一个新的项目,需要选型4Mbit/8Mbit 大容量SPI Fram, 但是对大容量的稳定性有所担心,是否会出现数据丢失的问题?可靠性不太好?随着FRAM容量的增大,是不是稳定性就越不好?若出现稳定性不好的情况,应该如何解决呢?thanks。
Show LessHi,
ever since i replaced my memory ic (FRAM) from MR44V100A to FM24V10, i can not get my system work properly. There is no communication between PIC Microcontroller and FRAM.
Can you please advise me in this regards? if needed I can share code as well which is written in mikroc IDE.
Thanks in advance,
Nuaman Saghir
Show LessI would like to get errata information about CY15B104Q-LHXIT.
Are there any errata?