element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Transportation & Automotive
  • Technologies
  • More
Transportation & Automotive
Blog Create and Measure signals with Hercules High End Timer (HET) - 5: Getting Started with the Wave Form Simulator
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Transportation & Automotive to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 15 Jan 2020 10:43 PM Date Created
  • Views 1330 views
  • Likes 4 likes
  • Comments 0 comments
  • n2het
  • synapticad
  • hercules
Related
Recommended

Create and Measure signals with Hercules High End Timer (HET) - 5: Getting Started with the Wave Form Simulator

Jan Cumps
Jan Cumps
15 Jan 2020

A very simple HET example: Project1 - generate 2 PWM signals and simulate them with Synapticad Wave Viewer.

image

In the previous posts I reviewed a HET application note called HET Getting Started. This time I use another application note called HET Getting Started. That one is for the TI TMS470 family but works perfectly with the TMS570/RMxx too. It's simpler, using a few lines to generate two PWMs with same frequency and different duty cycle.

Ideal to show a simulation with Synapticad's WaveViewer - an application that you can use without cost and that integrates with the HET IDE.

 

You should read the previous post - it 'll help to understand the timer code below.

 

 

HET Code and Output Signals

 

Here's the HET code that generates the two PWMs. Line L00 is the frequency control, L01 and L02 the duty cycle managers, L03 the end of the program.

 

L00: CNT {next=L01, reg=A, irq=OFF, max=0x214A, data=0}  

; PWM (50% duty cycle)  
L01: ECMP {next=L02, reg=A, hr_lr=LOW, en_pin_action=ON, pin=CC4, action=PULSEHI, irq=Off,  data=0x10A5}  
; PWM (25% duty cycle)  
L02: ECMP {next=L03, reg=A, hr_lr=LOW, en_pin_action=ON, pin=CC6, action=PULSEHI, irq=Off,  data=0x852}  

L03: BR {next=L00, cond_addr=L00, event=NOCOND} 

 

The settings in the HET IDE and HALCoGen:

imageimage

 

The resulting signals measured on HET pins 4 and 6:

 

image

 

Simulating the HET Logic

 

In the HET IDE, the output pins are marked. I've also asked to export register A because that's used in the logic of lines L00 -> L03

 

image

 

Program is assembled, loaded, and we let it execute (I've let it run 12000 VCL2 ticks).

image

You can see the HET PFR register with the pre-scalers right under.

 

Once the IDE has executed the steps, it automatically loads another application, Synapticad Wave Viewer Free.

(The next 12 days it's called Synapticad Wave Former on my laptop. I've applied for a 15 day trial license that enables generating inputs and stimuli.)

 

Below you can see the landing page.I've zoomed out so that you can appreciate the HR vs LR clock, the code line counter and the location of pin 4 and 6.

Click to enlarge. All other captures below are zoom-ins and outs of the same stimulation.

 

image

 

Below you can see that when the zero flag ticks (L00 has reached its count), both pins 4 and 6 start a cycle.

 

image

At that same moment (this is a zoom in of the above point), register A starts over from 0. (that's what caused the z-flag to be raised).

The het loop count keeps on counting. It's the number of loops we've simulated.

image

 

The next two captures are the L01 and L02 events.

When register A reaches the compare of L01, it kicks pin 4 high. This happens at the loop resolution clock tick, because we set the hr_lr attribute to low.

image

 

The same for line L02, but at a different time (when register A reaches 0x10A5):

image

 

That's it. As usual, the Code Composer Studio, HALCoGen and HET projects are attached to the post.

 

Related Blog
1: adapt TI example to a LaunchPad
2: Generate Dynamic Duty Cycle
3: Measure a PWM Signal and HET Interrupts
4: Getting Started
5: Getting Started with the Wave Form Simulator
Attachments:
RM46_het_getting_started_SPNA069_20200115.zip
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube