I have had an identical problem using MC9S12NE64 with CodeWarrior (5.5.1272) and P&E USB Multilink (USB-ML-12 Rev B (PE5013100)). Had worked fine for months and now suddenly I'm getting the same error when trying to erase and load flash :
"Error while loading diagnostics algorithm to target system.
The chip may be secured, or the derivative selected may be wrong."
I have the correct derivative selected and checked that the flash is unsecured.
I'm doing everything exactly as I have been doing for months. I get the same result in our own board and also on the Freescale DEMO9S12NE54 board.