Aurix TC3xx Erase logical sector range

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

cross mob
Level 1
Level 1
Hi AURIX Community,

We are newbie and try to investigate some feature on Aurix TC3xx.
While doing investigation on Flash Operation, we have a question on "Erase logical sector Range"

The command takes 4 cycles to complete "Erase" and function shall erases "nn" logical sectors staring at the sector addressed by "SA".
- ST AA50H, SA
- ST AA58H, xx"nn"H
- ST AAA8H, xx80H
- ST AAA8H, xx50H
There are a list of errors could happened,
- For PFLASH, if the range of logical sectors exceeds 512KByte.
- For DFLASH, if the range of logical sectors exceeds 256KByte addressable memory (256KByte physical memory in Single Ended mode, and 512KByte physical memory in Complement Sensing mode)

So, my question :
1/ How to know PFlash or DFlash shall be "erase" ? Is it defined by starting sector "SA" ?
2/ The size shall be "nn" sector multiple by logical sector, so, what is the size of "logical sector" ? Is it configurable ?

Sorry for my language skills and have a nice day!
1 Reply
First solution authored First like received
1) SA is start address, that is the absolute start address of the flash sector. This then tells the NVM which flash is being erased.
2) The size of a logical sector is fixed, but differs for PFlash and DFlash. A PFlash sector is 16 kB, a DFlash sector is 4 kB (See Non Volatile Memory (NVM) Subsystem->Functional Description->Flash Structure). You can configure how many sectors are erased by changing the value of nn.