My AXON board spi1 and pwm 0_m1 on pin n0 20 is making conflict with each other

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.

@Rajat-Pathak

So, Do you want to use one SPI and two PWM at the same time !?

yes, i want to use it at same time.

Do you want 2 PWMs? or only 1?

i am using two pwm outputs. PWM0_M0 and PWM0_M1 pin 13 and 20 on board

if your application only needs 1 PWM then there is a solution, otherwise you will need adapter of some kind

Can you assist me what kind of adapter needed for same.

are you using PWM for motor controller? then I will suggest motor controller based on I2C, UART or SPI

no i am using pwm for frquency generation.It can be only generated via pwm pins.

I think then we should be better to go with i2c to pwm converter IC / module,

You can go with PCA9685 16-Channel 12-bit PWM/Servo Driver I2C Compatible with Arduino PCA9685 16-Channel 12-bit PWM/Servo Driver I2C based for Arduino [RKI-2604] - ₹445.00 : Robokits India, Easy to use, Versatile Robotics & DIY kits or similar.