PROBLEM 1:
If I change a port mode like this, it works as expected and I am able to verify with a scope that the port is pulled up:
Code: Select all
palSetPadMode(GPIOF,5,PAL_MODE_INPUT_PULLUP);If I then try to do this in a for loop, the pad does not change to pullup:
Code: Select all
int32_t i=0;
for( i=0; i<16;i++);
{ palSetPadMode(GPIOF,i,PAL_MODE_INPUT_PULLUP);
}If I try to use the bus method, again, I cannot get the port to pullup:
Code: Select all
palSetBusMode(GPIOF,PAL_MODE_INPUT_PULLUP);
PROBLEM 2:
I attempted to use palReadBus(GPIOF) but it halts operation of my code. I also notice the docs that this returns a uint8_t typedef. The port I am reading is 16-bit. Can I read this in on read? If not, how do I read both halves of this bus? Really surprised it is halting the code.
I switched to using palReadGroup, but again, given the 8-bit vs 16-bit, it's just not making sense how I use it. I basically want to read all 16 bits into a 16-bit uint16_t.
Thanks!