Use HIB_IO_0 as normal GPIO in DAVE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello everbody

I will specify the HIB_IO_0 pin of an XMC4400 in DAVE as a normal GPIO, because there is assembled a button and I want to use the button for a user input. As I've seen in the datasheet of the MCU and the help file for the POW001 app there is a possibility to do this. I've tried different things in DAVE but until now I can't assign any IO app to the HIB_IO_0 pin.

Can anyone help me to configure the HIB_IO_0 pin as a normal GPIO with DAVE?

Thanks and best regards
Ueli Giger
0 Likes
4 Replies
Not applicable
Hi Ueli Giger,

It seems that you are not using this button as an external wake-up signal for Externally Controlled Hibernate mode?!
Are you referring to the General Purpose Input 0 to ERU0 module? I am afraid that you may need to manually configure (HDCR.GPI0SEL=1) since it is not available in IO002 App pin selection list.

Best regards,
Zain
0 Likes
Not applicable
Hello Zain

Thanks for your answer.

Yes I want to use the HIB_IO_0 as GPIO reffering to the General Purpose Input 0 to ERU0 module.
Hmmm... So it is not possible to configure this Pin as GPIO using the DAVE Apps?

What are the steps to connect the manually configured HIB_IO_0 GPIO pin to the ERU001 App?
Is this possible or is there only the way to fully configure this manually?

Best regards,
Ueli
0 Likes
Not applicable
Hi Ueli,

Actually there are only a few registers need to be configured: HDCR, ERU0_EXISEL, ERU0_EXICONx (& ERU0_EXOCONx). For example, use ERU0.1A1 connected to SCU.HIB_SR0.
1) HDCR.GPI0SEL=1B
2) ERU0_EXISEL.EXS1A=01B
3) ERU0_EXICON1.SS=00B, ERU0_EXICON1.NA=00B
There are two options for manual configuration:
1) Use DAVE Apps IO002 (choose any of the available pin), ERU001 (& ERU002) to make the connections --> Generate DAVE code --> Change the configurations in IO002.c & MULTIPLEX.c
You may refer to "ERU001_ERU002_Example2" for the configuration details.
2) No use of DAVE Apps, just configure the relevant registers in Main.c
I haven't tried before but i think it should work. Pls give a try and let me know the outcomes, thanks.

Best regards,
Zain
0 Likes
Not applicable
Hi Zain

Thanks for your answer. I've tried it as you've described in the option 1. I've done the configuration with the ERU001, ERU002, IO002 & NVIC002 Apps and
changed the Registers as you've described above. Now I can generate an External Interrupt over the HIB_IO_0 pin.

Many thanks and best regards
Ueli
0 Likes