2014-02-09 02:17 AM
Hello,
I download the stsw-stm32121 software. I tried the usb custom hid exemple . it build , programme and work well. But I can't use my debugger , when I lauch a run debug I have this message:''cannot access target , shutting down debug session''. I use keil µvision 4.73 stm32f103 , port103v waveshare bord ulink2 debugger . thanks for your help @+2014-02-09 07:27 AM
Don't know your stsw-stm32121 board, but I think it is the common problem.
Your application reconfigured one or more of the SWD (or JTAG) pins for other uses, effectively disabling debug access. Getting the device into bootloader mode (BOOT0/BOOT1 pins) and erasing the application with the Flash Loader Demonstrator usually helps. I'd recommend to review the usage of the involved debug pins, and possibly elude to alternatives for your application.2014-02-09 07:31 AM
Ok, I will trie this.
Thanks.2014-02-09 10:43 AM
That or it puts the board/chip in low power mode.
2014-02-16 09:10 AM
Hello, i find !!!
on my board the USB_DISCONNECT pin isn't wirred, i have juste a jumper. So usb was always connect and (why???) disconnect debugger. now i desable jumper , lauch debuger, enable jumper and I can use debuger normaly. Thanks. @+2014-02-20 11:37 AM
hello,
now all work fine. I use ST's UsbHidDemonstrator software to toggle leds and get button's status . i would creat my soft but i found any example, tuto... to work with stm32. so i tried to modify microchip's pc hid exemple, succesless. shall exist UsbHidDemonstrator's sources or another ? thanks.2014-02-22 07:14 AM
> But I can't use my debugger
It was once discussed on this topic, https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FUSB%20CDC%20on%20STM32L%20device%20%20unable%20to%20connect%20to%20host As the default behavior, STSW-STM32121 (STM32_USB-FS-Device_Lib_V4.0.0) drops the entire system into STOP mode, while USB is suspending. This STOP mode disturbs debug session. You may temporarily change this behavior by dropping CNTR_SUSPM and CNTR_ESOFM from IMR_MSK() definition in usb_conf.hSTM32_USB-FS-Device_Lib_V4.0.0/Projects/Virtual_COM_Port/inc/usb_conf.h
/* IMR_MSK */
/* mask defining which events has to be handled */
/* by the device application software */
// #define IMR_MSK (CNTR_CTRM | CNTR_WKUPM | CNTR_SUSPM | CNTR_ERRM | CNTR_SOFM \
// | CNTR_ESOFM | CNTR_RESETM )
// Disable Suspend/Resume response completely
#define IMR_MSK (CNTR_CTRM | CNTR_WKUPM | CNTR_ERRM | CNTR_SOFM | CNTR_RESETM )
> so i tried to modify microchip's pc hid exemple, succesless.
Did you send
Feature report of this format?
- The first byte: 0x01 (report ID)
- The second byte: bitmap of LEDs status
Refer to
- UM0424: User manual - STM32 USB-FS-Device development kit
5.3 Custom HID implementation - 5.3.1 LED contrrol
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/CD00158pdf
OR, the report descriptor of the example.
Tsuneo
2014-02-22 11:42 AM
very thanks for your reply.
I will modify my usbconf.h finaly i find usb hid demonstrator source :''C:\Program Files (x86)\STMicroelectronics\Software\USB HID Demonstrator\src''.