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: HTU channels other than 0 seem supported?

Part Number: RM46L852

I have a simple N2HET program with 2 PCNT lines running with HTU channel 0 working OK in 64-bit mode (with pins HR shared).

L00 PCNT { next=L01, type=rise2fall, pin=30, hr_lr=HIGH }
L01 PCNT { next=L00, type=fall2rise, pin=31, hr_lr=HIGH, reqnum=0, request=GENREQ }

But want to use 2 or more HTU requests to monitor more pins and/or make calculations simpler in the above program.

One issue is, that the HET assembler HETP.exe doesn't seem to support reqnum=1 and higher.

It generates the same code as if the request channel number is always zero. I tried both with and without the -v2 command line option:

hetp -v2 -c32 mhm_meas.het nhet1.h

=>

  .sect ".HETCODE"
    .word 0x00002E5E
    .word 0x00000000
    .word 0x00000000
    .word 0x00000000
    .word 0x00000E1F
    .word 0x08000000
    .word 0x00000000
    .word 0x00000000

AND - even if I modify the hetp generated program by adding the HTU channel number in bits [25:23] of the binary program field, the HTU requests don't come.

AND - the Lauterbach TRACE32 debugger only supports HTU channel 0 in the PER window

So many things seem to indicate only HTU request channel 0 is supported - despite the documentation claims all 8 channels can be used.

Is there a secret way to enable HTU request numbers other than zero in both HETP and the uC?

  • Hello Niels,

    1. I just did a test with hetp, it works without any problem. Please -n2 option for hetp

    This is the NHET code:

    L00 PCNT { hr_lr=HIGH,brk=OFF,next=L01,reqnum=1,request=GENREQ,type=FALL2RISE,pin=0};
    L01 PCNT { hr_lr=HIGH,brk=OFF,next=L00,reqnum=2,request=GENREQ,irq=OFF,type=RISE2FALL,pin=2};

    This is the generated c code:

    #include "std_nhet.h"

    HET_MEMORY const HET_INIT2_PST[2] =
    {

    /* L00_2 */
    {
    0x00802E00,
    0x08000000,
    0x00000000,
    0x00000000
    },

    /* L01_2 */
    {
    0x01000E42,
    0x08000000,
    0x00000000,
    0x00000000
    }
    };

    2. The HTU supports upto 8 requests. What is your configuration for HTU?

  • Hello Niels,

    I recommend you to use HET IDE for simulation and generating the *c and *.h files.