Hi Sarah,
At first, I would like to mention that the driver uses flash commands which requirements are described in the RM rev 11.
1. I would like to start with program flash. The FLASH_DRV_Program function uses Program phrase command (36.5.11.4 Program Phrase command). The requirement is that the flash address Must be 64-bit aligned (Flash address [2:0] = 000)
That is why this address 0x3f000 works for you.
2. The FLASH_DRV_VerifySection uses Read 1s Section command (Table 36-34. Read 1s Section command FCCOB requirements). This command requires:
- 64-bit aligned (Flash address [2:0] = 000) for non-interleaved flash.
- number of double phrases which is third parameter of the FLASH_DRV_VerifySection() function. We know that the one phrase is 8B and the double phrase is 16B.
We can define:
#define FTFx_DPHRASE_SIZE 0x0010U
For example,
Let's say that I want to verify memory from the address from 0x0000 to 0x40000
address = 0x0000
size = 0x40000 => 256kB
number of double phrases = 0x40000/0x0010 => 0x4000 => 16
FLASH_DRV_VerifySection(&pSSDConfig, address, size / FTFx_DPHRASE_SIZE, 1u);
---------------------------------------------------------------------------------------------------------------------------------
If you want to verify flash at 0x3f000, length is 16Bytes.
The parameters:
address = 0x3f000
size = 0x0010 => 16B
number of double phrases = 0x0010/0x0010 => 1
I hope it helps.
Best regards,
Diana