Hello, i'm using the LPTMR as a pulse counter, but the internal pull-up is not working in this mode.
The pin I'm using is the PTE17 - ALT6 (LPTMR0_ALT3), and the pullup works fine as a GPIO, but when I change the mux to ALT6 the pin goes floating.
Here's the code:
PORT_HAL_SetPullMode(PORTE,17u,kPortPullUp);
PORT_HAL_SetPullCmd(PORTE,17u,true);
PORT_HAL_SetMuxMode(PORTE,17u,kPortMuxAlt6); /* PTE17 - ALT6 */
With an external pullup it works fine, but I need to use the internal for my hardware.
Thanks in advance.
Solved! Go to Solution.
Giancarlo
I don't have a KW01 to test on.
If you are reading the value back as expected and you are sure that there is no error in the measurement it would sound like it is not possible with that chip.
Regards
Mark
Well, should I assume this is not possible at all? Kind of disappointed.
Giancarlo
I don't have a KW01 to test on.
If you are reading the value back as expected and you are sure that there is no error in the measurement it would sound like it is not possible with that chip.
Regards
Mark
Hi
Maybe the PORT_HAL_SetMuxMode() is bad and clears the pull-up setting.
Try putting it first and see what happens.
Or just set
PORTE_PCR17 = 0x00000603; // (PORT_MUX_ALT6 | PORT_PS_UP_ENABLE)
Regards
Mark
Hello Mark,
Thanks for your reply, but it didn't work either. The pin is still floating around ~1V.
I have checked the register and it is correct (0x00000603), as you can see:
What else can it be?
Thanks.