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

cpu/msp430: Implement periph_gpio_ll & periph_gpio_ll_irq #20679

Merged
merged 6 commits into from
Aug 5, 2024

Conversation

maribu
Copy link
Member

@maribu maribu commented May 20, 2024

Contribution description

This implements GPIO LL and GPIO LL IRQ for the MSP430 support. It piggy-backs some minor changes:

  • GPIO_LL_TRIGGER_EDGE_BOTH is made optional and all previous implementations gain the periph_gpio_ll_irq_edge_triggered_both feature, as they all support both edges as trigger
  • A bug in the GPIO LL test is fixed
  • some minor cleanup in MSP430

Testing procedure

git:(cpu/msp430/periph_gpio_ll) ~/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll ➜ make BOARD=olimex-msp430-h2618 flash test-with-config
Building application "tests_gpio_ll" for "olimex-msp430-h2618" with CPU "msp430".

"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/boards/olimex-msp430-h2618
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/core
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/core/lib
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/cpu/msp430
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/cpu/msp430/periph
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/drivers
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/auto_init
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/div
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/frac
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/libc
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/malloc_thread_safe
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/newlib_syscalls_default
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/preprocessor
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/stdio
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/stdio_uart
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/test_utils/interactive_sync
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/test_utils/print_stack_usage
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/tsrb
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/ztimer
   text	  data	   bss	   dec	   hex	filename
  23773	   204	  1218	 25195	  626b	/home/maribu/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll/bin/olimex-msp430-h2618/tests_gpio_ll.elf
/home/maribu/Repos/software/RIOT/msp430-gpio-ll/dist/tools/mspdebug/mspdebug -j --expect-id "MSP430F2618" olimex "prog /home/maribu/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll/bin/olimex-msp430-h2618/tests_gpio_ll.hex"
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.15.0.1 Copyright (C) 2013 TI, Inc.

Resetting Olimex command processor...
Initializing FET...
FET protocol version is 20000007
Set Vcc: 3000 mV
Configured for JTAG (2)
Sending reset...
Using Olimex identification procedure
Device ID: 0xf26f
  Code start address: 0x3100
  Code size         : 118528 byte = 115 kb
  RAM  start address: 0x200
  RAM  end   address: 0x9ff
  RAM  size         : 2048 byte = 2 kb
Device: MSP430F2618
Number of breakpoints: 8
fet: FET returned error code 34 (Not supported by selected interface or interface is not initialized)
fet: warning: message C_IDENT3 failed
fet: FET returned NAK
warning: device does not support power profiling
Device: MSP430F2618
Erasing...
Programming...
Writing 3823 bytes at 3100...
Writing 4096 bytes at 3ff0...
Writing 4096 bytes at 4ff0...
Writing 4096 bytes at 5ff0...
Writing 4096 bytes at 6ff0...
Writing 3754 bytes at 7ff0...
Writing    6 bytes at ffe2...
Writing    4 bytes at fff0...
Writing    4 bytes at fff8...
Writing    2 bytes at fffe...
Done, 23977 bytes total
r
/home/maribu/Repos/software/RIOT/msp430-gpio-ll/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB0
Welcome to pyterm!
Type '/exit' to exit.
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: 2024.07-devel-260-g08b61-cpu/msp430/periph_gpio_ll)
Test / Hardware Details:
========================
Cabling:
(INPUT -- OUTPUT)
  P1.0 -- P1.1
  P1.2 -- P1.5
Number of pull resistor values supported: 1
Number of drive strengths supported: 1
Number of slew rates supported: 1
Valid GPIO ports:
- PORT 1 (PORT B)
- PORT 2 (PORT C)
- PORT 3 (PORT D)
- PORT 4 (PORT E)
- PORT 5 (PORT F)
- PORT 6 (PORT G)
- PORT 7 (PORT H)
- PORT 8 (PORT I)

Testing gpio_port_pack_addr()
=============================

All OK

Testing gpip_ng_init()
======================

Testing is_gpio_port_num_valid() is true for PORT_OUT and PORT_IN:

Testing input configurations for PIN_IN_0:
Support for input with pull up: yes
state: in, pull: up, value: on
Support for input with pull down: yes
state: in, pull: down, value: off
Support for input with pull to bus level: no
Support for floating input (no pull resistors): yes
state: in, pull: none, value: off

