cancel
Showing results for 
Search instead for 
Did you mean: 

USB Bug Report: NULL pointer access on deInit

Paul Mellor
Associate II

If a charger is plugged into the USB (rather than a computer) then USBD_MSC_Init() is not called. Consequently pClassData is left NULL. If the USB is then stopped via USBD_Stop(), then the USBD_MSC_DeInit() is called and the NULL pointer is accessed (written to). This causes the FLASH SR to have errors set (SIZERR, PGSERR), which in turn prevent subsequent flash erase operations due to initial error check.

0 REPLIES 0