From e8312600e2e80e869fceb03463474022d004b002 Mon Sep 17 00:00:00 2001 From: kurte Date: Sun, 2 Feb 2025 15:13:13 -0800 Subject: [PATCH 1/2] GIGA: Remove Arduino pins 11-13 from PWM list to fix SPI1 resolves: #64 Removed the pins logical Arduino pins 11-13 from the PWM pin list, plus their defines for the timers. With these defines in place, the pins Alternate Function settings were set to that of the timers versus the SPI value (5) Note: This was done by @mjs513 and myself. --- loader/boards/arduino_giga_r1_m7.overlay | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/loader/boards/arduino_giga_r1_m7.overlay b/loader/boards/arduino_giga_r1_m7.overlay index 076a99c9..3555df5d 100644 --- a/loader/boards/arduino_giga_r1_m7.overlay +++ b/loader/boards/arduino_giga_r1_m7.overlay @@ -63,7 +63,7 @@ pwm1: pwm { status = "okay"; - pinctrl-0 = <&tim1_ch3_pj9 &tim1_ch1_pk1 &tim1_ch2_pj11>; + pinctrl-0 = <&tim1_ch3_pj9 &tim1_ch1_pk1>; pinctrl-names = "default"; }; }; @@ -107,21 +107,11 @@ pwm8: pwm { status = "okay"; - pinctrl-0 = <&tim8_ch1_pj8 &tim8_ch2_pj10>; + pinctrl-0 = <&tim8_ch1_pj8>; pinctrl-names = "default"; }; }; -&timers12 { - status = "okay"; - st,prescaler = <100>; - - pwm12: pwm { - status = "okay"; - pinctrl-0 = <&tim12_ch1_ph6>; - pinctrl-names = "default"; - }; -}; &pwm1 { /* Use the pwmclock node to start the clock generation */ @@ -518,10 +508,7 @@ <&pwm3 1 PWM_HZ(500) PWM_POLARITY_NORMAL>, <&pwm4 3 PWM_HZ(500) PWM_POLARITY_NORMAL>, <&pwm4 4 PWM_HZ(500) PWM_POLARITY_NORMAL>, - <&pwm1 1 PWM_HZ(5000) PWM_POLARITY_NORMAL>, - <&pwm8 2 PWM_HZ(500) PWM_POLARITY_NORMAL>, - <&pwm1 2 PWM_HZ(5000) PWM_POLARITY_NORMAL>, - <&pwm12 1 PWM_HZ(500) PWM_POLARITY_NORMAL>; + <&pwm1 1 PWM_HZ(5000) PWM_POLARITY_NORMAL>; io-channels = <&adc1 4>, <&adc1 8>, From 8428b9af6567cb553ca8a695e0d4ed3e12935a9c Mon Sep 17 00:00:00 2001 From: Kurt Eckhardt Date: Wed, 5 Mar 2025 12:31:41 -0800 Subject: [PATCH 2/2] Comment out pins we removed to allow SPI1 to work --- loader/boards/arduino_giga_r1_m7.overlay | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/loader/boards/arduino_giga_r1_m7.overlay b/loader/boards/arduino_giga_r1_m7.overlay index 3555df5d..670efa36 100644 --- a/loader/boards/arduino_giga_r1_m7.overlay +++ b/loader/boards/arduino_giga_r1_m7.overlay @@ -63,6 +63,8 @@ pwm1: pwm { status = "okay"; + /* Temporarily removed SPI1 pins */ + /* pinctrl-0 = <&tim1_ch3_pj9 &tim1_ch1_pk1 &tim1_ch2_pj11>; */ pinctrl-0 = <&tim1_ch3_pj9 &tim1_ch1_pk1>; pinctrl-names = "default"; }; @@ -107,11 +109,23 @@ pwm8: pwm { status = "okay"; + /* Temporarily removed SPI1 pins */ + /* pinctrl-0 = <&tim8_ch1_pj8 &tim8_ch2_pj10>; */ pinctrl-0 = <&tim8_ch1_pj8>; pinctrl-names = "default"; }; }; +/* Temporarily removed SPI1 pins */ +/* &timers12 { */ +/* status = "okay"; */ +/* st,prescaler = <100>; */ +/* pwm12: pwm { */ +/* status = "okay"; */ +/* pinctrl-0 = <&tim12_ch1_ph6>; */ +/* pinctrl-names = "default"; */ +/* }; */ +/*}; */ &pwm1 { /* Use the pwmclock node to start the clock generation */ @@ -508,7 +522,12 @@ <&pwm3 1 PWM_HZ(500) PWM_POLARITY_NORMAL>, <&pwm4 3 PWM_HZ(500) PWM_POLARITY_NORMAL>, <&pwm4 4 PWM_HZ(500) PWM_POLARITY_NORMAL>, - <&pwm1 1 PWM_HZ(5000) PWM_POLARITY_NORMAL>; + /* Temporarily removed SPI1 pins */ + /* <&pwm1 1 PWM_HZ(5000) PWM_POLARITY_NORMAL>, */ + /* <&pwm8 2 PWM_HZ(500) PWM_POLARITY_NORMAL>, */ + /* <&pwm1 2 PWM_HZ(5000) PWM_POLARITY_NORMAL>, */ + /* <&pwm12 1 PWM_HZ(500) PWM_POLARITY_NORMAL>; */ + <&pwm1 1 PWM_HZ(5000) PWM_POLARITY_NORMAL>; io-channels = <&adc1 4>, <&adc1 8>,