Testing output configurations for PIN_OUT_0:
Support for output (push-pull) with initial value of LOW: yes
state: out-pp, value: off
Output is indeed LOW: yes
state: out-pp, value: on
Output can be pushed HIGH: yes
Support for output (push-pull) with initial value of HIGH: yes
state: out-pp, value: on
Output is indeed HIGH: yes
Support for output (open drain with pull up) with initial value of LOW: no
Support for output (open drain with pull up) with initial value of HIGH: no
Support for output (open drain) with initial value of LOW: no
Support for output (open drain) with initial value of HIGH: no
Support for output (open source) with initial value of LOW: no
Support for output (open source) with initial value of HIGH: no
Support for output (open source with pull down) with initial value of HIGH: no
Support for output (open source with pull down) with initial value of LOW: no

Support for disconnecting GPIO: yes
state: in, pull: none, value: off
Output can indeed be pulled LOW: yes
Output can indeed be pulled HIGH: yes

Testing Reading/Writing GPIO Ports
==================================

testing initial value of 0 after init
...OK
testing setting both outputs_optional simultaneously
...OK
testing clearing both outputs_optional simultaneously
...OK
testing toggling first output (0 --> 1)
...OK
testing toggling first output (1 --> 0)
...OK
testing toggling second output (0 --> 1)
...OK
testing toggling second output (1 --> 0)
...OK
testing setting first output and clearing second with write
...OK
testing setting second output and clearing first with write
...OK
All input/output operations worked as expected

Testing External IRQs
=====================

Testing rising edge on PIN_IN_0
... OK
Testing falling edge on PIN_IN_0
... OK
Testing both edges on PIN_IN_0
... SKIPPED (not supported)
Testing masking of IRQs (still both edges on PIN_IN_0)
... OK

Testing Switching Direction
===========================

Input pin can be switched to output (push-pull) mode: yes
Pin behaves as output after switched to output mode: yes
Returning back to input had no side effects on config: yes
Pin behaves as input after switched back to input mode: yes


TEST SUCCEEDED

Issues/PRs references

Depends on and includes:

@github-actions github-actions bot added Platform: MSP Platform: This PR/issue effects MSP-based platforms Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: tests Area: tests and testing framework Area: build system Area: Build system Platform: AVR Platform: This PR/issue effects AVR-based platforms Area: drivers Area: Device drivers Area: boards Area: Board ports Platform: ESP Platform: This PR/issue effects ESP-based platforms Area: cpu Area: CPU/MCU ports labels May 20, 2024
@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: tests Area: tests and testing framework Area: build system Area: Build system Platform: AVR Platform: This PR/issue effects AVR-based platforms Area: drivers Area: Device drivers Area: boards Area: Board ports Platform: ESP Platform: This PR/issue effects ESP-based platforms labels May 20, 2024
@riot-ci
Copy link

riot-ci commented May 20, 2024

Murdock results

✔️ PASSED

fc907f9 cpu/msp430/periph_gpio: resolve conflict with GPIO LL

Success Failures Total Runtime
10197 0 10198 16m:15s

Artifacts

@maribu maribu force-pushed the cpu/msp430/periph_gpio_ll branch from 590e37e to fede31b Compare May 20, 2024 09:17
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: tests Area: tests and testing framework Area: build system Area: Build system Platform: AVR Platform: This PR/issue effects AVR-based platforms Area: drivers Area: Device drivers Area: boards Area: Board ports Platform: ESP Platform: This PR/issue effects ESP-based platforms labels May 20, 2024
@maribu maribu removed Area: tests Area: tests and testing framework Area: build system Area: Build system Area: drivers Area: Device drivers Area: boards Area: Board ports labels May 20, 2024
@maribu maribu removed Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: tests Area: tests and testing framework Area: build system Area: Build system Platform: AVR Platform: This PR/issue effects AVR-based platforms Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Aug 2, 2024
@maribu
Copy link
Member Author

maribu commented Aug 2, 2024

Test results:

MSP430 x1xxx

git:(cpu/msp430/periph_gpio_ll) ~/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll ➜ make BOARD=olimex-msp430-h1611 flash test-with-config 
Building application "tests_gpio_ll" for "olimex-msp430-h1611" with CPU "msp430".

