Sysprogs forums › Forums › VisualGDB › STM32 frequency floats when debugging
- This topic has 25 replies, 2 voices, and was last updated 4 years, 2 months ago by support.
-
AuthorPosts
-
September 13, 2020 at 16:14 #29054VladTParticipant
I use Preview 7 build 3703 and see the following picture: when starting in debug mode, the processor frequency clearly floats … Compilation to release works fine … How to debug, for example, USB devices, if in debug mode the device gives “Failure to request a USB descriptor device. ” ???
- This topic was modified 4 years, 3 months ago by VladT.
- This topic was modified 4 years, 3 months ago by VladT.
Attachments:
You must be logged in to view attached files.September 13, 2020 at 16:17 #29058supportKeymasterHi,
Please let us know the email associated with your license key so that we could check your support status.
September 13, 2020 at 22:44 #29059VladTParticipantat the moment the support period has ended … the manager has requested an invoice for an extension … waiting …
By the way, along the way, the question is – is there a discount on the extension? or is it like buying a new license?September 14, 2020 at 00:03 #29060VladTParticipantI added an email to my profile … the first where is registered and the second is my personal
September 14, 2020 at 08:41 #29064supportKeymasterSorry, we could not find any licenses associated with your company domain name.
If you know your previous license key, please forward it to our support and we will link it to your forum profile.
Edit: thanks for sending us your key information. We have linked it to your profile. Please use this link to renew your support and we will help you troubleshoot this.
- This reply was modified 4 years, 3 months ago by support.
September 23, 2020 at 07:13 #29086VladTParticipantwe renewed the license …
September 23, 2020 at 08:51 #29087supportKeymasterThanks for renewing your license. Regarding the frequency, most likely the program triggers several breakpoints before the USB requests get properly handled.
Please try removing all the breakpoints and make sure the device responds to the USB requests. If it still doesn’t work, please try programming the FLASH memory without debugging, restart the device, make sure it is recognized, and then try attaching to it as shown here: https://visualgdb.com/tutorials/arm/attach/
If attaching a debugger breaks further USB functionality, please try connecting to the device using the native debugger tool (e.g. ST-Link tool or J-Link Commander) instead. If this also breaks the USB functionality, most likely the board has insufficient power, or has some wiring issues.
September 24, 2020 at 01:29 #29089VladTParticipantPlease read the first post of the branch … The configuration release works … The debug does not work … What does the power have to do with it? There are no breakpoints … Now I made a special connection to the release as advised – nothing was broken in the work …. I compile this project in Keil and everything works fine … The problem with USB and the frequency drop occurs only in debug mode …
September 24, 2020 at 01:32 #29090VladTParticipantThe fact is that the project is quite loaded with functionality. More than 10 streams on FreeRTOS. How does it affect it?
September 24, 2020 at 01:48 #29091VladTParticipantA short description of my project:
CPU = STM32F427
LAN + USB (VirtualCOM port) + 8UART
The device receives a packet from the network, exchanges data on ports and sends the received data to the LAN. Additionally, an exchange can be made via USB with the desired uart …
September 24, 2020 at 08:24 #29093supportKeymasterIn order to avoid additional clarification steps and get relevant help faster, please consider following our problem reporting guidelines. As your initial report compared debugging a debug configuration vs. running a release one, we assumed that the problem is caused by using a debugger. If running the debug build without debugging doesn’t work either (and release one works), most likely the lower optimization level of the debug build causes some kind of error (e.g. a stack overflow, memory corruption, or a timing bug). Please consider manually overriding the optimization level of the Debug configuration to match the Release configuration. If it helps, you can try changing optimization level for individual files, until you can find a specific file triggering the problem.
The Keil compiler is very different from GCC, so it is completely expected that switching a large project between the compilers would require some additional troubleshooting. If you prefer, you can configure VisualGDB to use the Keil compiler as well: https://visualgdb.com/tutorials/arm/keil/
September 24, 2020 at 15:33 #29101VladTParticipantOkay. In the first message, I did not have enough information (Now I can say that there is another similar project where I observe the same picture … the same CPU + LwIP + CAN … On the CAN bus I observe a three-fold frequency drop …
The initialization code CAN is where I experimentally selected a divider that allows you to work in debug mode … I selected the divider using an oscilloscope …
For some reason, the Keil compiler does not want to be used. I only use it for checking. Before the errors occurred, both projects were originally written in VisualGDB + CubeMX.
static void MX_CAN1_Init(void) { hcan1.Instance = CAN1; #ifdef DEBUG hcan1.Init.Prescaler = 8; #else hcan1.Init.Prescaler = 21; #endif hcan1.Init.Mode = CAN_MODE_NORMAL; hcan1.Init.SyncJumpWidth = CAN_SJW_1TQ; ......... }
September 24, 2020 at 15:39 #29104supportKeymasterThanks, this makes sense. If the frequency is configured conditionally based on the DEBUG macro, it will indeed show different results in Debug and Release builds.
September 24, 2020 at 15:41 #29105VladTParticipantover the weekend I will try to make a demo (my cut-down project with CAN) to reproduce the error you have …
September 24, 2020 at 15:43 #29106 -
AuthorPosts
- You must be logged in to reply to this topic.