How to read BPL bit in status register of SPI flash in Denebola Kit?

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

cross mob
Subhash24
Level 4
Level 4
25 replies posted 10 likes given 50 sign-ins

Hello,

         I'm using Denebola kit, so now I want to read BPL bit in status register of SPI flash, can anyone tell me How to read status register of SPI flash in Denebola Kit?

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

EDITTED

Hello,

The flash used inside Denebola kit is M25P40. The read status register command for this flash is 0x05. The code for reading this register in full can be found in the example project cyflashprog. This project can be found in the following location:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxflashprog

In the above project, open the source file cyfxflashprog.c and then search for the function CyFxFlashProgEraseSector (). The else part within this function implements status register read. You can alternatively refer to the function CyFxFlashProgSpiWaitForStatus () in the same file. You can parse the individual bits in the status register in the firmware once the register is ready fully.

Best Regards,
Jayakrishna

View solution in original post

3 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

EDITTED

Hello,

The flash used inside Denebola kit is M25P40. The read status register command for this flash is 0x05. The code for reading this register in full can be found in the example project cyflashprog. This project can be found in the following location:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxflashprog

In the above project, open the source file cyfxflashprog.c and then search for the function CyFxFlashProgEraseSector (). The else part within this function implements status register read. You can alternatively refer to the function CyFxFlashProgSpiWaitForStatus () in the same file. You can parse the individual bits in the status register in the firmware once the register is ready fully.

Best Regards,
Jayakrishna

thanks @JayakrishnaT_76  Can you tell me how to write it?

0 Likes

Hello,

I believe you are referring to write status register command. If yes, then please refer to the datasheet of the flash and the read status register example shared before to implement write status register command.

Best Regards,
Jayakrishna