"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/boards/olimex-msp430-h1611
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/core
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/core/lib
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/cpu/msp430
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/cpu/msp430/periph
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/drivers
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/auto_init
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/div
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/frac
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/libc
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/malloc_thread_safe
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/newlib_syscalls_default
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/preprocessor
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/stdio
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/stdio_uart
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/test_utils/interactive_sync
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/test_utils/print_stack_usage
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/tsrb
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/ztimer
   text	  data	   bss	   dec	   hex	filename
  22235	   216	  1162	 23613	  5c3d	/home/maribu/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll/bin/olimex-msp430-h1611/tests_gpio_ll.elf
/home/maribu/Repos/software/RIOT/msp430-gpio-ll/dist/tools/mspdebug/mspdebug -j --expect-id "MSP430F1611" olimex "prog /home/maribu/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll/bin/olimex-msp430-h1611/tests_gpio_ll.hex"
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.15.0.1 Copyright (C) 2013 TI, Inc.

Resetting Olimex command processor...
Initializing FET...
FET protocol version is 20000007
Set Vcc: 3000 mV
Configured for JTAG (2)
Sending reset...
Using Olimex identification procedure
Device ID: 0xf16c
  Code start address: 0x4000
  Code size         : 49152 byte = 48 kb
  RAM  start address: 0x200
  RAM  end   address: 0x9ff
  RAM  size         : 2048 byte = 2 kb
Device: MSP430F1611
Number of breakpoints: 8
fet: FET returned error code 34 (Not supported by selected interface or interface is not initialized)
fet: warning: message C_IDENT3 failed
fet: FET returned NAK
warning: device does not support power profiling
Device: MSP430F1611
Erasing...
Programming...
Writing 3813 bytes at 4000...
Writing 4096 bytes at 4ee6...
Writing 4096 bytes at 5ee6...
Writing 4096 bytes at 6ee6...
Writing 4096 bytes at 7ee6...
Writing 2238 bytes at 8ee6...
Writing    2 bytes at ffe2...
Writing    8 bytes at ffe6...
Writing    4 bytes at fff8...
Writing    2 bytes at fffe...
Done, 22451 bytes total
r
/home/maribu/Repos/software/RIOT/msp430-gpio-ll/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "9600" -ln "/tmp/pyterm-maribu" -rn "2024-08-02_15.10.01-tests_gpio_ll-olimex-msp430-h1611" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB0
Welcome to pyterm!
Type '/exit' to exit.
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: 2024.10-devel-45-gfc907-cpu/msp430/periph_gpio_ll)
Test / Hardware Details:
========================
Cabling:
(INPUT -- OUTPUT)
  P1.0 -- P1.1
  P1.2 -- P1.5
Number of pull resistor values supported: 1
Number of drive strengths supported: 1
Number of slew rates supported: 1
Valid GPIO ports:
- PORT 1 (PORT B)
- PORT 2 (PORT C)
- PORT 3 (PORT D)
- PORT 4 (PORT E)
- PORT 5 (PORT F)
- PORT 6 (PORT G)

Testing ===================

All OK

Testing gpip_ng_init()
======================

Testing is_gpio_port_num_valid() is true for PORT_OUT and PORT_IN:

Testing input configurations for PIN_IN_0:
Support for input with pull up: no
Support for input with pull down: no
Support for input with pull to bus level: no
Support for floating input (no pull resistors): yes
state: in, pull: none, value: off

Testing output configurations for PIN_OUT_0:
Support for output (push-pull) with initial value of LOW: yes
state: out-pp, value: off
Output is indeed LOW: yes
state: out-pp, value: on
Output can be pushed HIGH: yes
Support for output (push-pull) with initial value of HIGH: yes
state: out-pp, value: on
Output is indeed HIGH: yes
Support for output (open drain with pull up) with initial value of LOW: no
Support for output (open drain with pull up) with initial value of HIGH: no
Support for output (open drain) with initial value of LOW: no
Support for output (open drain) with initial value of HIGH: no
Support for output (open source) with initial value of LOW: no
Support for output (open source) with initial value of HIGH: no
Support for output (open source with pull down) with initial value of HIGH: no
Support for output (open source with pull down) with initial value of LOW: no

