Skip to content

Comments

Staging/eval adg1736#2901

Open
Voc94 wants to merge 2 commits intomainfrom
staging/eval_adg1736
Open

Staging/eval adg1736#2901
Voc94 wants to merge 2 commits intomainfrom
staging/eval_adg1736

Conversation

@Voc94
Copy link
Collaborator

@Voc94 Voc94 commented Feb 17, 2026

Pull Request Description

Add no-OS project for the EVAL-ADG1736 analog switch evaluation board on MAX32655 platform. Tests switch routing by toggling A/B positions and verifying signal output.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have complied with the Submission Checklist
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

@CLAassistant
Copy link

CLAassistant commented Feb 17, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments on my side.

* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
#ifndef COMMON_DATA_H_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double-underscore guards with a trailing comment:

  #ifndef __COMMON_DATA_H__
  #define __COMMON_DATA_H__
  ...
  #endif /* __COMMON_DATA_H__ */

@@ -0,0 +1,13 @@
INCS += $(PLATFORM_DRIVERS)/maxim_gpio.h \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here: NO_OS_INC_DIRS


pr_info("Running continuous test...\r\n\r\n");

while (1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to have error paths in the while loop such that the cleanup procedure is reached.

@Voc94 Voc94 force-pushed the staging/eval_adg1736 branch 4 times, most recently from d162a4e to 0d2adec Compare February 17, 2026 16:10
@raezt
Copy link
Collaborator

raezt commented Feb 17, 2026

Please add changelogs or how the comments were addressed after a push.

Copy link
Collaborator

@raezt raezt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments from my side.

* @brief Basic example source file for eval-adg1736 project.
* @author Alexandru Vasile Popa (Alexandruvasile.Popa@analog.com)
********************************************************************************
* Copyright 2025(c) Analog Devices, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the year is 2026 (applies to all files)

#include "no_os_gpio.h"
#include "adg1736.h"

/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move this to the documentation file?

err_uart:
no_os_uart_remove(uart);
return ret;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line at the EOF (applies to all files)

extern struct max_gpio_init_param adg1736_gpio_extra;

/*
* ADG1736 test configuration
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@Voc94 Voc94 force-pushed the staging/eval_adg1736 branch from 0d2adec to a1ec87f Compare February 18, 2026 08:28
@Voc94
Copy link
Collaborator Author

Voc94 commented Feb 18, 2026

changelog v1:

  • Changed INCS to NO_OS_INC_DIRS in src.mk and platform_src.mk
  • Fixed header guards in common_data.h (double underscore + trailing comment)
  • Deleted basic.mk (not needed, handled by build system)
  • Added error handling for adg1736_set_switch_state and no_os_gpio_get_value in while loop

changelog v2:

  • Changed copyright year 2025 → 2026 in all files
  • Moved and adapted wiring documentation from basic_example.c to README.rst(Wiring and LED feedback)
  • EOF newlines already present in all files(Github diff issue?)

@Voc94 Voc94 force-pushed the staging/eval_adg1736 branch from a1ec87f to 2643c53 Compare February 18, 2026 08:51
@Voc94
Copy link
Collaborator Author

Voc94 commented Feb 18, 2026

changelog v3:

  • Moved GPIO configuration comment from parameters.h to README.rst (renamed Wiring to GPIO Configuration)

ret = no_os_gpio_get(&led_green, &led_green_ip);
if (ret)
goto err_uart;
no_os_gpio_direction_output(led_green, NO_OS_GPIO_HIGH);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing checks.

ret = no_os_gpio_get(&led_red, &led_red_ip);
if (ret)
goto err_led_green;
no_os_gpio_direction_output(led_red, NO_OS_GPIO_HIGH);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

.extra = GPIO_EXTRA,
},
.gpio_in2 = {
.port = GPIO_IN_PORT,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, same port+pin for both gpios?


while (1) {
/* Test 1: Set to target position, S should see D (HIGH) */
ret = adg1736_set_switch_state(dev, ADG1736_SW1, target_state);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the readme states that the example can be used for SW2 too.

@Voc94 Voc94 force-pushed the staging/eval_adg1736 branch from 2643c53 to c94f35b Compare February 19, 2026 10:58
@Voc94
Copy link
Collaborator Author

Voc94 commented Feb 19, 2026

changelog v4:

  • Add missing return value checks for no_os_gpio_direction_output and no_os_gpio_direction_input
  • Add TEST_SWITCH macro to select between SW1 and SW2
  • Use separate GPIO_IN1_PORT/PIN and GPIO_IN2_PORT/PIN macros for clarity (both use the same MCU pin P1.6
    since only one switch is tested at a time - user moves wire between P11/P12)
  • Update example to use configurable switch selection instead of hardcoded ADG1736_SW1

changelog v5:

  • Add test configuration truth table showing all TEST_SWITCH/TEST_SIDE combinations
  • Document both TEST_SWITCH and TEST_SIDE macros
  • Update signal connections section with explicit macro settings for each configuration

@Voc94 Voc94 force-pushed the staging/eval_adg1736 branch from c94f35b to fe9a513 Compare February 19, 2026 11:22
@Voc94
Copy link
Collaborator Author

Voc94 commented Feb 19, 2026

changelog v6:
-Fixed adg1736_sw enum typo to adg1736_switch

Copy link
Contributor

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment on my side, otherwise lgtm.

Comment on lines 57 to 60
#define GPIO_IN1_PORT 1
#define GPIO_IN1_PIN 6
#define GPIO_IN2_PORT 1
#define GPIO_IN2_PIN 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i think we should use 2 separate hardware pins for in1 and in2

@Voc94 Voc94 force-pushed the staging/eval_adg1736 branch from fe9a513 to 0f5f8ad Compare February 20, 2026 12:41
@Voc94
Copy link
Collaborator Author

Voc94 commented Feb 20, 2026

changelog v7:

  • Changed IN2 GPIO from P1.6 to P2.0 (J9 pin 5) so IN1 and IN2 use separate pins, enabling independent control of SW1 and SW2
  • Updated README.rst GPIO configuration, truth table, and wiring examples to reflect IN2 using P2.0 instead of shared P1.6

Copy link
Contributor

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment, otherwise everything is good.

.extra = UART_EXTRA,
};

struct no_os_gpio_init_param gpio_en_ip = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since nothing else outside of this file is referencing this, make it static

Add no-OS project for the EVAL-ADG1736 evaluation board with
MAX32655FTHR platform support. The project tests the ADG1736
dual SPDT analog switch routing using GPIO signals.

Signed-off-by: Alexandru Vasile Popa <Alexandruvasile.Popa@analog.com>
Add README with hardware setup instructions, jumper configuration,
wiring connections, and build commands for the EVAL-ADG1736 project.

Signed-off-by: Alexandru Vasile Popa <Alexandruvasile.Popa@analog.com>
@Voc94 Voc94 force-pushed the staging/eval_adg1736 branch from 0f5f8ad to 39058e8 Compare February 23, 2026 12:08
@Voc94
Copy link
Collaborator Author

Voc94 commented Feb 23, 2026

changelog v8:

  • Made gpio_en_ip to static struct in common_data.c as it is only referenced in that file

@RaduSabau1
Copy link
Collaborator

The CI error seems unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants