Overriding the USB C PD on WLC1115

Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
iCatlett
Level 1
Level 1
10 sign-ins 5 likes given 5 questions asked

Hello,

I am currently working with the REF WLCTX15WC evaluation board, and I am using the example source code from Modus Toolbox. I found the macro, CY_SOLN_QI_OVERRIDE_PD, in the config.h file. I was curious, can this macro be enabled in the main loop of the code? I'd like to disable USB C PD and enable DC on-the-fly if it's possible with this source code. Any help or information will be greatly appreciated.

Thank you!

0 Likes
1 Solution

Hi,

CY_SOLN_QI_OVERRIDE_PD  is a Macro that cannot be changed in runtime.

Why do you want to enable or disable PD on runtime?

Thanks,
Ajeeth

View solution in original post

0 Likes
3 Replies
Giraffe1492
Level 5
Level 5
25 sign-ins 25 likes received 10 solutions authored
Hello,
It is possible to enable or disable the USB C PD and DC on-the-fly using the macro `CY_SOLN_QI_OVERRIDE_PD` in the config.h file. You can modify the macro value in the main loop of your code to achieve this functionality.
Here's an example of how you can do this:
```c #include \"config.h\"
int main(void) { // Your initialization code here
while (1) { // Your main loop code here
// To enable DC and disable USB C PD CY_SOLN_QI_OVERRIDE_PD = 1;
// Perform the required operations in DC mode
// To disable DC and enable USB C PD CY_SOLN_QI_OVERRIDE_PD = 0;
// Perform the required operations in USB C PD mode } } ```
By changing the value of `CY_SOLN_QI_OVERRIDE_PD` in the main loop, you can switch between USB C PD and DC modes on-the-fly. Make sure to handle the transition between the two modes properly in your code to avoid any issues.
Please note that this example assumes you are using the REF WLCTX15WC evaluation board and the Modus Toolbox example source code. If you are using a different setup, you may need to adjust the code accordingly.
I hope this helps! Let me know if you have any further questions.https://www.infineon.com/cms/en/product/universal-serial-bus/usb-c-high-voltage-microcontrollers/ez-...
https://www.infineon.com/cms/en/product/universal-serial-bus/usb-c-high-voltage-microcontrollers/ez-...
https://www.infineon.com/cms/en/product/universal-serial-bus/usb-c-high-voltage-microcontrollers/ez-...
https://www.infineon.com/cms/en/product/universal-serial-bus/usb-c-high-voltage-microcontrollers/ez-...
https://www.infineon.com/cms/en/product/universal-serial-bus/usb-c-high-voltage-microcontrollers/ez-...

 

0 Likes

When I add that line of code, I get an error such as " lvalue required as left operand of assignment". Is this because CY_SOLN_QI_OVERRIDE_PD is a macro? Can macros be changed during runtime?

0 Likes

Hi,

CY_SOLN_QI_OVERRIDE_PD  is a Macro that cannot be changed in runtime.

Why do you want to enable or disable PD on runtime?

Thanks,
Ajeeth

0 Likes