Support for disconnecting GPIO: yes
state: in, pull: none, value: off
WARN: Cannot enable pull down of PIN_IN_0 to verify correct disabled behavior
WARN: Cannot enable pull up of PIN_IN_0 to verify correct disabled behavior

Testing Reading/Writing GPIO Ports
==================================

testing initial value of 0 after init
...OK
testing setting both outputs_optional simultaneously
...OK
testing clearing both outputs_optional simultaneously
...OK
testing toggling first output (0 --> 1)
...OK
testing toggling first output (1 --> 0)
...OK
testing toggling second output (0 --> 1)
...OK
testing toggling second output (1 --> 0)
...OK
testing setting first output and clearing second with write
...OK
testing setting second output and clearing first with write
...OK
All input/output operations worked as expected

Testing External IRQs
=====================

Testing rising edge on PIN_IN_0
... OK
Testing falling edge on PIN_IN_0
... OK
Testing both edges on PIN_IN_0
... SKIPPED (not supported)
Testing masking of IRQs (still both edges on PIN_IN_0)
... OK

Testing Switching Direction
===========================

Input pin can be switched to output (push-pull) mode: yes
Pin behaves as output after switched to output mode: yes
Returning back to input had no side effects on config: yes
Pin behaves as input after switched back to input mode: yes


TEST SUCCEEDED

MSP430 F2xx / G2xx

git:(cpu/msp430/periph_gpio_ll) ~/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll ➜ make BOARD=olimex-msp430-h2618 flash test-with-config 
Building application "tests_gpio_ll" for "olimex-msp430-h2618" with CPU "msp430".

"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/boards/common/init
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/boards/olimex-msp430-h2618
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/core
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/core/lib
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/cpu/msp430
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/cpu/msp430/periph
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/drivers
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/drivers/periph_common
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/auto_init
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/div
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/frac
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/isrpipe
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/libc
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/malloc_thread_safe
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/newlib_syscalls_default
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/preprocessor
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/stdio
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/stdio_uart
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/test_utils/interactive_sync
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/test_utils/print_stack_usage
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/tsrb
"make" -C /home/maribu/Repos/software/RIOT/msp430-gpio-ll/sys/ztimer
   text	  data	   bss	   dec	   hex	filename
  23707	   204	  1218	 25129	  6229	/home/maribu/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll/bin/olimex-msp430-h2618/tests_gpio_ll.elf
/home/maribu/Repos/software/RIOT/msp430-gpio-ll/dist/tools/mspdebug/mspdebug -j --expect-id "MSP430F2618" olimex "prog /home/maribu/Repos/software/RIOT/msp430-gpio-ll/tests/periph/gpio_ll/bin/olimex-msp430-h2618/tests_gpio_ll.hex"
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.15.0.1 Copyright (C) 2013 TI, Inc.

Resetting Olimex command processor...
Initializing FET...
FET protocol version is 20000007
Set Vcc: 3000 mV
Configured for JTAG (2)
Sending reset...
fet: FET returned error code 11 (Could not reset device)
warning: fet: reset failed
Using Olimex identification procedure
Device ID: 0xf26f
  Code start address: 0x3100
  Code size         : 118528 byte = 115 kb
  RAM  start address: 0x200
  RAM  end   address: 0x9ff
  RAM  size         : 2048 byte = 2 kb
Device: MSP430F2618
Number of breakpoints: 8
fet: FET returned error code 34 (Not supported by selected interface or interface is not initialized)
fet: warning: message C_IDENT3 failed
fet: FET returned NAK
warning: device does not support power profiling
Device: MSP430F2618
Erasing...
Programming...
Writing 3827 bytes at 3100...
Writing 4096 bytes at 3ff4...
Writing 4096 bytes at 4ff4...
Writing 4096 bytes at 5ff4...
Writing 4096 bytes at 6ff4...
Writing 3684 bytes at 7ff4...
Writing    6 bytes at ffe2...
Writing    4 bytes at fff0...
Writing    4 bytes at fff8...
Writing    2 bytes at fffe...
Done, 23911 bytes total
r
/home/maribu/Repos/software/RIOT/msp430-gpio-ll/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200" -ln "/tmp/pyterm-maribu" -rn "2024-08-02_15.11.59-tests_gpio_ll-olimex-msp430-h2618" --no-reconnect --noprefix --no-repeat-command-on-empty-line 
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB0
Welcome to pyterm!
Type '/exit' to exit.
Help: Press s to start test, r to print it is ready
r
READY
s
START
main(): This is RIOT! (Version: 2024.10-devel-45-gfc907-cpu/msp430/periph_gpio_ll)
Test / Hardware Details:
========================
Cabling:
(INPUT -- OUTPUT)
  P1.0 -- P1.1
  P1.2 -- P1.5
