Simon,
If an interrupt occurs during your flash erase, the interrupt flag will be set, but the interrupt will not be serviced since interrupts are disabled when flash api is active. Without being expert for the callback function I would try the following:
As first (and single) statetement in your callback function, enable the interrupts (global and specific for your CAN) . If an interrupt is pending, it should be serviced now, of not, the callback function will terminate and the flash api continues its operation. Probably you need to add a short foor loop to give the interrupt the chance to be serviced...
[quote user="Simon Brethous1"]In my Flash_API, in the initialization, I have this line "Flash_CallbackPtr = NULL;", should i replace NULL by the address of my interruption? I don't think it would be working though...[/quote]
Nope, but the address from your callback function!
BR Andreas