tnt
01/19/2022, 1:03 PMTim Edwards
01/19/2022, 2:13 PMgpio_control_block
module. As you noted above, the DM setting that enables pull-up or pull-down has to be combined with OEB set to zero and the output value set to 1 (pullup) or 0 (pulldown). gpio_control_block.v
line 239 specifically overrides the output value appropriately for pullup or pulldown function.
The caveats are: (1) There is no equivalent override for OEB, mainly because it's just a configuration bit; and (2) There is no automatic override of the output value for user, as opposed to management, pullup or pulldown mode. Number (2) seems to be an oversight, while (1) is intentional.
Conclusions: (1) The bit definitions for GPIO_MODE_[USER/MGMT]_STD_INPUT_[PULLUP/PULLDOWN] all need to clear bit one or else the function won't work properly. That means the definitions should be fixed as follows:
#define GPIO_MODE_MGMT_STD_INPUT_PULLDOWN 0x0801
#define GPIO_MODE_MGMT_STD_INPUT_PULLUP 0x0c01
#define GPIO_MODE_USER_STD_INPUT_PULLDOWN 0x0800
#define GPIO_MODE_USER_STD_INPUT_PULLUP 0x0c00
And (2), For the two user modes, the output must be set appropriately to 0 for pulldown function and 1 for pullup function, and this oversight should be corrected for the next version of caravel/caravan.Tim Edwards
01/19/2022, 2:14 PMtnt
01/19/2022, 2:36 PMtnt
01/19/2022, 3:03 PMTim Edwards
01/19/2022, 3:11 PMTim Edwards
01/19/2022, 3:29 PMtnt
01/19/2022, 3:36 PMtnt
01/19/2022, 3:36 PMTim Edwards
01/19/2022, 3:39 PMtnt
01/19/2022, 3:42 PMTim Edwards
01/19/2022, 5:55 PMLinen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.
Powered by