PSoC™ 4 Forum Discussions
Hi Everyone,
Please I need some help in short this is the problem
I have a global variable
int ready=0;
int *ready_p=&ready;
a part of the program must read the value of this variable inside a function while the value is 0 it will stay on a loop waiting for the task to be finished
void line(float dx, float dy){
****CALCULATIONS NOT INVOLVING VARIABLE READY
while(!*ready_p){
***UPDATE SCREEN WITH CURRENT VALUES
}
}
My program features a UDB Counter Block when the counter compare triggers the ISR sequence this function Stop() is called.
void Stop(){
PWMX_Stop(); PWMY_Stop();
disableX() disableY();
*ready_p=1;
}
I am not very clear about the pointers use.
I believe the function is not reading the global variable even if it is changed
to test the program I am working with UART at 115200
and I send the following code
G01 X# Y#
Where # is any number then the program should output a series of points on the path to the numbers that where introduced.
the problem is if the wait loop is not working the commands are not finished and a new one is sent on top
thanks for the help
I am using a PSOC4M pioneer kit
Show LessHi All,
Am using CYBLE 012012-00
I have DS1307 Tiny RTC module which I2C based from which i want get data.
Below is code snippet of my code:-
while(I2CM_I2C_MSTR_NO_ERROR != I2CM_I2CMasterStatus())
{
I2CM_I2CMasterClearStatus();
}
while (I2CM_I2C_MSTR_NO_ERROR != I2CM_I2CMasterSendStart(0x68u, 0x00u));
CyDelay(10);
while (I2CM_I2C_MSTR_NO_ERROR != I2CM_I2CMasterWriteByte(0x00u));
CyDelay(10);
while (I2CM_I2C_MSTR_NO_ERROR != I2CM_I2CMasterSendRestart(0x68u, 0x1u));
CyDelay(10);
d1 = I2CM_I2CMasterReadByte(I2CM_I2C_ACK_DATA);
d2 = I2CM_I2CMasterReadByte(I2CM_I2C_ACK_DATA);
d3 = I2CM_I2CMasterReadByte(I2CM_I2C_ACK_DATA);
d4 = I2CM_I2CMasterReadByte(I2CM_I2C_ACK_DATA);
d5 = I2CM_I2CMasterReadByte(I2CM_I2C_ACK_DATA);
d6 = I2CM_I2CMasterReadByte(I2CM_I2C_ACK_DATA);
d7 = I2CM_I2CMasterReadByte(I2CM_I2C_ACK_DATA);
d8 = I2CM_I2CMasterReadByte(I2CM_I2C_NAK_DATA);
I2CM_I2CMasterSendStop();
i am not able to go forward beyond below line:-
while (I2CM_I2C_MSTR_NO_ERROR != I2CM_I2CMasterSendStart(0x68u, 0x00u));
not sure what to do?
i am using PSOC 4 creator
I have connected pins as below:-
RTC---proc side
vcc--3.3v
gnd--gnd
scl-scl(P3[5])
sda-sda(P3[4])
have anyone configured this before please help me out
Thanks
Show LessHi everyone,
I will talk to you about my project. I use CYBLE 022001-00 module.
There are 7 peripheral (server) and 1 central(client) devices in this project.
When we summarize the working situation ;
- The client device is connects to the server devices respectively.
- Once connected to the server, it sends and receives the corresponding data.
- The current connection is disconnected.Client connects to the other server.
- Client module continuously scans 7 servers in sequence.
There are some issues with the connection
- Sometimes there is a problem with the connection.
- Normally, Client device is connects to 7 server respectively. Sometimes connects to 5 or 6 devices.
I tried many things as a solution to this problem.
What are the criteria we need to follow when module connect and disconnect?
What should we pay attention to ?
What can I do as a solution to this problem ?
Show LessI have a new board design using the CY8C4014LQI-422 24-pin QFN. We built a few dozen boards and I'm unable to get the MiniProg3 to communicate with any of them. I noticed that I had VCCD connected to VDD (the datasheet on page 7 calls pin 6 VCC rather than VCCD - it's easy to assume this is just another power pin so it might be a good correction to make in the datasheet). I also left the big center pad floating rather than grounded. I plan to change these issues in the next board spin but I made these changes on a couple boards and they still won't communicate. I'm hoping an expert might look at my schematic/layout and see something obvious that I missed (other than the VCCD issue). I've tried powering the board externally and via the programmer, and at many different clock speeds to no avail. It seems to me that there is no 1.8V output on the VCCD pin - I thought I replaced the part with a new one when I did the rework. If not, could the part have been damaged by the previous faulty power scheme?
I've developed with PSoC4 parts on several designs in the past and haven't encountered this so I'm at a bit of a loss. I'd rather not post my design files here so if someone does have the ability to look at it, let me know and I can send them.
Thanks.
Show LessWe are using a CYBLE-214009 module on a Pioneer board to test power consumption during device sleep and wakeup for Capsense touch.
I am currently using Day3 from the 100 Projects in 100 Days files.
Any help on a build to test what I am trying to verify would be helpful.
Show LessI just wanted to know if I can set the transmit interval on the E02 Solar beacons, I see that you can for the Eddystone URL config (when it is plugged in). Is that it?
Also, what is the default transmit interval?
Show LessI Have defined a Custom service "Acc", with custom characteristic "Data". This characteristic has 3 fields X,Y,Z (Readings from Accelerometer uint16).
I'm unable to figure out how to put the Readings I get into these fields. I'm looking for the specific API or set of API's that do this.
Also I also want to display the fields on my phone. What will be the best way to do that?
PFA Screenshot of this
Regards,
Viraj
Show LessHi,
Firstly, I'm pretty new on the PSOC(4) architecture so apologise in advance if this has been answered before, then just point me to the door and if possible, also send the link while you do it!
We have a project where we use all pins, and quite a few of these are button inpust so we use a Global signal, all port interrupt to give us an interrupt if any button is pressed and then wee loop through to see what button was triggering.
Due to layout constrains, the buttons are spread on all ports, and since the interrupts are port based only it's hard to make some pins come have higher priorities than the buttons. We have some signals, like over current draw, that I would like to have higher priorities than the buttons, that sits on the same port.
I then thought, lets OR the high priority interrupt signals (in our design 3) together via a 3-gate OR and then have the input feeding a separate interrupt that I can raise the interrupt priority on.
This works fine for pins on port 0 and 4 but not for one pin that happens to be on Port 8, when I try to wire this into the or gate I get "Port 8 cannot be used for routed connections".
Is there any way around this, ie can I get a separate interrupt for Port 8 pin 6 in any way, and at the same time have the port 8 interrupt for the rest of the pins?
kind regards
Hjalmar
Show LessHello,
I am using CYBLE222014 chip and MiniProg3. I want to flash the chip using MiniProg3 SWD(5pin), but i cannot toggle power of the chip. I am getting the error below:
WARNING! | Power was not toggled! Please unplug and replug the programmer into the USB port or Toggle the power again
i tried to replug but did not work.
I am getting same error when using EzBLE Module. If i connect UART0 cables, it cannot toggle power. If i remove the UART0 cables, it can toggle power.
Edit: More Information
I supply power the chip via battery,
My Programmer configuration is:
Programming mode: reset
Connector: 5p
Protocol: SWD
Voltage: 3.3V
Status Voltage changes between: 3480 - 3500mV
On right corner of the window, status shows connected and powered. When i try to flash i get new error message (i cannot still toggle power via button)
| FAILED! PSoC device is not acquired! Check connection of the chip to the programmer
|
Please, check the following items:
| - the connection between the programmer and the PSoC;
| - the correct programming protocol is selected;
| - the correct connector option is selected.
EDIT 2: I think I started to understand the programmer. I am using external power supply so i cannot toggle the power using programmer. I need to use it in Reset mode.
But still programmer can not acquire the device.
EDIT 3: Chip is working. I can scan the chip via Smart Phone.
Thanks in advance,
Mert
Show Less