4 Replies Latest reply on Nov 30, 2018 8:07 AM by user_342122993

    Bug - GPIO not connected correctly

    starkgj18_2016581

      So the image is my top design, I'm using PSOC creator 4.2 and play around with CY8CKIT-059 kit. I want to have the PWM output at pin 1.7. However if I only wire the output of the SR flip-flop to pin 1.7 or any pins from port 1 it will not have any output after counter is started. Chain a dummy output pin from port 3 seems allow the pin 1.7 to output, but now I have another output which I don't really want. I think this is not an intended behavuour and there should be a bug causing this, but I'm not sure where the bug is. Right now I just have to deal with a unintended output. Any ideas and suggestions would be helpful. Thanks!

        • 1. Re: Bug - GPIO not connected correctly
          user_342122993

          starkgj18,

          On KIT-059 Port 1 is somewhat special, as some of its pins are used for debugging and normally blacked out in Pins Tab. Pin 1.7 is not one of those pins. Anyway, try to change: in Design Wide Resources->System->Programming/Debugging->Debug Select set to GPIO instead of SWD+SWV.

           

          It is easier to review the whole project. To post a project do: (1) Build->Clean; (2) File->Create Archive bundle->Minimal; (3) In created archive delete a jumbo folder "Generated_Source".

           

          There is a standard PWM component (which has same core as the Counter), is there a reason to make custom PWM from the Counter?

          /odissey1

          • 2. Re: Bug - GPIO not connected correctly
            starkgj18_2016581

            Hi, thank you for the advices. The reason I did not use the standard PWM component is because I need a 32 bit counter for the PWM, while the built-in PWM component only have 16 bits maximum.

            I tried to switch the debug config to GPIO and it did not fix my problem. Actrully the same problem exist for some port 0 GPIOs as well.

            I just added the project file to this topic, try take a look. Don't worry about the UART code, you should see a square wave on pin 1.7 and pin 3.6. Then if you remove pin 3.6, the output on pin 1.7 is gone as well. Thank you!

            • 3. Re: Bug - GPIO not connected correctly
              user_246598725

              Hi starkgj,

               

              I can reproduce the issue. For a quick solution, I reduced synthesis optimization:

              With this setting, I was able to remove the additional pin. Drawback is that the hardware ressources aren't optimized, so the design will be bigger.

              I suggest that you open a support ticket about the issue and keep us updated about it.

               

              Regards

              • 4. Re: Bug - GPIO not connected correctly
                user_342122993

                starkgj18,

                I was not able to open the project in Creator 4.2. Try to re-upload.

                On the other hand, you are using output Pin with enable, which actually occupies 2 pins and has some limitations on placement. Instead, use AND gate combining the Control Register and PWM output and standard output Pin. Set pin to Strong Drive mode also.

                /odissey1