Skip to content

Commit

Permalink
Modified GPIO code to prevent inadvertent low pulse when switching to…
Browse files Browse the repository at this point in the history
… Hi-Z mode.
  • Loading branch information
lorne-maxim committed Apr 29, 2024
1 parent 0d6ed2f commit 64122b0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions source/hic_hal/maxim/max32625/DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,10 @@ Disables the DAP Hardware I/O pins which configures:
*/
__STATIC_INLINE void PORT_OFF (void)
{
// Disable weak pullup in high-z output mode
MXC_GPIO_CLRBIT(swclk_port, swclk_pin);
MXC_GPIO_CLRBIT(swdio_port, swdio_pin);
MXC_GPIO_CLRBIT(nreset_port, nreset_pin);

// High-z output mode
MXC_GPIO_SETMODE(swclk_port, swclk_pin, MXC_V_GPIO_OUT_MODE_HIGH_Z_WEAK_PULLUP);
MXC_GPIO_SETMODE(swdio_port, swdio_pin, MXC_V_GPIO_OUT_MODE_HIGH_Z_WEAK_PULLUP);
MXC_GPIO_SETMODE(nreset_port, nreset_pin, MXC_V_GPIO_OUT_MODE_HIGH_Z_WEAK_PULLUP);
MXC_GPIO_SETMODE(swclk_port, swclk_pin, MXC_V_GPIO_OUT_MODE_NORMAL_HIGH_Z);
MXC_GPIO_SETMODE(swdio_port, swdio_pin, MXC_V_GPIO_OUT_MODE_NORMAL_HIGH_Z);
MXC_GPIO_SETMODE(nreset_port, nreset_pin, MXC_V_GPIO_OUT_MODE_NORMAL_HIGH_Z);
}

// SWCLK/TCK I/O pin -------------------------------------
Expand Down

0 comments on commit 64122b0

Please sign in to comment.