CY8CKIT-044: TCPWM.line cannot be reached from pin P6[5] (LED Blue)

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

cross mob
ZiHU_4659231
Level 1
Level 1
First like received

Hello,

I'm learning how to use CY8CKIT-044 kits according to PSoC101 training video.

(https://www.cypress.com/training/psoc-101-video-tutorial-series-how-use-arm-cortex-m0-based-psoc-4 )

I've got a problem in Leason 8:TCPWM.

The problem is that I succeed in configuring LED Red & Green with TCPWM components.

And also I have programmed my kits and proved them works well.

pastedImage_4.png

However, I failed to do the same configuration on LED Blue P6[5] and I get the errors as follows:

TCPWM.line cannot be reached from pin P6[5].

WeChat Image_20200315165014.png

I'm confused with this error. Please,Is there anyone can help me?

Best regards,

HU

0 Likes
1 Solution

In PSoC Creator 4.3, the test project allocate the pin6.5 to pwm line output, so it has the error.

But in PSoC Creator 4.2, the test project allocate the pin6.5 to pwm line_n output, so it can pass the building.

Please note that !!!!!!!!!!!!!!

pastedImage_0.png

View solution in original post

4 Replies
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Dear HU-san,

I think that you found a PSoC Creator v4.3 BUG! <= after all i t was my mistake, P6[5] can not be connected to line of PWM but line_n of PWM. (edited)

I also tried with PSoC Creator v4.3 from scratch,

I could not select P6[5] for Pin_Blue P6[5] was not in the pin list,

so I forced to select Pin No 16 but refused.

004-creator_v4.3.JPG

But as I though I used LED_BLUE before,

I tried with PSoC Creator v4.2 with following project

schematic

000-schematic.JPG

pins

Note: We can select P6[5]

001-Pins.JPG

main.c

=============

#include "project.h"

void init_hardware(void)

{

    PWM_1_Start() ;

    PWM_2_Start() ;

    PWM_3_Start() ;

}

void do_pwms(uint16_t r, uint16_t g, uint16_t b)

{

    PWM_1_WriteCompare(r) ;

    PWM_2_WriteCompare(g) ;

    PWM_3_WriteCompare(b) ;

}

int main(void)

{

    uint16_t r, g, b ;

    CyGlobalIntEnable; /* Enable global interrupts. */

 

    init_hardware() ;

    for(;;)

    {

        for (b = 0 ; b < 0x10 ;b++ ) {

            for (g = 0 ; g < 0x10 ; g++ ) {

                for (r = 0 ; r < 0x10 ; r++ ) {

                    do_pwms(r * 0x11, g * 0x11, b * 0x11) ;

                    CyDelay(10) ;

                }

            }

        }

    }

}

=============

And it worked OK.

Then I created attached project archive file

And expanded the archive somewhere else and opened with PSoC Creator v4.3.

And it could be compiled!

003-creator_v4.3_same_project.JPG

So, my conclusion is that current PSoC Creator v4.3 has a bug which does not allow to enter P6[5] for a GPIO output.

But it accepts project created with PSoC Creator v4.2.

So for the time being, I suggest you to use PSoC Creator v4.2.

And move to v4.3 when they fix this problem...

Best Regards,

15-Mar-2020

Motoo Tanaka

0 Likes

Tanaka-san,

Thanks for your reply and v4.2 also works well.

Cheers,

Zijian HU

In PSoC Creator 4.3, the test project allocate the pin6.5 to pwm line output, so it has the error.

But in PSoC Creator 4.2, the test project allocate the pin6.5 to pwm line_n output, so it can pass the building.

Please note that !!!!!!!!!!!!!!

pastedImage_0.png

MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Dear LinglingG_46-san,

Since it was a busy day, I decided to go to bed early, both my cat and I were ready to sleep.

But for the last thing of the day, I checked CDC with my iPhone and found you response!

> Please note that !!!!!!!!!!!!!!

At first, the only thing I could notice was this line.

Then slowly my brain returned from the entrance of deep sleep.

P6[5] to line and P6[5] to line_n... how it came?

Somehow I knew that the LEDs on CY8CKIT-044 were negative logic,

so I connected them to line_n.

Then how did I managed to connect these to line?

Yes, ZiHU-san was connecting LEDs to line of PWM... but I wonder if I did so...

I found my design of 200315 and yes,

I was connecting PWM line(s) to LEDS and the Project still has the error message. --- (1)

Then to recreate the project from the scratch with PSoC Creator v4.2, I connected the LEDs as usual --- (2)

So the trick took place between (1) and (2).

Anyway, my whole power sorry for this.

And thank you very much for finding this.

Oh, yes, it was the 1st of April today...

Best Regards,

1-Apr-2020

Motoo Tanaka

0 Likes