Hi Pasquale,
Are you using the Code Bundle or the MCUXpresso SDK as base for your application? Which ISP interface are you selecting? If using USART ISP mode, make sure to enable the clocks to the default before calling this command.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer