Part Number: MSP430F5529
Tool/software: Code Composer Studio
Hi All
We have a bootloader (not using the BSL) and application on our processor. We connect to the device via USB in a windows C# application we are using, through this we select a firmware image to send to the bootloader in order to flash the image. This all works fine.
When the image is flashed in the bootloader, the bootloader jumps to the App. Here the processor reconfigures and carries on running, but we lose the USB connection to the application.
If we remove the USB (from PC app to USB on the embedded device) and plug it back in, the USB starts to work again. We can also go into device manager, right-click the MSP430 USB and disable/reenable to get it to work.
We release the comm ports in the c# app and we also run the library functions in the embedded to release the USB.
We initialise with this (on both):
USBHAL_initClocks(24000000); // Config clocks.
USB_setup(TRUE,TRUE); // Init USB & events; if a host is present, connect
We close off with this (on both):
USB_disconnect();
USB_disable();
_disable_interrupts();
SYSCTL &= ~SYSRIVECT; //Turn off RAM interrupts
((void (*)()) APP_RESET_VECTOR) (); //Jump
When we go from the App to bootloader, we use a BOR instead of jump as our reset vector is always in the bootloader.
USB_disconnect();
USB_disable();
BROWN_OUT_RESET // This will cause a BOR and will start the boot loader
We are using the latest TI stack for the MSP430
The question is, how do we get the USB connection to remain or refresh so that we don’t have to physically disconnect and plug in again? I think this potentially could be a windows side problem but thought I'd check if there was a way to do this on the embedded side first. Let me know if you need more info.
Thanks.