CYW43907

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

cross mob
Walid
Employee
Employee
First question asked Welcome!

please see the below comments listed chronologically by a customer. any guidance will be appreciated 

  1. working with the CYW43907. I’m having some problems configuring GPIOs. There are two pins that I’m having a hard time configuring – PWM5 and I2S_MCLK0. I’m setting I2S_MCLK0 to use GPIO_23 so PWM5 has to use GPIO_8. We’re using most of the GPIO-named pins, but GPIO_9 is free. I’m following this post to try and shuffle GPIO functions around in order to use GPIO_9: https://community.infineon.com/t5/Resource-Library/CYW43907-GPIO-Explained/ta-p/246150.

I’m trying to remap GPIO pins as follows:

PIN_GPIO_8   > GPIO_16

PIN_GPIO_16 > GPIO_10

PIN_GPIO_10 > GPIO_1

PIN_GPIO_1   > GPIO_9

I’ve made some changes to the pin function selections in “platform_pinmux.c” – specifically I’ve changed a few PIN_FUNCTION_TYPE_GPIO types to PIN_FUNCTION_TYPE_UNKNOWN – in order to guide the affected GPIO pins to the alternate GPIO functions. After making these changes, I’m able to call “wiced_gpio_init” successfully for all pins. However, the remapped  GPIO pins don’t work; they only seem to work for the GPIO functions specified by the pin names. Am I misunderstanding the pin multiplexing table and the GPIO pins can only use the same as pin functions? Any thoughts about what I’m doing wrong?

  1. the work-around:

The issue has been resolved. What I found is that there are a few pins that need to initialize using one of the alternate GPIO’s, if the first one is picked, then later on there are a few that won’t have a GPIO peripheral available on the pad, so they fail to initialize. To fix this, I moved the platform_pinmux.c module up into the project level platform, and removed all but one GPIO peripheral from the pin mapping.

 

  1. Regarding the work-around that Justin mentioned – this works fine for the non-GPIO pins (like PIN_PWM5), but the GPIO pins (e.g. PIN_GPIO_0) don’t seem to work with the alternate GPIO functions that are listed in the pin multiplexing table. I need to move several of the GPIO pins to alternate GPIO functions to get a free slot for all our GPIOs.

 

0 Likes
1 Solution
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Can you remap the GPIO pins in platform.c using the structure below?

/* Platform pin mapping table. Used by WICED/platform/MCU/wiced_platform_common.c.*/
const platform_gpio_t platform_gpio_pins[]

View solution in original post

0 Likes
1 Reply
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Can you remap the GPIO pins in platform.c using the structure below?

/* Platform pin mapping table. Used by WICED/platform/MCU/wiced_platform_common.c.*/
const platform_gpio_t platform_gpio_pins[]

0 Likes