Hi I have an input pin that I suspect is pulled to the wrong state due to noise. I have no way to measure the pin since it's burried in inner layers of the PCB The pin frequency is max 100kHz and I have input filtering (derived from the CPU clock frequency) on the pin so I know the frequency is lower than about 10MHz So I have two ways forward: 1: Make a loop to capture the input pin, store that in RAM, and at a trigger event, stop that capture, and send it all via a UART to a PC for analysis. I can overclock the CPU to run above specified 32MHz to capture this possible event if needed... 2: Use the internal ETM (Embedded Trace Macrocell) to store to the PC runtime in the Keil uVision environment with ULink2 debugger. "2" is simpler, but anyone know how fast the ETM runs on a ST Cortex M3 (STM32L151) and is it with fixed interval sampling? Regards Klaus
Debug Speed of ETM Trace for Debugging IO
Started by ●April 3, 2013
Reply by ●April 4, 20132013-04-04
Kvik <klaus.kragelund@gmail.com> writes:> Hi > > I have an input pin that I suspect is pulled to the wrong state due to > noise. I have no way to measure the pin since it's burried in inner > layers of the PCB > > The pin frequency is max 100kHz and I have input filtering (derived > from the CPU clock frequency) on the pin so I know the frequency is > lower than about 10MHz > > So I have two ways forward: > > 1: Make a loop to capture the input pin, store that in RAM, and at a > trigger event, stop that capture, and send it all via a UART to a PC > for analysis. I can overclock the CPU to run above specified 32MHz to > capture this possible event if needed... > > 2: Use the internal ETM (Embedded Trace Macrocell) to store to the PC > runtime in the Keil uVision environment with ULink2 debugger. > > "2" is simpler, but anyone know how fast the ETM runs on a ST Cortex > M3 (STM32L151) and is it with fixed interval sampling?Can't you do 1) but just examine/dump the memory directly with the debugger? Don't know anything about Keil but in gdb you can just dump an array to a file, or any debugger should let you view the array contents. -- John Devereux
Reply by ●April 4, 20132013-04-04
On Apr 4, 12:09�am, Kvik <klaus.kragel...@gmail.com> wrote:> Hi > > I have an input pin that I suspect is pulled to the wrong state due to > noise. I have no way to measure the pin since it's burried in inner > layers of the PCB > > The pin frequency is max 100kHz and I have input filtering (derived > from the CPU clock frequency) on the pin so I know the frequency is > lower than about 10MHz > > So I have two ways forward: > > 1: Make a loop to capture the input pin, store that in RAM, and at a > trigger event, stop that capture, and send it all via a UART to a PC > for analysis. I can overclock the CPU to run above specified 32MHz to > capture this possible event if needed... > > 2: Use the internal ETM (Embedded Trace Macrocell) to store to the PC > runtime in the Keil uVision environment with ULink2 debugger. > > "2" is simpler, but anyone know how fast the ETM runs on a ST Cortex > M3 (STM32L151) and is it with fixed interval sampling? > > Regards > > Klausmaybe instead of storing the pin state copy it to another pin that you can measure? -Lasse