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.

RM46L852: RM46L852

Part Number: RM46L852
Other Parts Discussed in Thread: HALCOGEN,

Hello,

I want to use N2HET1_1 to control rs485 module. I want to use it as output and to write 0 or 1 depending on my application logic.

Can you please tell how I can setup the project in halcogen and also the functions that I can use?

  • Hello,

    The N2HET is an advanced timers that provides timing functions for real time application. It can be used for PWM outputs, capture or compare inputs, or GPIO. The N2HET is especially well suited for applications requiring multiple sensor information and drive actuators with complex and accurate time pulses. If you want to send a "1" or "0" occasionally to an external device, using a GPIO may be a good option.

    The HALCoGen is able to generate code for PWM signals. The High End Timer Integrated Development Environment (HET IDE) can be used to configure and simulate the NHET Timer Co-processors.

    http://www.ti.com/tool/HET_IDE

  • you are right but for now we are using NHET1_1 later we will be using GPIO once we get the final board.
    Anyway, I got that working. Here is how our setup looks :
    we are using RM46L852 Launchpad and on top of SCI we have connected a RS485 click module by MikroElectronika (shop.mikroe.com/rs485-5v-click
    We have new issue now, the transmit and receive works fine individually. But when we try to send and receive one after another, the transmit fails to send last 2 bytes of data.
    Here is code snippet :

    while(sciIsIdleDetected(scilinREG));
    gioSetBit(hetPORT1, 1U, 1); //Used for direction control : 1 : means transmit
    while(!sciIsTxReady(scilinREG));
    sciSend(scilinREG, TSIZE1, &TEXT1[0]);
    while(sciIsIdleDetected(scilinREG));
    gioSetBit(hetPORT1, 1U, 0); //Used for direction control : 0 : means receive
    while(!sciIsRxReady(scilinREG));
    sciReceive(scilinREG,TSIZE1, &TEXT2[0]);

    Please advise.
  • No worries, the issue is resolved now. we added check for TX EMPTY (Transmitter empty flag). Its working fine now.
    Thanks!
  • Thanks Vijayendra for telling us that you have solved your problem. Please close this thread by clicking "Solved" button.