cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging - Save register (or variable) content to a file

Omar Suárez
Senior
Posted on March 28, 2017 at 15:10

Hi,

I would like to know whether there is any way to save the content of a register (or a variable) to a txt file in my PC for debugging porpuses (plot the data). I am using Keil uVision 5 and the STM32F769 MCU and in my case want to save the content of the DAC->DOR1 register.

Thanks in advanced,

Omar

#keil #debug #stm32f7
2 REPLIES 2
AvaTar
Lead
Posted on March 28, 2017 at 15:52

Not sure why this question is 'assumed to be answered' without any answer - I comment anyway.

Perhaps you consult the debug support documentation of Keil uVision.

I'm using Crossworks, which comes debug support functions like

debug_fopen()

and

debug_fprintf()

, which allows me to channel data from the target directly into the host file system, in a clib stdio manner.

I'm pretty sure Keil has something similar.

Be aware of bandwidth limitation, the data are streamed via the debug pod. It can easily break you application timing.

Posted on March 28, 2017 at 17:55

I assumed that this forum could not be the best place to ask the question so I marked it as answered.

Anyway, thanks for your replay!

I was looking for info in Keil forum and I came across the LogicAnalyzer, a tool that could be the easiest way to visualize data from the DAC register. The tool use the SWV to  trace the data with no processor overhead. I also found the Debug Viewer which uses the printf function to display data from the code. This could be the tools I need for debug the DAC.

Thanks again!

Omar