cicciocb / Annex32_examples

MIT License
0 stars 0 forks source link

Implement the pin drive capability #21

Closed cicciocb closed 1 month ago

cicciocb commented 1 month ago

This is a feature available for the ESP32

typedef enum { GPIO_DRIVE_CAP_0 = 0, /!< Pad drive capability: weak / GPIO_DRIVE_CAP_1 = 1, /!< Pad drive capability: stronger / GPIO_DRIVE_CAP_2 = 2, /!< Pad drive capability: medium / GPIO_DRIVE_CAP_DEFAULT = 2, /!< Pad drive capability: medium / GPIO_DRIVE_CAP_3 = 3, /!< Pad drive capability: strongest / GPIO_DRIVE_CAP_MAX, } gpio_drive_cap_t;

/Set GPIO pad drive capability / gpio_set_drive_capability((gpio_num_t)pin, (gpio_drive_cap_t)value );

cicciocb commented 1 month ago

Implemented the function

PIN.STRENGTH pin_nb, drive_cap

DB9JG commented 1 month ago

This feature could be the very last resort for a hardware issue with an ESP32 driving a peripheral component that needs unexpected amount of current

cicciocb commented 1 month ago

This has been implemented in the version 1.53.3. In fact I found the interest into implementing this feature for exactly the opposite reason. The reason ? The noise, a pin with too much strength that carries an high frequency signal generates a lot of EMI, in particular on the board itself. I found this issue when I designed a PCB for the VGA, solved reducing the strength from 3 to 0

DB9JG commented 1 month ago

Well, that is interesting indeed! I'll have to keep that in mind for future layouts and/or possible talkover between parallel wires. Thanks!

DB9JG commented 1 month ago

Forgot to introduce myself: DB9JG==PeterN But I guess you already knew :-))

cicciocb commented 1 month ago

Implemented the function in the version 1.53.3

PIN.STRENGTH pin_nb, drive_cap

cicciocb commented 1 month ago

The help must be updated