MDK logic analyzer use

Publisher:VelvetDreamerLatest update time:2022-05-31 Source: eefocusKeywords:MDK Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The software logic analyzer in Keil MDK has powerful functions. It can analyze digital signals, analog signals, CPU buses (UART, IIC and other output pins), and provide a debugging function mechanism for generating custom signals such as Sin, triangle waves, acoustic signals, etc., which can all be defined.


Take the STM32 CPU in 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:

The Abstract.txt file in the open project contains the description of the project. PWM is output from PB0.8 and PB0.9. 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, choose software simulation

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

Step 4. Open 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 analyzer.

Step 5: Mask out the unused bits and display them in bit form. The configuration is shown in the figure.

Step 6. Click the "GO" button to enter full-speed operation. OK, the PWM waveform appears. Use IN and OUT to adjust the scan time, as shown below.

Keywords:MDK Reference address:MDK logic analyzer use

Previous article:The basic principle of vector network analyzer
Next article:Ground resistance tester usage and precautions

Latest Test Measurement Articles
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号