I would like to know the difference between 24-bit and 32-bit QSPI flash? why 24-bit address is used in flash?
24 bits can address 16 megabytes. When a larger chip is made like 32 megabyte chip it must be addressed via 32 bits address. It might still have the 24-bit command to allow use of new and larger chips in older systems supporting only 24-bit commands. Also when the speed of the QSPI bus goes high enough, the 24-bit address can be sent with dummy padding bytes to allow time for the chip to fetch the data, but it can then use the faster bus to transfer it.