cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 EEPROM Read

MBaig.1
Associate II

Hello Every one i am using the STM32WB35CC SoC for custom BOARD, I am facing an issue that when i tries to write EEPROM I get correct response checked using Logic Analyzer but when i tried to read eeprom I GET HIGH impedance with every address. The Eeprom i am using is CAT25320 .... waiting for solution

22 REPLIES 22
MBaig.1
Associate II

i changed the pin toggling for CS Pins following are my results:

WREN:

WRITE:

WRDI:

Read:

I am still unable to read data

ONadr.1
Senior III

Place here the analyzer waweform picture for write and read operation. Perharps read op. has roblem too. Without the waveform is not possible give any help.

MBaig.1
Associate II

Sorry my bad i tried to copy paste images

WREN:

0693W00000DlQBuQAN.pngWRITE:

0693W00000DlQCEQA3.pngWRDI:

0693W00000DlQ6gQAF.pngREAD:

0693W00000DlQD7QAN.png

ONadr.1
Senior III

As you can see on first picture, value of status register is 0x0E. So, bits BP0 and BP1 are set and whole adress space of EEPROM is write protected. WEL bits alow write only to unprotected pages. Please, look into datasheet, how to clear this bits. I don't have enough time for that today.

MBaig.1
Associate II

First of all thank you for quick response but my results are same with even WRSR 0x02

i have attached the results below:

WREN with WRSR to remove protection

0693W00000DlQjhQAF.pngWRITE:

0693W00000DlQk1QAF.pngThen i wait until busy flag set low:

0693W00000DlQkGQAV.pngAfter Disabling write i read for data0693W00000DlQkVQAV.png

ONadr.1
Senior III

Try to set CLKPolarity to SPI_POLARITY_LOW and CLKPhase to PSI_PHASE_1EDGE

MBaig.1
Associate II

Similar Results

ONadr.1
Senior III

I dont understand, why you have in read operation some pulses on MOSI. It is strange. Do you use HAL function for reading?

MBaig.1
Associate II

Yes i do use HAL function for reading over SPI

ONadr.1
Senior III

How the EEPROM is connected? Short wires? Breadboard? Is there cca 100nF capacitor near the EEPROM. Is the EEPROM power suply OK?

You write from adress 0x01. Try to read from adr. 0x01 too. We dont know what was writen to adr 0x00. Perharps first byte is OK.

It seems as some interference could interfere SPI operations.