2017-02-25 04:52 PM
Hey, I got Discovery F3 board, i wanted to start project which uses I2C communication, so i enabled I2C1 peripheral and generated code for EWARM IDE using CubeMX. I uploaded code on board and pressed GO in debug options, than i press HALT in debug options and i got error 'Communication error message , Target is running, failed to stop the target. Maybe the target needs to be reset' after this error i can't upload code and i got error message 'Fatal error, ST-Line, No MCU device found Session Aborted' . (after that i need to disconnect board, if i want to upload code.)
I didn't and any code to generated code. But i find that, if i comment 'MX_I2C1_Init()' , debug works and i don't get error messages. And i tried using I2C2 peripheral and also i didnt get error messages.
If there is problem with CubeMX and its generating bad code or i have set something in options w2017-02-25 06:13 PM
Are you using pins involved in the debug connection?
2017-02-26 03:44 AM
yeah you are right, i looked it up in the datasheet and I2C1 pin is used for debug ( PA14 is connected to debug chip pin STM JTCK). Thanks for help!