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

Nor Flash Forum Discussions

Frank-Lin
Level 4
5 solutions authored 50 sign-ins 10 questions asked
Level 4

I am using S25FL064L with CY8C624ABZI.
I create a project "QSPI_Flash_Read_Write" and change the target to S25FL064L and code works.
Now i want to let S25FL064L go into deep power down (which is about 2uA in datasheet) but don't know what to do.

How do i let S25FL064L go into deep power down with using "serial-flash" library?
Or, what library should i used? Is there any example about read, write and  deep power down?

0 Likes
1 Solution
Frank-Lin
Level 4
5 solutions authored 50 sign-ins 10 questions asked
Level 4

Hi Ronak,
Thank's for your help, i caa let it go into deep power down mode.

Step1:
modify serial-flash library, remove static for cyhal_qspi_t qspi_obj;
Step 2:
using following code to let it go into deep power down mode by using HAL 2.1.0

extern cyhal_qspi_t qspi_obj;
void Flash_Sleep(void) {
  cyhal_qspi_command_t cmd;
  uint32_t addr = 0;

  cmd.instruction.disabled = false;
  cmd.instruction.two_byte_cmd = false;
  cmd.instruction.value = 0xB9;
  cmd.instruction.bus_width = CYHAL_QSPI_CFG_BUS_SINGLE;
  cmd.instruction.data_rate = CYHAL_QSPI_DATARATE_SDR;
  cmd.address.disabled = true;
  cmd.mode_bits.disabled = true;
  cmd.dummy_cycles.dummy_count = 0;
  cyhal_qspi_transfer(&qspi_obj, &cmd, addr, NULL, 0, NULL, 0);
}

View solution in original post

0 Likes
7 Replies
Ronak
Moderator
Moderator 50 replies posted 25 solutions authored First question asked
Moderator

Hi,

We do not have any code example for this at present. Can you please check the page no. 107 of datasheet for the command Deep Power-Down (DPD B9h). In the low level driver Guide you can find the function: slld_DPCmd that can be used to switch flash to Deep Power Down .

Thanks,
Ronak

0 Likes
Frank-Lin
Level 4
5 solutions authored 50 sign-ins 10 questions asked
Level 4

Hi Ronak,
Can you give me more information about low level driver?
I can't find it in Library manager, and even search on internet.
If i use low level driver, can i still use serial-flash library to control flash?

0 Likes
Frank-Lin
Level 4
5 solutions authored 50 sign-ins 10 questions asked
Level 4

Hi @Ronak ,
Can you give me more information about low level driver?
I can't find it in Library manager, and even search on internet.
If i use low level driver, can i still use serial-flash library to control flash?

0 Likes
Frank-Lin
Level 4
5 solutions authored 50 sign-ins 10 questions asked
Level 4

Just for more information, i'm using anycloud example .

0 Likes
Ronak
Moderator
Moderator 50 replies posted 25 solutions authored First question asked
Moderator

Hi Frank,

You will be able to download the Low level drivers from here

You will also get the user guide to use the driver when you install the downloaded drivers.

Thanks,
Ronak

0 Likes
Frank-Lin
Level 4
5 solutions authored 50 sign-ins 10 questions asked
Level 4

Hi @Ronak , 
Is it possable to use "Cy_SMIF_TransmitCommand" to let flash go into deep sleep mode?
I hope i can keep using "serial-flash" library to control flash. (That's more easier)

Low level driver is so different from "serial-flash" library, and if want to write or read somthing from flash, i need to study flash spec (this is the first time i use external falsh...)

0 Likes
Frank-Lin
Level 4
5 solutions authored 50 sign-ins 10 questions asked
Level 4

Hi Ronak,
Thank's for your help, i caa let it go into deep power down mode.

Step1:
modify serial-flash library, remove static for cyhal_qspi_t qspi_obj;
Step 2:
using following code to let it go into deep power down mode by using HAL 2.1.0

extern cyhal_qspi_t qspi_obj;
void Flash_Sleep(void) {
  cyhal_qspi_command_t cmd;
  uint32_t addr = 0;

  cmd.instruction.disabled = false;
  cmd.instruction.two_byte_cmd = false;
  cmd.instruction.value = 0xB9;
  cmd.instruction.bus_width = CYHAL_QSPI_CFG_BUS_SINGLE;
  cmd.instruction.data_rate = CYHAL_QSPI_DATARATE_SDR;
  cmd.address.disabled = true;
  cmd.mode_bits.disabled = true;
  cmd.dummy_cycles.dummy_count = 0;
  cyhal_qspi_transfer(&qspi_obj, &cmd, addr, NULL, 0, NULL, 0);
}

0 Likes