This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4376: PRU output slew rate control

Part Number: AM4376

Tool/software: Linux

Hi,

I would like to know if it is possible to control the slew rate (Fast of Slow) of GPIO when it is assigned to PRU.

In the section am43xx_pinmux of the Linux devicetree I have defined the GPIO of the PRU as follow :

/* PRUSS0 CORE0 gpio slow slew rate */
        pr0_pru0_pins: pr0_pru0_pins_default {
            pinctrl-single,pins = <
                0x190 ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (N24) mcasp0_aclkx.pr0_pru0_gpo[0] */
                0x194 ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (N22) mcasp0_fsx.pr0_pru0_gpo[1] */
                0x198 ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (H23) mcasp0_axr0.pr0_pru0_gpo[2] */
                0x19c ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (M24) mcasp0_ahclkr.pr0_pru0_gpo[3] */
                0x1a0 ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (L23) mcasp0_aclkr.pr0_pru0_gpo[4] */
                0x1a4 ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (K23) mcasp0_fsr.pr0_pru0_gpo[5] */
                0x1a8 ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (M25) mcasp0_axr1.pr0_pru0_gpo[6] */
                0x1ac ( PIN_OUTPUT | SLEWCTRL_SLOW | MUX_MODE5 ) /* (L24) mcasp0_ahclkx.pr0_pru0_gpo[7] */
            >;
        };

With this configuration I have measured a rise time of 2.4 ns on the PRU outputs.

If I use a devicetree where I did not set the SLEWCTRL_SLOW I also get a rise time around 2.3 ns.

The pru code does not performs any configuration on the ouputs and uses the register __R30 to write GPIO values.

Is it possible to set the slew rate of GPIOs when they are used by the PRU to slow and if yes could tell me how I can achieve this ?

Best regards,

Renaud