• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Hercules™ Safety Microcontrollers » Hercules™ Safety Microcontrollers Forum » Manchester edges detector/decoder using TMS570 NHET module
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

Manchester edges detector/decoder using TMS570 NHET module

Manchester edges detector/decoder using TMS570 NHET module

This question is answered
Chuck Wong
Posted by Chuck Wong
on Jun 27 2012 15:15 PM
Expert1285 points

Hello there,

I'm new (all green) to the NHET world and would like to requst help from the community to implement my first basic high-speed serial data stream edges detector. Any help would be greatly appreciate!

I have the following .het code with design intents described in the comments at the beginning:

 

; Implementation of an 1-Mbps Manchester serial data stream edges detector

; The GCLK and HCLK are set to 100 MHz and the VCLK2 driving the NHET is 
; set to 50 Mhz, with HR=1 (20 ns) and LR=4 (80 ns)

; Using REG_A, CNT is programmed as a 25-bit free-running counter that will
; roll over to zero at predefined max value (Z_FLAG will be set for one LR)

; WCAP is used to capture the timestamp of REG_A on both falling
; and rising edges; it then triggers an HTU transfer at request number 0
; to instruct the HTU to store both the CF (edge direction) and DF (timestamp) because rising and
; falling edge status are needed to be known by the application performing
; the edges timing analysis (every 50 us)

; This program takes up 2 HR in timer mode

L00 CNT  { next=L01, reg=A, comp=EQ, irq=OFF, max=0x1FFFFFF }
L01 WCAP { next=L00, reg=A, pin=CC0, irq=OFF, event=BOTH, reqnum=0, data=0 }

 

Does this code fit my design goal?

I have to include "data=0" with the WCAP instruction since it is a required field. What am I doing here by writing 0 to the data field? How about the captured REG_A value when an edge is detected?

I planned for an asynchronous post-processing every 50 us of the captured edges+timestamps (from HTU transfers to FIFO) triggered by IRQ in the main application. Any suggestion to improve the performance or any other design idea (DMA instead of HTU) would be welcomed.

Chuck.

NHET tms570 decoder Manchester edges detector
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Kevin Lavery
    Posted by Kevin Lavery
    on Jun 28 2012 11:32 AM
    Intellectual1460 points

    Chuck,

    I think the concept is correct. Your questions:

    1.) "data" may be required for the syntax of the instruction but the data is updated from Register A on the event.

    2.) you may want to configure your wcap instruction as using high resolution which will tell you the time in terms of high resolution clocks rather than loop resolution clocks

    3.) one high level concern is over-writing your data. You expect new data at a rate slow compared to the loop timing but there may be latency in retrieving the data. I am forwarding your question on to our HET expert for his comments.

    Regards,

    Forum Support

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Chuck Wong
    Posted by Chuck Wong
    on Jun 28 2012 13:39 PM
    Expert1285 points

    Thanks Kevin for the suggestions.

    EDITED: For point 1, your answer eases my concern, but what exactly "data=" is needed for in the WCAP instruction since capture is always been made from A, B, T or NONE?

    EDITED: For point 2, "hr_lr=HIGH" will be added.

    For your point 3, I understand your concern. But in the case where input data frequency increases to the point when data loss becomes possible, there is nothing faster than the HTU anyway (I mean neither DMA neither direct CPU memory transfer). Am I correct to assume that?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Charles Tsai
    Posted by Charles Tsai
    on Jun 28 2012 14:49 PM
    Verified Answer
    Verified by Chuck Wong
    Prodigy550 points

    Hello Kevin,

      The DF and likewisethe CF and PF fields are stored in RAM. Setting data=0 will initialize the RAM content for the DF to 0. For your application, what value to initialize for the DF is not important.

    regards,

    Charles

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use