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 pins as simple GPIO

Other Parts Discussed in Thread: RM42L432, HALCOGEN

Hi,

I’m using RM42L432 for development of a safety related digital input module to be approved by TÜV with SIL-3.

I need to use some N2HET pins as simple GPIO. I just need to read some N2HET pins configured as pull-up inputs, and write some N2HET pins configured as pull-down outputs. All interrupts associated with these N2HET pins must be disabled.

-          8 pull-up inputs: N2HET 0, 2, 4, 6, 8, 10, 12, 14

-          8 pull-down outputs: N2HET 16, 17, 18, 19, 22, 24, 26, 28

-          All N2HET interrupts disabled

I don’t need the advanced capabilities associated with N2HET (PWM, input capture, etc). Therefore, I wouldn’t like to spend time studying how to create programs for the N2HET RAM. Is it necessary to load something to the N2HET RAM in such a simple application?

Note that TÜV guys will ask me to prove that microcode of N2HET will not interfere in my application... I would feel more comfortable with an empty N2HET program for this simple application.

I tried to use HALCOGEN (04.03.00) but I see it generated a N2HET program with 58 instructions...

What happens if I don’t initialize N2HET program after power-on?

Is it possible to enforce that N2HET program will never run, by configuring some control registers someway?

Best regards,

Osmar Brune

  • Osmar,

    If you don't want to run the HET then you can simply not call hetInit() from HalCoGen, but write to the GPIO registers in the HET directly. I think you should still be able to use HalCoGen's GIO functions in this way to set and clear pins, but you may need to add code to explicitly write to the data direction register (to pick your input and output pins) and to do anything else like change behavior of the pullups on the inputs. I don't think HalCoGen has functions for these.

    You can test this out by simply getting to main() in CCS, halt before running hetInit(), then open the register window and peek/poke at the HET GIO registers. You should see the pins respond accordingly. You'd then manipulate the pins the same way through code.