This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTI example_dwwd of halcogen

Other Parts Discussed in Thread: HALCOGEN

Hi, 

I am using example file example_dwwd from halcogen to toggle a GIO port.

The maximum frequency i am able to get is 500khz by changing the compare0 value.

I need to generate at a higher frequency upto 10Mhz. 

How can i modify the code to do that ??

Thanks !!

  • That's not the right way to get a 10MHz signal.

    The CPU is optimized for computation, so fast access to flash and SRAM that are tightly coupled.
    IO accesses take longer. And you don't want to use a Cortex R to wiggle an IO pin at 10MHz.
    (much cheaper ways to solve that problem).

    You can get a 10MHz output but you need to use one of the timers and even then 10MHz is pretty fast
    so to do this with HET you need a very tight, custom program. You might be able to do w. the ECLK output
    if you program the correct divider or some other program.

    Anyway the example you are starting from is not an example showing how to get a periodic output.
    It's showing how to service the digital watchdog in a periodic interrupt routine and the IO pin toggle is just
    for demonstrating that the event occurs if you run on a demo board w. an LED on this IO pin.

    You should look at the HET or the ePWM examples or better play w. the ECLK pin.
  • Thank you so much for your response :)

    Is there any example code to use ECLK pin or can you provide some more insight on how to get digital output using ECLK pin.

    Thanks

    Neeraj
  • Hello,

    I have been able to generate the digital signal using ePwm module of Hercules micro controller.
    I have one more question for you.

    Actually, i am generating these digital signals to send through tx pin of CAN transceiver and see the response on rx pin of same transceiver.
    I have to compare these values bit-by-bit.
    I am thinking to read back the tx values on some pin of this microcontroller and then compare both tx and rx.
    But, i am not sure i will be able to read back through rx pin on such high frequency (approx 10Mhz).

    If i could do that, i also don't know the way of doing this.
    Can you please guide me in this regard and if there is some other way i would like to know.


    Thanks,

    Neeraj
  • Hi Neeraj,

    I'm not sure either - 10MHz is pushing it for a typical CAN transceiver / bus.
    You can post on the e2e.ti.com/.../ forum if you want some suggestions.
    Normally CAN tops out at 1MHz.

    Trying to send/receive serial data w. a timer at 10MHz is probably not the best idea if it's binary encoded.
    If you have some sort of pulse width encoding scheme and 10MHz is just your sample rate maybe that's fine.

    Can't really offer much guidance other than this - sorry.

    PS The ECLK pin is just a clock output of the device. You cannot do anything other than generate a fixed, periodic clock with this pin (or use it as GIO but in that case you're not going to get anywhere near 10MHz!)


    -Anthony
  • Hi Anthony,

    Thanks for your support.

    Neeraj