Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PeriphDrivers): Fix OWM Presence Detect Bit and GPIO Alternate Functions, Use VDDIOH by Default #811

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX32650/Include/max32650.svd
Original file line number Diff line number Diff line change
Expand Up @@ -6091,7 +6091,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX32650/Include/owm_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typedef struct {
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS 4 /**< CTRL_STAT_OD_SPEC_MODE Position */
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS)) /**< CTRL_STAT_OD_SPEC_MODE Mask */

#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 5 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 7 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS)) /**< CTRL_STAT_PRESENCE_DETECT Mask */

/**@} end of group OWM_CTRL_STAT_Register */
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX32655/Include/max32655.svd
Original file line number Diff line number Diff line change
Expand Up @@ -7216,7 +7216,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX32655/Include/owm_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typedef struct {
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS 4 /**< CTRL_STAT_OD_SPEC_MODE Position */
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS)) /**< CTRL_STAT_OD_SPEC_MODE Mask */

#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 5 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 7 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS)) /**< CTRL_STAT_PRESENCE_DETECT Mask */

/**@} end of group OWM_CTRL_STAT_Register */
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX32680/Include/max32680.svd
Original file line number Diff line number Diff line change
Expand Up @@ -7152,7 +7152,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX32680/Include/owm_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typedef struct {
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS 4 /**< CTRL_STAT_OD_SPEC_MODE Position */
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS)) /**< CTRL_STAT_OD_SPEC_MODE Mask */

#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 5 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 7 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS)) /**< CTRL_STAT_PRESENCE_DETECT Mask */

/**@} end of group OWM_CTRL_STAT_Register */
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX78000/Include/max78000.svd
Original file line number Diff line number Diff line change
Expand Up @@ -7262,7 +7262,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX78000/Include/owm_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typedef struct {
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS 4 /**< CTRL_STAT_OD_SPEC_MODE Position */
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS)) /**< CTRL_STAT_OD_SPEC_MODE Mask */

#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 5 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 7 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS)) /**< CTRL_STAT_PRESENCE_DETECT Mask */

/**@} end of group OWM_CTRL_STAT_Register */
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX78002/Include/max78002.svd
Original file line number Diff line number Diff line change
Expand Up @@ -11112,7 +11112,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/CMSIS/Device/Maxim/MAX78002/Include/owm_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ typedef struct {
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS 4 /**< CTRL_STAT_OD_SPEC_MODE Position */
#define MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_OD_SPEC_MODE_POS)) /**< CTRL_STAT_OD_SPEC_MODE Mask */

#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 5 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS 7 /**< CTRL_STAT_PRESENCE_DETECT Position */
#define MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT ((uint32_t)(0x1UL << MXC_F_OWM_CTRL_STAT_PRESENCE_DETECT_POS)) /**< CTRL_STAT_PRESENCE_DETECT Mask */

/**@} end of group OWM_CTRL_STAT_Register */
Expand Down
4 changes: 0 additions & 4 deletions Libraries/PeriphDrivers/Source/OWM/owm_me17.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ int MXC_OWM_Init(const mxc_owm_cfg_t *cfg)
return E_NULL_PTR;
}

// Set system level configurations
mxc_gpio_regs_t *gpio = gpio_cfg_owm.port;

MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_OWIRE);
gpio->vssel |= gpio_cfg_owm.mask; // 1-Wire pins need to be at 3.3V.

if ((err = MXC_GPIO_Config(&gpio_cfg_owm)) != E_NO_ERROR) {
return err;
Expand Down
4 changes: 0 additions & 4 deletions Libraries/PeriphDrivers/Source/OWM/owm_me18.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ int MXC_OWM_Init(const mxc_owm_cfg_t *cfg)
return E_NULL_PTR;
}

// Set system level configurations
mxc_gpio_regs_t *gpio = gpio_cfg_owm.port;

MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_OWIRE);
gpio->vssel |= gpio_cfg_owm.mask; // 1-Wire pins need to be at 3.3V.

