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.

N2HET control of I/O pin direction

I am trying to make an I/O pin on the N2HET high-end timer change its data direction between input and output during program execution. The pin direction is controlled by a configuration register

N2HET Direction Register (HETDIR) and this may be written by the main processor; however I want to control the pin directly from the N2HET program. Is it possible to write to this register from the N2HET?

Thanks for any help,

Paul

  • Hello Paul,

    No, not directly. However, you could set up an interrupt based on a specific NHET event then modify the HETDIR in the ISR. This would have some latency but would perform the desired task.

    A second possibility is to trigger a DMA transfer from the NHET program and use the DMA to write a new value into the HETDIR register. Again, there may be some latency involved but probably less than the ISR and CPU option mentioned previously.
  • Hello Chuck,
    Thanks for confirming the access to HETDIR and the suggestions for a work-around,
    Paul