In PEx, when I instantiate an Init_KBI component using KBI0, everything seems to work fine. However, when I select KBI1 pins, setting them to have pullups enabled does not seem to generate the correct PORT_PUE1 initialization code in "Common_Init( )" in "Cpu.h"
If I want a KBI1 input pin (for example pin PTE3) to have its internal pullup enabled, I have to remember to manually add the config such as this:
PORT_PUE1 |= PORT_PUE1_PTEPE3_MASK; at the end of Common_Init( )
Can someone confirm this?
Thank you,
-Mike Stroven
Solved! Go to Solution.
Hello Mike,
You are right the Init_KBI component does not work properly for KBI1 device (incorrect pull-ups are enabled for the KBI1 device). I have reported this issue to the Processor Expert development team (PEXMCU-4166).
Best Regards,
Marek Neuzil
Hello Mike,
You can use the PinSettings component in your project to enable the pullup of the PTE3. Open the Component Inspector of the PinSettings component, select Functional Properties, select the PTE3 pin (you can use the Pin Filter) and enable the pullup, see the following screenshot:
The Processor Expert generates the pullup initialization code in the Common_init() function.
Best Regards,
Marek Neuzil
Thank you Marek. This is a workaround, but I have two problems with it. 1) It is not required for KBI0 pins and 2) My computer hangs whenever I try to open the functional properties tab in the init component...
Hello Mike,
You are right the Init_KBI component does not work properly for KBI1 device (incorrect pull-ups are enabled for the KBI1 device). I have reported this issue to the Processor Expert development team (PEXMCU-4166).
Best Regards,
Marek Neuzil
Thank you Marek!