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.

TMS570LS3137 NHET Pin read

Other Parts Discussed in Thread: HALCOGEN

Hello,

I am using KEIL and I am trying to use a simple NHET pin read. It supposes to be straightforward using hetREG1->DIN;  My system has two micros connected using N1 pin from TMS570 side.

The problem is this register shows only zeros. Even when i put 1 to N1 input.  Even all NHET registers show zeros. From FFF7 B800h to FFF7 B898h  

I suppose i am doing something wrong but the pin N1 is working as output when i set it up.

hetREG1->DCLR = 1<<15;
hetREG1->DIR |= 1<<15;

hetREG1->DSET = 1<<15;

Multiplexing is set like this

 pinMuxReg->PINMMR8 = PINMUX_BALL_N2_HET1_13 | PINMUX_BALL_G3_MIBSPI1NCS_2 | PINMUX_BALL_N1_HET1_15 | PINMUX_BALL_R8_ETMDATA_31;
  

Cheers,

Stefan

  • Hello:

    You are actually setting the pin as an output (hetREG1->DIR |= 1<<15). Could you try setting it to 0?

    Regards,

    Enrique
  • I am trying to say that is working as output like this ( hetREG1->DIR |= 1<<15) , but i don't need it as output! I need it as input hetREG1->DIN . It is not working. (hetREG1->DIR =0) i do no changed it when trying to use it as input.
  • Hello,

    I really need urgent response how to read N1 pin with function N2HET1[15]/MIBSPI1NCS[4]. It doesn't meter how to read N1 pin by N2HET1 or using MIBSPI GIO.

    The problem is I can not use TMS570 in slave mode because it can not handle very fast data transfer. Now in master mode is fine but our primary micro need to inform TMS570 when to send clocks.

    Reading this pins suppose to be really simple but so far I can not read it.


    Cheers,

    Stefan

  • Hello

    Do you see the same behavior when configuring it as MIBSPI1NCS[4] in Pinmux, configuring it as GIO in SPIPC0 (setting to 0) and configuring it as input in SPIPC1 (setting to 0)?

    When you set it up as output, do you see the pin being handled by the micro?

    Regards,

    Enrique
  • Hi,

    I am using SPI function MIBSPI1NCS[4] as GPIO and is working properly using spiREG1->PC2 to read.

    I still can not understand why HET1 register show only zeros or how can HET1.15 can be output and same time spiREG1->PC2 is reading from this pin. Something is not quite right with this functionality but important thing is working right now somehow.

    Best Regards,
    Stefan
  • Stefan,

    Please make sure that the clocks to the N2HET module are enabled via the PCR PSPWRDNCLR registers. This is normally done in the start-up sequence. Without the input clock running, the pin level is not captured in the DIN register of the N2HET (or any other module).

    Regards,
    Sunil
  • Thank you, Sunil

    All works fine now with SPI and I don't need N2HET for now.

    Cheers,
    Stefan
  • Hello,

    We still can not run N2HET for TMS570. As mention above all registers related to N2HET are read as zero. We need N2HET1[15] to generate interrupt on raising edge. I check PSPWRDNCLR and seems according documentation. We use HalCoGen to generate code and then we use it in Keil.
    Is there way to check in memory that N2HET is initialized?
    We need some demo Keil code for TMS570 that enable N2HET.

    Best Regards,
    Stefan