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.
Hello
A customer has a design using the RM48L952ZWT where we are using all GPIO of Port A and B and need a few additional I/O pins.
We are using both N2HET's - 6 pins on each, and were wondering if we could use the unused N2HET pins as GPIO.
This was an assumption from page 23 of SPNS177 – Table 2-25 – The description indicates “N2HET1 time input capture or output compare, or GIO”.
The PinMux indicates which peripheral terminal/function can be selected for a specific Pin. The particular function a peripheral terminal performs is down to the configuration of the peripheral.
Having looked a bit further, I think the N2HET outputs can be used by the N2HET processor as GIO etc as required, but cannot be accessed by anything else directly. Some of the N2HET outputs are “hardwired” to device pins whilst others go through the Pin mux.
I notice from HalCoGen that other interfaces – CAN, SPI5, have a port configuration tab which allows the pin to be configured as a GIO which I believe the processor can access. Hence we are considering the use of SPI5 pins to provide the additional GIO functionality required.
Could you confirm this is correct. Otherwise, how can we get additional GIO pins.
Many Thanks
Bob Bacon
Hi Bob,
Both NHET and SPI can be used as GPIO.
The NHET module has special registers (from 0x4C to 0x5C) to use the port as GIO and no NHET program is necessary to use them as GIO. If you are using HalCoGen, you can use the GIO drivers of HalCoGen for this purpose.The following Code will set the HET pin 0..5 as output, and than set pin 0 to high.
gioSetDirection(hetPORT, 0x0000003FU);
gioSetPort(hetPORT, 0x00000001U);
To use SPI pin as GIO, you need configure those pins as GIO in SPIPC0 register.
Regards,
QJ