You are here

FREE RTOS in CY8CKIT-059 I need urgent Help | Cypress Semiconductor

FREE RTOS in CY8CKIT-059 I need urgent Help

Summary: 8 Replies, Latest post by Bob Marlowe on 04 Oct 2016 06:40 AM PDT
Verified Answers: 2
Last post
Log in to post new comments.
vinay.kushwah_1925991's picture
User
22 posts

HI,

i  am following this website

https://www.element14.com/community/groups/microcontroller/blog/2016/07/...

here i am trying to add a new rtos task and want to give delay but in that  project    i am unable to modify delay.

since i am new to  psoc can you tell me how to set pin for GPIO and set delay by using programming not by  vydwr file where you just change pin button by GUI. That i do not want. I want the layer where pin no and delay can change.

Thank you

so please help me out

HIMA's picture
Cypress Employee
244 posts

Hello Vinay,

There is a function called CyDelay(), the argument is the ms delay you need. This will give delay. However please note that the delay may not be very accurate, since this is firmware implemented delay.

Thanks,

Hima

vinay.kushwah_1925991's picture
User
22 posts

But you did not tell me where to look for GPIO as i want to create 4 task where i want to assign 4 pin for digital output( FOR LED OUTPUT).

I do not want using GUI.

Example- In any microcontroller we assign  pin for output but where is that pin assign thing in PSOC5LP.

I want little deeper in control in hardware address level. where you people give address or one name for that pin. how to access that pin or change that pin as per our requirement.

 

Thank you

user_1377889's picture
User
9827 posts

"I do not want using GUI.

Example- In any microcontroller we assign  pin for output but where is that pin assign thing in PSOC5LP."

You better use the IDE which has a GUI interface to the user.

A PSoC is not "any microcontroller". As opposed to any microcontroller it contains a lot of real hardware. Though PSoC is not a FPGA, some of the internal hardware will be routed at build-time and the connections to the pins/ports are part of that process.

Yes, there is a possibility to make these connections "manually", have a short(!!) look into the PSoC5 Register TRM.

 

Bob

vinay.kushwah_1925991's picture
User
22 posts

This doc is too much deep. what i want is to blink an 4 LED(4 Task) using Free Rtos in this psoc kit. so for that i created rtos task but i do not know how to call particular pin,set that pin and making that pin high and giving some delay using CyDelay() function.

waiting for your reply

Thank you

user_1377889's picture
User
9827 posts

Use Creator 3.3 as IDE. There is a bunch of videos (each about 5 to 10 minutes) on how to use Creator. Will take you an hour to learn enough.

 

Bob

vinay.kushwah_1925991's picture
User
22 posts

Thanks for quick reply

i am sharing a simple code where can you tell me how  to assign pin one for output.

#include <project.h>

int main()
{
    CyGlobalIntEnable; /* Enable global interrupts. */

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    for(;;)
    {
        
        Pin_write(1u);
        CyDelay(500);
         Pin_write(0u);
        CyDelay(500);
        /* Place your application code here. */
    }
}

/* [] END OF FILE */

vinay.kushwah_1925991's picture
User
22 posts

for example on port 1 pin 1 how to select that as a output pin.

user_1377889's picture
User
9827 posts

You cannot do that in code as I told you in my last post. You need to do that in Creator 3.3 IDE. Did you already download and install that?

In Creator you need to drop a pin component onto your topdesign sheet and configure it  as input, output, inout etc.

You will see in the Workspace Explorer window a .cydwr file (stands for Design-Wide Resources).  When you open that file you can set your pin component to a physical pin location of your PSoC5.

 

Bob

Log in to post new comments.