I have a problem when switching pin modes. First, a pin is used as normal output (push/pull) and I can switch it without problems.
Then, the pin is reused as a PWM output, so it has to be changed to an alternate function pin like this:
Code: Select all
palSetLineMode(LINE_FPGA_INOUT0, PAL_MODE_ALTERNATE(2));
I get PWM output as expected. However, if I want to use the pin as normal push/pull output again, after using
Code: Select all
palSetLineMode(LINE_FPGA_INOUT0, PAL_MODE_OUTPUT_PUSHPULL);
I cannot switch the pin manually anymore. Am I missing something? Why can it not be switched back to a normal push/pull pin again?
Thanks in advance,
Adrian