if ((err = MXC_GPIO_Config(&gpio_cfg_owm)) != E_NO_ERROR) {
return err;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/OWM/owm_reva_ai87.svd
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/OWM/owm_reva_me10.svd
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/OWM/owm_reva_me17.svd
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<field>
<name>presence_detect</name>
<description>Presence Pulse Detected.</description>
<bitRange>[5:5]</bitRange>
<bitRange>[7:7]</bitRange>
<access>read-only</access>
</field>
</fields>
Expand Down
5 changes: 3 additions & 2 deletions Libraries/PeriphDrivers/Source/SYS/pins_ai87.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ const mxc_gpio_cfg_t gpio_cfg_i2s0 = { MXC_GPIO1, (MXC_GPIO_PIN_2 | MXC_GPIO_PIN
const mxc_gpio_cfg_t gpio_cfg_i2s0_extclk = { MXC_GPIO0, (MXC_GPIO_PIN_14), MXC_GPIO_FUNC_ALT2,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };

// 1-Wire pins need to be at 3.3V so that MXC_GPIO_VSSEL_VDDIOH is selected.
const mxc_gpio_cfg_t gpio_cfg_owm = { MXC_GPIO0, (MXC_GPIO_PIN_6 | MXC_GPIO_PIN_7), MXC_GPIO_FUNC_ALT2,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIOH, MXC_GPIO_DRVSTR_0 };
const mxc_gpio_cfg_t gpio_cfg_owmb = { MXC_GPIO0, (MXC_GPIO_PIN_18 | MXC_GPIO_PIN_19), MXC_GPIO_FUNC_ALT2,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIOH, MXC_GPIO_DRVSTR_0 };

const mxc_gpio_cfg_t gpio_cfg_rtcsqw = { MXC_GPIO3, MXC_GPIO_PIN_1, MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
Expand Down
1 change: 1 addition & 0 deletions Libraries/PeriphDrivers/Source/SYS/pins_me10.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ const mxc_gpio_cfg_t gpio_cfg_sdhc_1 = { MXC_GPIO1, (MXC_GPIO_PIN_0 | MXC_GPIO_P
MXC_GPIO_PIN_4 | MXC_GPIO_PIN_5 | MXC_GPIO_PIN_6), MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };

// 1-Wire pins need to be at 3.3V so that MXC_GPIO_VSSEL_VDDIOH is selected.
const mxc_gpio_cfg_t gpio_cfg_owm = { MXC_GPIO1, (MXC_GPIO_PIN_30 | MXC_GPIO_PIN_31), MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIOH, MXC_GPIO_DRVSTR_0 };

Expand Down
7 changes: 5 additions & 2 deletions Libraries/PeriphDrivers/Source/SYS/pins_me17.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ const mxc_gpio_cfg_t gpio_cfg_pt2 = { MXC_GPIO0, MXC_GPIO_PIN_16, MXC_GPIO_FUNC_
const mxc_gpio_cfg_t gpio_cfg_pt3 = { MXC_GPIO0, MXC_GPIO_PIN_17, MXC_GPIO_FUNC_ALT2,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };

const mxc_gpio_cfg_t gpio_cfg_owm = { MXC_GPIO0, (MXC_GPIO_PIN_6 | MXC_GPIO_PIN_7), MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
// 1-Wire pins need to be at 3.3V so that MXC_GPIO_VSSEL_VDDIOH is selected.
const mxc_gpio_cfg_t gpio_cfg_owm = { MXC_GPIO0, (MXC_GPIO_PIN_6 | MXC_GPIO_PIN_7), MXC_GPIO_FUNC_ALT2,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIOH, MXC_GPIO_DRVSTR_0 };
const mxc_gpio_cfg_t gpio_cfg_owmb = { MXC_GPIO0, (MXC_GPIO_PIN_18 | MXC_GPIO_PIN_19), MXC_GPIO_FUNC_ALT2,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIOH, MXC_GPIO_DRVSTR_0 };

const mxc_gpio_cfg_t gpio_cfg_adc_ain0 = { MXC_GPIO2, MXC_GPIO_PIN_0, MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
Expand Down
5 changes: 4 additions & 1 deletion Libraries/PeriphDrivers/Source/SYS/pins_me18.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,11 @@ const mxc_gpio_cfg_t gpio_cfg_pt14 = { MXC_GPIO2, MXC_GPIO_PIN_28, MXC_GPIO_FUNC
const mxc_gpio_cfg_t gpio_cfg_pt15 = { MXC_GPIO2, MXC_GPIO_PIN_12, MXC_GPIO_FUNC_ALT2,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };

// 1-Wire pins need to be at 3.3V so that MXC_GPIO_VSSEL_VDDIOH is selected.
const mxc_gpio_cfg_t gpio_cfg_owm = { MXC_GPIO0, (MXC_GPIO_PIN_7 | MXC_GPIO_PIN_8), MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIOH, MXC_GPIO_DRVSTR_0 };
const mxc_gpio_cfg_t gpio_cfg_owmb = { MXC_GPIO1, (MXC_GPIO_PIN_30 | MXC_GPIO_PIN_31), MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIOH, MXC_GPIO_DRVSTR_0 };

const mxc_gpio_cfg_t gpio_cfg_adc_ain0 = { MXC_GPIO3, MXC_GPIO_PIN_0, MXC_GPIO_FUNC_ALT1,
MXC_GPIO_PAD_NONE, MXC_GPIO_VSSEL_VDDIO, MXC_GPIO_DRVSTR_0 };
Expand Down
Loading