SLAZ320AC October 2012 – September 2021 MSP430F5635
USB Module
Functional
USB registers are unlocked and ACCVIFG is set at start-up
During device start-up, an incorrect line of code in the start-up code causes the USB registers to remain unlocked and causes an access violation, setting ACCVIFG bit.
In the BSL430_Low_Level_Init code, the following line of code accesses USBKEY (incorrect register address) instead of USBKEYPID, causing an access violation setting ACCVIFG bit, and leaving the USB registers unlocked.
mov.w #0x0000, &USBKEY ; lock USB
The correct line of code should read:
mov.w #0x0000, &USBKEYPID ; lock USB correctly
Note: This code does not run when using the JTAG debugger - the behavior only appears when running standalone.
1. Load the latest version of the USB BSL from Custom BSL Download
OR
2. Load a non-USB or custom BSL
OR
3. Erase the BSL
OR
4. Clear the access violation flag at the beginning of the application code with the following C code (or its assembly equivalent):
USBKEYPID = 0; // Lock USB correctly
FCTL3 = 0xA558; // Clear violation flag