6 Replies Latest reply on Aug 6, 2019 11:28 AM by GiHe_2512991

    cyw94343wwcd1 on board initialization causes SPI pins reassigned to PWM(shared pins) to power on and off during init, how do I turn this off

    GiHe_2512991

      Sorry forgot to add the board we are working with.

       

      cyw94343wwcd1 on board initialization causes SPI pins reassigned to PWM(shared pins) to power on and off during init, how do I turn this off or /dev/null SPI so no action is taken on boot/init or reset?????

       

      This would cause motors to turn on during initialization and reset  that use these GPIO's which is not a good thing.

       

      With the CYW94343WWD1 eval board, we are having an issue on boot with the WICED_PWM_# pins we are using.  The issue is that they appear to be bound to the same GPIO pins like MICRO_SPI_MISO and others that during boot turn on and off.  These Pins are all allocatable as PWM but on initiailization they turn on and off multiple times even after a reset on the dev board.This results in these GPIO pins that are used as PWM output pins being turned on and off as well during resets, when they should not be on at all.

       

       

      CYPRESS GPIO 94343 to dev board and breakaway
      WICED SDKSTM32f411BCM94343PIN#Interface
      WICED_PWM_1WICED_GPIO_11MICRO_GPIO_021J7
      WICED_PWM_2WICED_GPIO_26MICRO_GPIO_124J7
      WICED_PWM_3WICED_GPIO_2MICRO_ADC_IN116J7
      WICED_PWM_4WICED_GPIO_3MICRO_ADC_IN215J7
      WICED_PWM_5WICED_GPIO_4MICRO_ADC_IN318J7
      WICED_PWM_6WICED_GPIO_6MICRO_SPI_SCK20J7
      WICED_PWM_7WICED_GPIO_7MICRO_SPI_MISO19J7
      WICED_PWM_8WICED_GPIO_8MICRO_SPI_MOSI22J7
      WICED_PWM_9WICED_GPIO_2MICRO_ADC_IN116J7

       

      The questions we have from this are:

       

      • Is there a way to disable signals being sent out of these GPIO pins during boot?
      • If there is a way to stop it, how do we do that?

       

      from a Prior forum question answered by Priyam_16

       

      Using cyw94343  their are only 2 PWM GPIO's assigned need more??

      This question has been Answered.

         Gillian Hernandez Level 3

       

      Hello all using cyw94343,  cypress has only 2 PWM cpio's assigned with this model,   I need to create a total of 4 - 6 to control motors, driven off this

      device.   Which libraries do   i need to add to or duplicate from give me a total 4 or 6 assignment's of  GPIO's to test this with. This being software driven are

      their specific physical  restrictions in re-using the existing non pwm GPIO's, and re-assigning them to PWM GPIO actions, it should be a library assignment and header .h

      creation or  duplication issue ??

       

      Let me know if i'm off track here    thanks ahead of time to y'all.

       

      PriyaM_16
      Correct Answer by PriyaM_16 on Jun 21, 2019 4:14 AM

       

      Hello,

       

      You can use the WICED peripheral alias given in platform.c file of your platform.

      The struct platform_pwm_peripherals[] contains configurations for different aliases provided by WICED. You can use the GPIOs mentioned in the struct as PWMs.

      1 of 1 people found this helpfulSee the answer in context

       

       

      •  
      •   

       

       

       

       

      THIS WAS THE STUCTURE OUTLINED Below,    please note that the SPI structure is also using the same GPIO's:

       

      /* PWM peripherals. Used by WICED/platform/MCU/wiced_platform_common.c */

      const platform_pwm_t platform_pwm_peripherals[] =

      {

          [WICED_PWM_1]  = {TIM3,  3, RCC_APB1Periph_TIM3,  GPIO_AF_TIM3,  &platform_gpio_pins[WICED_GPIO_11]},

          [WICED_PWM_2]  = {TIM10, 1, RCC_APB2Periph_TIM10, GPIO_AF_TIM10, &platform_gpio_pins[WICED_GPIO_26]},

          [WICED_PWM_3]  = {TIM2,  2, RCC_APB1Periph_TIM2,  GPIO_AF_TIM2,  &platform_gpio_pins[WICED_GPIO_2] }, /* or TIM5/Ch2                       */

          [WICED_PWM_4]  = {TIM2,  3, RCC_APB1Periph_TIM2,  GPIO_AF_TIM2,  &platform_gpio_pins[WICED_GPIO_3] }, /* or TIM5/Ch3, TIM9/Ch1             */

          [WICED_PWM_5]  = {TIM2,  4, RCC_APB1Periph_TIM2,  GPIO_AF_TIM2,  &platform_gpio_pins[WICED_GPIO_4] }, /* or TIM5/Ch4, TIM9/Ch2             */

          [WICED_PWM_6]  = {TIM2,  1, RCC_APB1Periph_TIM2,  GPIO_AF_TIM2,  &platform_gpio_pins[WICED_GPIO_6] }, /* or TIM2_CH1_ETR, TIM8/Ch1N        */

          [WICED_PWM_7]  = {TIM3,  1, RCC_APB1Periph_TIM3,  GPIO_AF_TIM3,  &platform_gpio_pins[WICED_GPIO_7] }, /* or TIM1_BKIN, TIM8_BKIN, TIM13/Ch1*/

          [WICED_PWM_8]  = {TIM3,  2, RCC_APB1Periph_TIM3,  GPIO_AF_TIM3,  &platform_gpio_pins[WICED_GPIO_8] }, /* or TIM8/Ch1N, TIM14/Ch1           */

          [WICED_PWM_9]  = {TIM5,  2, RCC_APB1Periph_TIM5,  GPIO_AF_TIM5,  &platform_gpio_pins[WICED_GPIO_2] }, /* or TIM2/Ch2                       */

      };

       

      /* PWM peripherals. Used by WICED/platform/MCU/wiced_platform_common.c */

      const platform_spi_t platform_spi_peripherals[] =

      {

          [WICED_SPI_1]  =

          {

              .port                  = SPI1,

              .gpio_af               = GPIO_AF_SPI1,

              .peripheral_clock_reg  = RCC_APB2Periph_SPI1,

              .peripheral_clock_func = RCC_APB2PeriphClockCmd,

              .pin_mosi              = &platform_gpio_pins[WICED_GPIO_8],

              .pin_miso              = &platform_gpio_pins[WICED_GPIO_7],

              .pin_clock             = &platform_gpio_pins[WICED_GPIO_6],

              .tx_dma =

              {

                  .controller        = DMA2,

                  .stream            = DMA2_Stream5,

                  .channel           = DMA_Channel_3,

                  .irq_vector        = DMA2_Stream5_IRQn,

                  .complete_flags    = DMA_HISR_TCIF5,

                  .error_flags       = ( DMA_HISR_TEIF5 | DMA_HISR_FEIF5 | DMA_HISR_DMEIF5 ),

              },

              .rx_dma =

              {

                  .controller        = DMA2,

                  .stream            = DMA2_Stream0,

                  .channel           = DMA_Channel_3,

                  .irq_vector        = DMA2_Stream0_IRQn,

                  .complete_flags    = DMA_LISR_TCIF0,

                  .error_flags       = ( DMA_LISR_TEIF0 | DMA_LISR_FEIF0 | DMA_LISR_DMEIF0 ),

              },

          }

      };