The target indicates there is an error condition from a previous SWD request. Clear the error the condition, and try the SWD request again.

facing this error. how to solve it?
edit :
changed the mcu getting new error

it is working fine when i program the launchpad mcu but not otherwise.