Skip to content

Commit

Permalink
Merge pull request #2184 from arduino/karlsoderby/giga-can-adc-fixes
Browse files Browse the repository at this point in the history
[MKC-1854] GIGA CAN / ADC fixes
  • Loading branch information
karlsoderby authored Oct 3, 2024
2 parents 7760d14 + db399ba commit f729e2a
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1001,106 +1001,111 @@ Serial1.write("Hello world!");

## Pins

The **GIGA R1** gives you access to more pins than any other Arduino board that is this accessible for makers. Many of them have special features that will be accounted for in the upcoming sections of this article. Keep reading to learn what you can do with them.

If you just need a quick overview of the pins functionality, this is a full table of all the IO pins on the **GIGA R1**

| Pin | Function | Notes |
| --- | --------- | -------------------- |
| 0 | TX | Serial communication |
| 1 | RX | Serial communication |
| 2 | PWM | PWM, Digital IO pin |
| 3 | PWM | PWM, Digital IO pin |
| 4 | PWM | PWM, Digital IO pin |
| 5 | PWM | PWM, Digital IO pin |
| 6 | PWM | PWM, Digital IO pin |
| 7 | PWM | PWM, Digital IO pin |
| 8 | PWM/SCL2 | PWM, Digital IO, I2C |
| 9 | PWM/SDA2 | PWM, Digital IO, I2C |
| 10 | PWM/CS | PWM, Digital IO, SPI |
| 11 | PWM/COPI | PWM, Digital IO, SPI |
| 12 | PWM/CIPO | PWM, Digital IO, SPI |
| 13 | PWM/SCK | PWM, Digital IO, SPI |
| 14 | TX3 | Serial communication |
| 15 | RX3 | Serial communication |
| 16 | TX2 | Serial communication |
| 17 | RX2 | Serial communication |
| 18 | TX1 | Serial communication |
| 19 | RX1 | Serial communication |
| 20 | SDA | Digital IO, I2C |
| 21 | SCL | Digital IO, I2C |
| 22 | GPIO | Digital IO pin |
| 23 | GPIO | Digital IO pin |
| 24 | GPIO | Digital IO pin |
| 25 | GPIO | Digital IO pin |
| 26 | GPIO | Digital IO pin |
| 27 | GPIO | Digital IO pin |
| 28 | GPIO | Digital IO pin |
| 29 | GPIO | Digital IO pin |
| 30 | GPIO | Digital IO pin |
| 31 | GPIO | Digital IO pin |
| 32 | GPIO | Digital IO pin |
| 33 | GPIO | Digital IO pin |
| 34 | GPIO | Digital IO pin |
| 35 | GPIO | Digital IO pin |
| 36 | GPIO | Digital IO pin |
| 37 | GPIO | Digital IO pin |
| 38 | GPIO | Digital IO pin |
| 39 | GPIO | Digital IO pin |
| 40 | GPIO | Digital IO pin |
| 41 | GPIO | Digital IO pin |
| 42 | GPIO | Digital IO pin |
| 43 | GPIO | Digital IO pin |
| 44 | GPIO | Digital IO pin |
| 45 | GPIO | Digital IO pin |
| 46 | GPIO | Digital IO pin |
| 47 | GPIO | Digital IO pin |
| 48 | GPIO | Digital IO pin |
| 49 | GPIO | Digital IO pin |
| 50 | GPIO | Digital IO pin |
| 51 | GPIO | Digital IO pin |
| 52 | GPIO | Digital IO pin |
| 53 | GPIO | Digital IO pin |
| 54 | GPIO | Digital IO pin |
| 55 | GPIO | Digital IO pin |
| 56 | GPIO | Digital IO pin |
| 57 | GPIO | Digital IO pin |
| 58 | GPIO | Digital IO pin |
| 59 | GPIO | Digital IO pin |
| 60 | GPIO | Digital IO pin |
| 61 | GPIO | Digital IO pin |
| 62 | GPIO | Digital IO pin |
| 63 | GPIO | Digital IO pin |
| 64 | GPIO | Digital IO pin |
| 65 | GPIO | Digital IO pin |
| 66 | GPIO | Digital IO pin |
| 67 | GPIO | Digital IO pin |
| 68 | GPIO | Digital IO pin |
| 69 | GPIO | Digital IO pin |
| 70 | GPIO | Digital IO pin |
| 71 | GPIO | Digital IO pin |
| 72 | GPIO | Digital IO pin |
| 73 | GPIO | Digital IO pin |
| 74 | GPIO | Digital IO pin |
| 75 | GPIO | Digital IO pin |
| A0 | Analog in | Analog In |
| A1 | Analog in | Analog In |
| A2 | Analog in | Analog In |
| A3 | Analog in | Analog In |
| A4 | Analog in | Analog In |
| A5 | Analog in | Analog In |
| A6 | Analog in | Analog In |
| A7 | Analog in | Analog In |
| A8 | Analog in | Analog In |
| A9 | Analog in | Analog In |
| A10 | Analog in | Analog In |
| A11 | Analog in | Analog In |
| A12 | DAC0 | Analog In, DAC |
| A13 | DAC1 | Analog In, DAC |
| A14 | CANRX | Analog In, CAN |
| A15 | CANTX | Analog In, CAN |


