The problem is due to pin multiplexing (pinmux) on the RK3588. A physical pin can perform only one function at a time. Looking at your pinout:
| Header Pin | GPIO | Available Functions |
|---|---|---|
| 17 | GPIO1_D0 | UART6_TX / SPI1_MISO_M2 / I2C7 |
| 18 | GPIO1_D1 | UART6_RX / SPI1_MOSI_M2 / I2C7 |
| 19 | GPIO1_D3 | PWM1_M1 / UART4_RX / SPI1_CS0_M2 |
| 20 | GPIO1_D2 | PWM0_M1 / UART4_TX / SPI1_CLK_M2 |
You are currently using:
- Pin 19 → PWM1_M1
- Pin 20 → PWM0_M1
But SPI1 requires:
- Pin 17 → MISO
- Pin 18 → MOSI
- Pin 19 → CS0
- Pin 20 → CLK
So Pin 19 and Pin 20 cannot be PWM and SPI at the same time. The hardware cannot route both functions simultaneously. Kindly give me solution for this.