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.

Using N2HET pins for UART communication

Other Parts Discussed in Thread: TMS570LS0432, HALCOGEN, CODECOMPOSER

Is there a comprehensive technical guide for using the HET subsystem? What is the instruction set?

I am using a TMS570LS0432, HALCoGen, FreeRTOS and CodeComposer Studio 8.1.1.

OK, my post was premature. I see in the reference manual the information that I was asking for.

I am attempting to create a second UART using HET.

But I still have a question about HALCoGen, in HET, HET1 Global Timing Configuration there is the group box: NHET Driver Settings. Some post said that I should check the Enable  Advanced Config Mode/Disable Blackox Driver. I have been unable to find that post again. Can you please explain this? I have also implemented a PWM using HET and am suing HET for GPIO ports. Will there be a conflict between the existing HET functions and the UART function?

  • Hi Ken,

    If you want to program both NHET Emulated UART code and HALCoGen generated PWM code to the NHET RAM, you need to modify "jump" address etc in the code. Otherwise, the code won't execute correctly .

    To enable advanced config mode will integrate your other NHET code (for example NHET UART) code into the het.c (memcp(...)), and add your nhet_uart.h and nhet_uart.c to your project. After you load your nhet_uart.*, the HALCoGen will not generate PWM code.
  • OK, so if I want both UART and PWM functionality from the NHET then I do not want to check "Enable Advanced Config Mode / Disable BlackBox Driver".

    You responded that I need to 'modify "jump" address, etc.' I've looked for any place that looks like a jump table and am not able to find it. Please advise where I can find the location to modify the jump address.

    Do you have any examples of NHET serving two functions?

    Thanks,

            ken

  • I can work around the PWM if I have to. I have tried to implement the HET UART. I have verified that the UART code is uploaded to HET memory at address 0xFF460000. I have placed a breakpoint by or-ing the first command with 0x00400000. The breakpoint never trips.

    What would you suggest I look at to diagnose this?
  • Hi Ken,

    Can you check if the Debug Status flag in the HETEXC2 register is cleared? The HET will issue a debug request to the CPU after the instruction with the breakpoint is executed. This will halt both the N2HET and the main CPU when a debugger is connected (nTRST is High) and both the CPU and N2HET are in "run" mode.

    Regards,
    Sunil
  • Sunil:

    Thanks for your reply. The HETEXC2 register is 0x00000000. I'm using a Launchpad TMS570LS0432 with the USB JTAG emulator so the nTRST pin should be high.

    Please note that I am using NHET[19] for TX and NHET[6] for RX.

  • 1. Open a memory window on the N2HET RAM
    2. Set bit 22 in the program field of the instruction(s) on which you wish to break. Note that this instruction will be executed before the N2HET is halted - slightly different from how CPU breakpoints behave.
    3. Make sure the CPU and N2HET are running, if they are halted then restart the CPU through the JTAG emulator (N2HET will start when the CPU starts).
    4. Both the CPU and N2HET will halt when breakpoint is reached.

    You can use any pin for TX and RX. Make sure the pinmux is set correctly to use N2HET[19].
  • QJ thank you for your reply.

    Since posting this question we have changed the chip that we were going to communicate to. The new chip is I2C. I have implemented the I2C example in HET and changed the pins to match our configuraion. My scope shows that the output is working but we do not have the chip in-house yet so I have not been able to test the RX portion of the I2C.

    Best regards,

            ken