Number of pull resistor values supported: 1
Number of drive strengths supported: 1
Number of slew rates supported: 1
Valid GPIO ports:
- PORT 1 (PORT B)
- PORT 2 (PORT C)
- PORT 3 (PORT D)
- PORT 4 (PORT E)
- PORT 5 (PORT F)
- PORT 6 (PORT G)
- PORT 7 (PORT H)
- PORT 8 (PORT I)

Testing gpio_port_pack_addr()
=============================

All OK

Testing gpip_ng_init()
======================

Testing is_gpio_port_num_valid() is true for PORT_OUT and PORT_IN:

Testing input configurations for PIN_IN_0:
Support for input with pull up: yes
state: in, pull: up, value: on
Support for input with pull down: yes
state: in, pull: down, value: off
Support for input with pull to bus level: no
Support for floating input (no pull resistors): yes
state: in, pull: none, value: off

Testing output configurations for PIN_OUT_0:
Support for output (push-pull) with initial value of LOW: yes
state: out-pp, value: off
Output is indeed LOW: yes
state: out-pp, value: on
Output can be pushed HIGH: yes
Support for output (push-pull) with initial value of HIGH: yes
state: out-pp, value: on
Output is indeed HIGH: yes
Support for output (open drain with pull up) with initial value of LOW: no
Support for output (open drain with pull up) with initial value of HIGH: no
Support for output (open drain) with initial value of LOW: no
Support for output (open drain) with initial value of HIGH: no
Support for output (open source) with initial value of LOW: no
Support for output (open source) with initial value of HIGH: no
Support for output (open source with pull down) with initial value of HIGH: no
Support for output (open source with pull down) with initial value of LOW: no

Support for disconnecting GPIO: yes
state: in, pull: none, value: off
Output can indeed be pulled LOW: yes
Output can indeed be pulled HIGH: yes

Testing Reading/Writing GPIO Ports
==================================

testing initial value of 0 after init
...OK
testing setting both outputs_optional simultaneously
...OK
testing clearing both outputs_optional simultaneously
...OK
testing toggling first output (0 --> 1)
...OK
testing toggling first output (1 --> 0)
...OK
testing toggling second output (0 --> 1)
...OK
testing toggling second output (1 --> 0)
...OK
testing setting first output and clearing second with write
...OK
testing setting second output and clearing first with write
...OK
All input/output operations worked as expected

Testing External IRQs
=====================

Testing rising edge on PIN_IN_0
... OK
Testing falling edge on PIN_IN_0
... OK
Testing both edges on PIN_IN_0
... SKIPPED (not supported)
Testing masking of IRQs (still both edges on PIN_IN_0)
... OK

Testing Switching Direction
===========================

Input pin can be switched to output (push-pull) mode: yes
Pin behaves as output after switched to output mode: yes
Returning back to input had no side effects on config: yes
Pin behaves as input after switched back to input mode: yes


TEST SUCCEEDED

@benpicco benpicco enabled auto-merge August 5, 2024 11:12
@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 5, 2024
@maribu maribu disabled auto-merge August 5, 2024 14:01
@maribu maribu enabled auto-merge August 5, 2024 14:02
@maribu maribu added this pull request to the merge queue Aug 5, 2024
Merged via the queue into RIOT-OS:master with commit 3735cc1 Aug 5, 2024
33 checks passed
@maribu maribu deleted the cpu/msp430/periph_gpio_ll branch August 6, 2024 04:30
@maribu
Copy link
Member Author

maribu commented Aug 6, 2024

Thx :)

@benpicco benpicco added this to the Release 2024.10 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: MSP Platform: This PR/issue effects MSP-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants