oxplot / fpx

easy USB-C power for all your devices
https://fpx.oxplot.com
BSD 3-Clause "New" or "Revised" License
310 stars 22 forks source link

Expose profile selection #16

Closed edward-shen closed 1 year ago

edward-shen commented 3 years ago

Hey!

I was looking through PD controllers and I saw the fpx and I thought this would be a great fit for my project.

I was wondering if it's possible to expose which profile was selected, e.g. through two GPIO pins.

For context, I have some high power portions of my design that has an enable pin that's controlled by a microcontroller and needs a PD controller to negotiate additional power from the USB. If we couldn't negotiate the necessary power, I'd keep these high power portions off and just keep the microcontroller running.

If two pins were exposed (11 for profile 1, 10 for profile 2, and 01 for fallback, for example), the microcontroller would easily be able to decide to power on the high power circuits.

edward-shen commented 3 years ago

I'm not sure if this is feasible, but it looks like it might be possible to route pin 6 and 7 on the ATTiny and move over R8 and C6 to put pads on the bottom side-- it might be possible to use a through hole footprint instead.

oxplot commented 3 years ago

Thanks @edward-shen . I've already added two pads which can be programmed to do what you need: https://github.com/oxplot/fpx/issues/15

I'll add exposing selected profile as one of the config options along with things like bidirectional uart logger / controller.

oxplot commented 3 years ago

@edward-shen the current version of the board (v97) being sold on Tindie has the extra pads (but no firmware support as of now).