- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Solved! Go to Solution.
- Labels:
-
Power Management
- Tags:
- WLC1115
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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-...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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