System workbench unable to flah the programme
I am new to the STM environment. I am getting these errors while i am trying to flash a code generated by CubeMX to the MCU. I was following a video on Udemy to get to this step and i started getting a bunch of errors. I am using STM32 L053R8 NUCLEO board. I also changed my mini type-b to usb wire to a new one. I updated my drivers and I am running Windows 10. One thing to note is that when I tried to flash the .elf file to the MCU using the CubeProgrammer it worked flawlessly. Can anyone suggest me a solution. Thankyou.
- Programming Started **
auto erase enabled
Info : Device: STM32L0xx (Cat. 3)
Info : STM32L flash size is 64kb, base address is 0x8000000
Error: jtag status contains invalid mode value - communication failure
Info : Previous state query failed, trying to reconnect
Error: error writing to flash at address 0x08000000 at offset 0x00000000
embedded:startup.tcl:476: Error: ** Programming Failed **
in procedure ‘program’
in procedure ‘program_error’ called at file “embedded:startup.tcl”, line 535
at file “embedded:startup.tcl”, line 476
14:24:46 Build Finished (took 921ms)