The **GIGA R1** gives you access to more pins than any other Arduino board that is this accessible for makers. Many of them have special features that will be accounted for in the upcoming sections of this article. Keep reading to learn what you can do with them.

If you just need a quick overview of the pins functionality, this is a full table of all the IO pins on the **GIGA R1**

| Pin | Function | Notes |
| --------- | --------------- | --------------------------------------- |
| D0 | TX | Serial communication |
| D1 | RX | Serial communication |
| D2 | PWM | PWM, Digital IO pin |
| D3 | PWM | PWM, Digital IO pin |
| D4 | PWM | PWM, Digital IO pin |
| D5 | PWM | PWM, Digital IO pin |
| D6 | PWM | PWM, Digital IO pin |
| D7 | PWM | PWM, Digital IO pin |
| D8 | PWM/SCL2 | PWM, Digital IO, I2C |
| D9 | PWM/SDA2 | PWM, Digital IO, I2C |
| D10 | PWM/CS | PWM, Digital IO, SPI |
| D11 | PWM/COPI | PWM, Digital IO, SPI |
| D12 | PWM/CIPO | PWM, Digital IO, SPI |
| D13 | PWM/SCK | PWM, Digital IO, SPI |
| D14 | TX3 | Serial communication |
| D15 | RX3 | Serial communication |
| D16 | TX2 | Serial communication |
| D17 | RX2 | Serial communication |
| D18 | TX1 | Serial communication |
| D19 | RX1 | Serial communication |
| D20 | SDA | Digital IO, I2C |
| D21 | SCL | Digital IO, I2C |
| D22 | GPIO | Digital IO pin |
| D23 | GPIO | Digital IO pin |
| D24 | GPIO | Digital IO pin |
| D25 | GPIO | Digital IO pin |
| D26 | GPIO | Digital IO pin |
| D27 | GPIO | Digital IO pin |
| D28 | GPIO | Digital IO pin |
| D29 | GPIO | Digital IO pin |
| D30 | GPIO | Digital IO pin |
| D31 | GPIO | Digital IO pin |
| D32 | GPIO | Digital IO pin |
| D33 | GPIO | Digital IO pin |
| D34 | GPIO | Digital IO pin |
| D35 | GPIO | Digital IO pin |
| D36 | GPIO | Digital IO pin |
| D37 | GPIO | Digital IO pin |
| D38 | GPIO | Digital IO pin |
| D39 | GPIO | Digital IO pin |
| D40 | GPIO | Digital IO pin |
| D41 | GPIO | Digital IO pin |
| D42 | GPIO | Digital IO pin |
| D43 | GPIO | Digital IO pin |
| D44 | GPIO | Digital IO pin |
| D45 | GPIO | Digital IO pin |
| D46 | GPIO | Digital IO pin |
| D47 | GPIO | Digital IO pin |
| D48 | GPIO | Digital IO pin |
| D49 | GPIO | Digital IO pin |
| D50 | GPIO | Digital IO pin |
| D51 | GPIO | Digital IO pin |
| D52 | GPIO | Digital IO pin |
| D53 | GPIO | Digital IO pin |
| D54 | GPIO | Digital IO pin |
| D55 | GPIO | Digital IO pin |
| D56 | GPIO | Digital IO pin |
| D57 | GPIO | Digital IO pin |
| D58 | GPIO | Digital IO pin |
| D59 | GPIO | Digital IO pin |
| D60 | GPIO | Digital IO pin |
| D61 | GPIO | Digital IO pin |
| D62 | GPIO | Digital IO pin |
| D63 | GPIO | Digital IO pin |
| D64 | GPIO | Digital IO pin |
| D65 | GPIO | Digital IO pin |
| D66 | GPIO | Digital IO pin |
| D67 | GPIO | Digital IO pin |
| D68 | GPIO | Digital IO pin |
| D69 | GPIO | Digital IO pin |
| D70 | GPIO | Digital IO pin |
| D71 | GPIO | Digital IO pin |
| D72 | GPIO | Digital IO pin |
| D73 | GPIO | Digital IO pin |
| D74 | GPIO | Digital IO pin |
| D75 | GPIO | Digital IO pin |
| A0 / D76 | Analog in | Analog In |
| A1 / D77 | Analog in | Analog In |
| A2 / D78 | Analog in | Analog In |
| A3 / D79 | Analog in | Analog In |
| A4 / D80 | Analog in | Analog In |
| A5 / D81 | Analog in | Analog In |
| A6 / D82 | Analog in | Analog In |
| A7 / D83 | Analog in | Analog In |
| A8 | Analog in | Analog In |
| A9 | Analog in | Analog In |
| A10 | Analog in | Analog In |
| A11 | Analog in | Analog In |
| A12 / D84 | DAC0 | Analog In, DAC |
| A13 / D85 | DAC1 | Analog In, DAC |
| D86 | RGB (red) | Only RGB, not accessible as GPIO |
| D87 | RGB (green) | Only RGB, not accessible as GPIO |
| D88 | RGB (blue) | Only RGB, not accessible as GPIO |
| D89 | SPI1 (CIPO) | SPI connector |
| D90 | SPI1 (COPI) | SPI connector |
| D91 | SPI1 (SCK) | SPI connector |
| D92 | USB Host Enable | USB-A connector, not accessible as GPIO |
| D93 | CANRX | Digital IO pin, CAN |
| D94 | CANTX | Digital IO pin, CAN |

