Keil's software logic analyzer (logic analyzer) usage tutorial

Publisher:平和宽容Latest update time:2015-12-24 Source: eefocusKeywords:keil Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Keil's software logic analyzer (logic analyzer) usage tutorial  In Keil MDK, the software logic analyzer has powerful functions, which can analyze digital signals, analog signals, CPU buses (UART, IIC and other output pins), and provide debugging function mechanisms for generating custom signals, such as Sin, triangle waves, bath sound signals, etc., which can be defined.

    Take the stm32 CPU that comes with Keil as an example, track and observe the PWM waveform, open the stm32 Dome in the C:KeilARMBoardsKeilMCBSTM32PWM_2 directory, the first step: perform simulation configuration, as shown in the figure:


1.jpg 

Open the Abstract.txt file in the project with a description of the project, PWM is output from PB0.8 and PB0.9, and it will be added to the software logic analyzer later. 

The 'PWM' project is a simple program for the STM32F103RBT6 
using Keil 'MCBSTM32' Evaluation Board and demonstrating 
the use of PWM (Pulse Width Modulation) with Timer TIM4 .

Example functionality:                                                   
- Clock Settings:
   - XTAL              8.00 MHz
   - SYSCLK             72.00 MHz
   - HCLK   = SYSCLK   = 72.00 MHz
   - PCLK1   = HCLK/2   = 36.00 MHz
   - PCLK2   = HCLK   = 72.00 MHz
   - ADCLK   = PCLK2/6 = 12.00 MHz
   - SYSTICK = HCLK/8    9.00 MHz

- TIM4 is running at   100Hz.
   LEDs PB8, PB9 are dimmed using the PWM function of TIM4 channel3, channel4

The Timer program is available in different targets:
  Simulator:   - configured for software Simulator
  MCBSTM32:   - runs from Internal Flash located on chip
                 (used for production or target debugging)



Second, select software simulation

2.jpg 


Third, compile the program. If the program is correct, the following wireframe compilation information will appear, then enter debugging and click the red "D" button, as shown in the figure below

3.jpg 


Fourth, put the software logic analyzer and drag the waveform signal to be observed into the logic analyzer. If there is no "sysbols" label in the debugging state, click the "View" menu to pop up, and drag the signal to be observed from the "Peripheral Register" (the PWM signal output by GPIOB_IDR will be reflected from this register) into the logic analysis.

4.jpg 

Fifth, mask the unused bits and display them in bit form. The configuration is shown in the figure

5.jpg 

Sixth, click the "GO" button to enter full-speed operation. OK, the PWM waveform is out, and the scan time can be adjusted using IN and OUT, as shown in the figure below


6.jpg 

 
Keywords:keil Reference address:Keil's software logic analyzer (logic analyzer) usage tutorial

Previous article:Think from the perspective of the machine, how does the microcontroller execute the program
Next article:#ifdef DEBUG;debug();#endif

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号