[quote]So my question is; if an erase operation fails due to depletion will a set known error number be returned or does the erase function fail with any of the error numbers?[/quote]
Generally Flash API Error #23/24 are the numbers related to this kind of error.
I would also like you to check this link: http://e2e.ti.com/support/microcontrollers/c2000/f/171/p/21814/822232.aspx#822232
Regards,
Gautam