### Analog Pins

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,32 @@ The image below shows the position of the audio pins and connectors of the GIGA

![ADC/DAC pins and connectors of the GIGA R1](assets/audio-pins.png)

The table below explains the full functionality of the listed on it; notice that some pins have more than one functionality, such as `DAC0`, `DAC1`, `CANRX`, and `CANTX`:

| Pin | Functionality |
|:-----:|:--------------:|
| A0 | ADC |
| A1 | ADC |
| A2 | ADC |
| A3 | ADC |
| A4 | ADC |
| A5 | ADC |
| A6 | ADC |
| A7 | ADC |
| A8 | ADC |
| A9 | ADC |
| A10 | ADC |
| A11 | ADC |
| DAC0 | ADC and DAC |
| DAC1 | ADC and DAC |
| CANRX | ADC and CAN RX |
| CANTX | ADC and CAN TX |
The table below explains the full functionality of the listed on it; notice that `A12` and `A13` can be used as DACs (`DAC0`, `DAC1`).

| Pin | Functionality |
| :--------: | :------------: |
| A0 | ADC |
| A1 | ADC |
| A2 | ADC |
| A3 | ADC |
| A4 | ADC |
| A5 | ADC |
| A6 | ADC |
| A7 | ADC |
| A8 | ADC |
| A9 | ADC |
| A10 | ADC |
| A11 | ADC |
| A12 / DAC0 | ADC and DAC |
| A13 / DAC1 | ADC and DAC |

Pins `A7`, `DAC0`, and `DAC1` can also be accessed via the built-in TRRS 3.5mm jack. `DAC0` is connected to ring 1 (right channel), `DAC1` is connected to the tip (left channel), and `A7` is connected to ring 2 (microphone) of the jack, as shown in the schematic below:

![GIGA R1 TRRS 3.5mm jack schematic](assets/jack-schematic-1.png)

## Analog-to-Digital Converter (ADC)

An analog-to-digital converter (ADC) is a device that converts an analog voltage, or signal, into digital data. The GIGA R1 microcontroller, the STM32H747XI, embeds three ADCs whose resolution can be configured to 8, 10, 12, 14, or 16 bits. Each ADC shares up to 20 external channels that can be accessed in the GIGA R1 board through pins `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, and `A11`; pins `DAC0`, `DAC1`, `CANRX`, and `CANTX` can also be used as ADCs.
An analog-to-digital converter (ADC) is a device that converts an analog voltage, or signal, into digital data. The GIGA R1 microcontroller, the STM32H747XI, embeds three ADCs whose resolution can be configured to 8, 10, 12, 14, or 16 bits. Each ADC shares up to 20 external channels that can be accessed in the GIGA R1 board through pins `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7`, `A8`, `A9`, `A10`, and `A11`; pins `DAC0`, `DAC1` can also be used as ADCs.

![ADC pins of the GIGA R1](assets/adcs.png)

Expand Down

0 comments on commit f729e2a

Please sign in to comment.