Regarding working/interfacing with FM25V10 FRAM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ViV_4156156
Level 2
Level 2

Hi

  Im trying to read the device ID  initially to start interfacing with FM25V10 FRAM.

The below mentioned procedure I'm following  to read the devive ID C22400h - with product family,density,sub and revision codes.

uint32_t read_fram_id(void)

{

    uint8_t dummy_var;

uint8_t manufacturer_ID,device_ID_1,device_ID_2,device_ID_3;

uint32_t device_ID;

ALLOW_TRANSFER; // if previous command has set EOQ

PUSH(RDID);  // read data bytes command 9F

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(dummy_var); // discard one RxFIFO item

PUSH(dummy_byte);

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(dummy_var); // get 7f

PUSH(dummy_byte);

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(dummy_var); // get 7f

PUSH(dummy_byte);

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(dummy_var); // get 7f

    PUSH(dummy_byte);

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(dummy_var); // get 7f

PUSH(dummy_byte);

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(dummy_var); // get 7f

PUSH(dummy_byte);

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(dummy_var); // get 7f

// after 6 bytes of &F now getting device id C2 2400h

PUSH(dummy_byte); // dummy byte for generating CLK to slave

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(device_ID_1);

PUSH(dummy_byte); // dummy byte for generating CLK to slave

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(device_ID_2);

PUSH_ENQ(dummy_byte); // dummy byte for generating CLK to slave

WAIT_UNTIL_RxFIFO_IS_NOT_EMPTY;

POP(device_ID_3); // read useful data

deviceID = (device_ID_1 << 24) | (device_ID_2 << 16) | (device_ID_3 << 😎 | (0x0000);

return deviceID;

}

What im getting is 0xFF00. I tried to probe  the test point are bit cluttered an difficult to probe.

same happened when i was working with S25FL-L 128MB flash memory but thankfully i got the device ID there thus not needed for probing.

Please tell me whether this approach is correct initially. Kindly advice as Im using FRAM for first time.

Thanks In Advance,

Vignesh

0 Likes
5 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Vignesh,

We would like to know more details about the issue that you are facing with our FRAM device.

  1. Could you please attach SPI waveform (SO, SI, SCK and SS signals) for RDID operation to this thread?
  2. What is the SPI frequency used in your application?
  3. How many devices are showing this issue?

Thanks and Regards,

Sudheesh

0 Likes

Hi,

  1.As I said before I'm facing some issues in getting the probe done on the test points are difficult to probe . Anyways ll find a way to probe and get you the waveform.

2. SPI frequency clock used is close to 1.75 MHZ

3.devices currently I'm using 1.

Meanwhile till I get the waveform done could you please let me know whether the above mentioned code is right direction to get the device ID

Regards,

Vignesh

0 Likes

Hi Vignesh,

Sorry for the delay. I checked your code and I need some clarifications.

1. Where are you making the chip select pin LOW and HIGH in the above code snippet?

2. What are the differences between PUSH() and PUSH_ENQ() functions?

Thanks and Regards,

Sudheesh

0 Likes

Hi,

Sorry for the delayed response

1. The pin is made low when PUSHis sent and made high finally when PUSH_ENQis sent.

2.macro PUSH sends data, letting CS line asserted

macro PUSH_ENQ sends data, negating CS line, also it set End of Queue flag (it pauses command execution)

macro 'ALLOW Transfer' clears End of Queue flag allowing command execution previously paused by PUSH_ENQ.

Regards,

Vignesh

0 Likes

Hi Vignesh,

Thank you for the clarification. Your program to read device ID looks OK.

Were you able to collect SPI waveform for RDID operation?


Thanks and Regards,Sudheesh

0 Likes