- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using a CYW43907 based radio module; What is the proper way to add functions onto pins?
A) Drive the pin directly by first initializing then toggling it.
- Initializing and driving seems to work for several GPIO pins I tried including GPIO_0, GPIO_8, GPIO_10 and GPIO_12. I can initialize these pins, toggle them, then observe the output using CYW943907AEVAL1F kit. Disclaimer: I haven’t yet observed the toggling of GPIO_8 as that signal isn’t easy to probe before it goes through a switch chip at U15.
- Initializing fails for PWM_5. Starting with TCP_Server and CYW943907AEVAL1F, attempting to initialize PWM_5 hangs the code.
Following code added to TCP_SERVER Project main.c file for CYW943907AEVAL1F.
=================================
cy_rslt_t result;
result = cyhal_gpio_init( PIN_GPIO_12, CYHAL_GPIO_DIR_OUTPUT, CYHAL_GPIO_DRIVE_STRONG, false );
if( result == CY_RSLT_SUCCESS )
printf( " PIN_GPIO_12 Initialization succeeded.\r\n" );
else printf( " PIN_GPIO_12 Initialization failed.\r\n" );
cyhal_gpio_toggle( PIN_GPIO_12 );
=================================
GPIOs 12, 10, 0 and 8 initialize and send text to terminal window on PC
Observed signals: GPIO_10 @ J12-4, GPIO_12 @ J12-5 and GPIO_0 @ J10-1 toggle as expected. I haven’t found an easy way to probe GPIO_8 before U15.
B) Drive a signal that can be multiplexed onto the pin
Since I can’t find what else is driving PWM_5, and I can’t reinitialize it, I’d like to try to multiplex onto it.
How can I re-assign PWM_5 to use it as a GPIO?
When the following code to initialize PWM_5 is active, the radio locks up. The code builds fine, programs and runs through the point where it prints “Ready to initialize PIN_PWM_5” to the terminal. Then appear to stop.
=================================
printf( " Ready to Initialize PIN_PWM_5.\r\n" );
result = cyhal_gpio_init( PIN_PWM_5, CYHAL_GPIO_DIR_OUTPUT, CYHAL_GPIO_DRIVE_STRONG, false );
if( result == CY_RSLT_SUCCESS )
printf( " PIN_PWM_5 Initialization succeeded.\r\n" );
else printf( " PIN_PWM_5 Initialization failed.\r\n" );
=================================
Is there an Application Note that describes the method to multiplex pins using ModusToolbox?
Note: I do have a separate question into the community on formart required for multiplexing @ Format of code to Multiplex pins using ModusToolbox
Greg
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @GrCa_1363456 ,
As I have already shared the format for using pins multiplex functions, you would be able to do it.
I will search for the app note for the same and will share if it is available .
Thanks,
Rakesh B G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @GrCa_1363456 ,
As I have already shared the format for using pins multiplex functions, you would be able to do it.
I will search for the app note for the same and will share if it is available .
Thanks,
Rakesh B G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any update on this issue? Did you find the app note that you referenced? Please show the files that need to be modified with an example of the necessary code changes in C. I think these might be in cyhal_pin_package.c and/or cyhal_pin_package.h. Since pin multiplexing is a significant feature of the CYW43907, and likely of interest to many developers, I feel that updating the New Application GPIO example project in ModusToolbox could benefit from this addition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @GrCa_1363456 ,
There is no app note available currently for adding functions to pins.
we will check and add the example code to use pin multiplexing in future.
Thanks,
Rakesh B G