cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

hi every one i have a problem whit a memory eeprom , I have done work this memory :  http://www.atmel.com/images/atmel-8535-seeprom-at25320b-640b-datasheet.pdf  
agree to the application note :  http://www.cypress.com/documentation/application-notes/an51234-getting-started-spi-psoc-1

   

the problem is that now I want to run this one and I can not write because apparently I can read 

   

http://www.atmel.com/images/atmel-8832-seeprom-at25m02-datasheet.pdf

   


I do not know why
 

0 Likes
15 Replies
Bob_Marlowe
Expert II

The write protect signal?

   

When you provide us with schematic and project bundle there might be a chance to find the reason.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

what should do firmware is that when sending this chain 
 2 011,141016,140737,20.97278,-89.66397,0.0,245.22,1,0,0,0
must save it and when send a 1 
should read

0 Likes
Anonymous
Not applicable

maybe you can not compile the project for lack of these libraries 

0 Likes
Bob_Marlowe
Expert II

Sorry, but I couldn't see any ambiguities in your code. Have you got an ICE-Cube to debug your code?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

yes and I could see if that gets stuck in the part where the memory has to answer for the full write is always the status register answers with a 11111111 then wanted to know why the 64kb works and with 2Mb not might be going

0 Likes
Bob_Marlowe
Expert II

Can it be that the address is wrong, because the 2MB part needs 3 byte addresses while the 64kB only needs 2 bytes?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

how I can reroute that in my code?

0 Likes
Bob_Marlowe
Expert II

Check your

   

void SPI_EEPROM_Write(BYTE AddrLSB, BYTE* buffer)

   


in this function you set the eeprom's address msb, but there need more address bytes to be set afaik.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

yes but i don know how i can write this part of the code 

   

CHIP_SEL_LOW               
    
    for(bDelay=0;bDelay<3;bDelay++);
    
    Write opcode 
    SPIM_SendTxData(EEPROM_WRITE);                   
    while(!(SPIM_bReadStatus() & SPIM_SPIM_SPI_COMPLETE)){};
        
    MSB 
    SPIM_SendTxData(0x00);                   
    while(!(SPIM_bReadStatus() & SPIM_SPIM_SPI_COMPLETE)){};
        
    Byte address LSB 
    SPIM_SendTxData(AddrLSB);                   
    while(!(SPIM_bReadStatus() & SPIM_SPIM_SPI_COMPLETE)){};
        
    Data 
    SPIM_SendTxData(*buffer);                   
    while(!(SPIM_bReadStatus() & SPIM_SPIM_SPI_COMPLETE)){};
    
    for(bDelay=0;bDelay<3;bDelay++);
    
    CHIP_SEL_HIGH

0 Likes
Bob_Marlowe
Expert II

See page 13 of the datasheet you supplied. Under "Byte Write" you see that you have to transmit 24 address bits which are three bytes. Two bytes will not be enough, so transmit an additional one (can be zeroes).

   

Remember: Same applies when reading.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

make some changes to my firmware to address those 2 bytes with the memory of 64kb and it worked very well now I can write more in this memory addresses than 255 and now for the 2Mb i write one byte of address in zero  but still does not work.

   

You think what could be the problem?

   

I leave the log with my tests and firmware, which should make is that when I send 1 should retrieve the string to send  after the (2_chain)

0 Likes
Bob_Marlowe
Expert II

"You think what could be the problem?" No, I do not understand your question,

   

What works?

   

What does not work?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

2Mb memory will not let me save or read

0 Likes
Bob_Marlowe
Expert II

Can't help you. Maybe someone else jumps in?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

you have any idea why the 2Mb memory does not work and the 64kb it works ,if there is something im doing wrong?

0 Likes