PSoC™ 5, 3 & 1 Forum Discussions
Hi --
I'm working towards building a "reaction timer" application using the CY3210 eval kit w the 29466 device.
As an precursor to the goal project, I've built a project to simply read the count on a Timer16 when an external pb switch is depressed and display that count on the LCD. At this point - that's all I want to do. Once I've got that working, then I know that I understand the capture interrupt capability of the device.
The pb switch is connected between two resistors -- one of which goes to VCC, the other to ground. When the switch is not depressed (open), the output from this circuit- which is connected to P0_1 is 0V, when depressed the output is 5V. P0_1 goes to the analog_column_mux to the input of a COMPA in the analog section. The comparator_0 bus is then used as the capture input on the Timer16 module.
There's a "spin loop" in the project which is supposed to stop when the pb switch is pressed. The Timer_Interrupt ISR is supposed to read the count and set a flag to stop the spin loop. The count is to be displayed when the spin loop terminates.
That's it "in theory". In practice, however, when I push the switch, NOTHING HAPPENS. The spin loop keeps merrily counting and the interrupt is (apparently) never generated.
I've attached the project in hopes that someone can find my error.
Thanks,
SQ
Show LessI have a rather large project that I have been able to create evolving versions of by just copying the entire workspace folder. I have accumulated several versions over time this way. Now that I'm using creator 2.1 I'm getting the fitter error "Entry point was not found" whenever I try to build. There is no location for the error so I don't know where it's coming from. I've also tried "save project as" with the same result. Did something change in 2.1 that makes it difficult to copy existing projects? I'm still able to build the origninal project with no problem. Only the copy will not build.
Show LessDear all,
We have been testing a batch of PSOC3 (Silicon ID : 0x1E01E069) and 4 out of 12, we were not able to program them. The error tha we get is the 103. We have tried solving the issue by lowering the frequency of the SWD with no succes.With the PSoC programer, we are able to read the contents of the flash memory, and erase it. But, as you can see in the image, we can not program.
After looking around, we have found that when we can not program, and get the error 103, when we check the Revision of the chip it always says UNASSIGNED, but, when the PSoCs work, their Revision is PRODUCTION. Does this mean it is a silicon problem? (It can be seen in the images attached)
Is there any way of solving it?
Thanks!
Show LessI have recently got 2 product returns from a few hundred PSoC-containing devices which were sent into the field (industrial devices). In one case, an LED connected to the PSoC wasn't working, and in the other, two cap sense buttons connected to the PSoC were not working.
I've checked all the connections and determined that the microcontroller is at fault. Then I discovered that all these pins happened to be from the same port, port 12, which is SIO only. This got me thinking, because SIO supports a larger voltage range than normal GPIO, do they not have the same ESD diodes clamping the voltage is the positive direction? Thus giving the microcontroller port 12 less ESD immunity and perhaps why these pins are not working anymore.
Note that in both cases, other pins on port 12 were still working, so only the pins had fried, not the entire port.
Show LessOn my own breadboard[Cy8C3246AXA], XRES has a problem.
I was connect SW to ~XRES, Pin number 15, XRES_N
Once push the SW, ground the Pin, MCU was stopped.
But never restart even the SW was off.
System configuration / Use Optional XRES was useless.
On this chip pin #22, P1[2] is a complementaly XRES but
has same result.
How to do it? Show Less
Hi all,
In my project im using CYRF 69103, but after programming i'm not able to transmit my data to the second board. Second board also using CYRF69103. Please find my code below! Thank you!
#include <m8c.h>
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
#include "PSoCgpioint.h" // Contains GPIO interrupt definitions
#include "lpregs.h" //‘C’ defines for WUSBLP registers and register fields
#include "lpradio.h" //‘C’ function prototypes and type declarations for the entire radio driver functions implemented in lpstreaming.asm or lpnonstreaming.asm,lpradio.asm and psocradio.asm or e2radio.asm.
#include "stdlib.h" // Standard APIs supported by Image craft compiler
#include "delay.h"
//--------------------------------------
// Local Definitions and Types
//--------------------------------------
// Select channel from 0-98. Make sure even the "Receiving string using CYRF6936 and CY7C604xx" code has the same channel
#define CHANNEL 40
// Select PN code from 0-11. Make sure even the "Receiving string using CYRF6936 and CY7C604xx" code has the same PN code
#define SOP_PN_CODE 2 // 0-11
// Select one DATMODE_1MBPS | DATMODE_8DR | DATMODE_DDR | DATMODE_SDR
#define DATA_RATE DATMODE_8DR
//Sets the payload length
#define PAYLOAD_LENGTH 1
//#define RED_LED_Data_ADDR PRT0DR
//#define GRN_LED_Data_ADDR PRT0DR
#define Button_Data_ADDR PRT2DR
#define M_PWR_led_Data_ADDR PRT0DR
#define M_BUZ_Data_ADDR PRT1DR
#define S_ID 0x23
#define M_ID 0xFE
BYTE TxPayloadBuffer[PAYLOAD_LENGTH];
BYTE RxPayloadBuffer[PAYLOAD_LENGTH];
RADIO_RSSI Tx_Rx_RSSI;
WORD iDelayIndex;
RADIO_STATE LpRadioState;
unsigned char M_TX_DATA=0;
unsigned char M_RX_DATA=0;
void HardwareInit(void);
void InitialiseRadio(void);
unsigned char Call_TX(void);
unsigned char Call_RX(void);
BYTE Port_0_SHADE;
BYTE Port_1_SHADE;
void main(void)
{
// BYTE Port_0_SHADE;
// BYTE Port_1_SHADE;
Port_0_SHADE = 0;
Port_1_SHADE = 0;
M8C_EnableGInt;
SPIM_Radio_Start();
InitialiseRadio();
Port_1_SHADE &= ~M_BUZ_MASK;
M_BUZ_Data_ADDR = Port_1_SHADE;
//M_PWR_led_Data_ADDR=0x08;//ob0000 1000
Port_0_SHADE |= M_PWR_led_MASK;
M_PWR_led_Data_ADDR = Port_0_SHADE;
while(TRUE)
{
if ((Button_Data_ADDR & 0x02) == 0x00)
{
while((Button_Data_ADDR & 0x02) == 0x00);
if (Call_TX())
{
Port_1_SHADE &= ~M_BUZ_MASK;
M_BUZ_Data_ADDR = Port_1_SHADE;
}
else
{
Port_1_SHADE |= M_BUZ_MASK;
M_BUZ_Data_ADDR = Port_1_SHADE;
}
}
}
}
void InitialiseRadio(void)
{
//Variable to generate a delay.
int iDelayIndex;
// DATMODE_8DR needs a little extra time to receive the ACK. -30 dbm transmit power
RadioInit(ACK_EN | END_STATE_SLEEP | ACK_TO_15X, PA_4_DBM|
DATCODE_LEN_32 | DATMODE_8DR);
// Set the transmit frequency (2400MHz + CHANNEL)
RadioSetFrequency(CHANNEL);
// Change the PN Code for the Start of Packet
RadioSetSopPnCode(SOP_PN_CODE);
//Generate a delay so that radio gets stabilized
for(iDelayIndex = 0; iDelayIndex <30000; iDelayIndex++);
}
unsigned char Call_TX(void )
{
TxPayloadBuffer[0] = M_ID;
// Set the transmit buffer
RadioSetPtr(TxPayloadBuffer);
// Set the transmit buffer length
RadioSetLength(PAYLOAD_LENGTH);
// Start the blocking transmit
LpRadioState = RadioBlockingTransmit(2, PAYLOAD_LENGTH);
//Check if Transmit is complete
if( (LpRadioState & (RADIO_ERROR | RADIO_COMPLETE)) == RADIO_COMPLETE)
{
Port_1_SHADE &= ~M_BUZ_MASK;
M_BUZ_Data_ADDR = Port_1_SHADE;
//RED_LED_Data_ADDR &= ~RED_LED_MASK;
// Delay for user to perceive success/failure LED blink indicaiton.
//for(iDelayIndex = 0; iDelayIndex <30000; iDelayIndex++);
Delay10msTimes(100); //1 second delay;
//End the transmission
RadioEndTransmit();
return 1;
//RED_LED_Data_ADDR |= RED_LED_MASK;
}
//If transmit is not successful
else
{
Port_1_SHADE |= M_BUZ_MASK;
M_BUZ_Data_ADDR = Port_1_SHADE;
// GRN_LED_Data_ADDR &= ~GRN_LED_MASK;
// Delay for user to perceive success/failure LED blink indicaiton.
//for(iDelayIndex = 0; iDelayIndex <30000; iDelayIndex++);
Delay10msTimes(100); //1 second delay;
//End the transmission
RadioEndTransmit();
return 0;
// GRN_LED_Data_ADDR |= GRN_LED_MASK;
}
//End the transmission
// RadioEndTransmit();
//Generate a delay so that radio gets stabilized
//for(iDelayIndex = 0; iDelayIndex <30000; iDelayIndex++);
// Delay10msTimes(100);
}
unsigned char Call_RX(void)
{
//Defining a variable to store the recieved payload size of type RADIO_LENGTH
RADIO_LENGTH ReceivedPayloadSize;
//Defining a variable to store the receive state of type RADIO_STATE
RADIO_STATE RxState;
// Set the receive buffer
RadioSetPtr(RxPayloadBuffer);
//Receive packet length = PAYLOAD_LENGTH
RadioSetLength(PAYLOAD_LENGTH);
// Start the receiver
RadioStartReceive();
//Loop continuously
while(TRUE)
{
// Get the state of the receiver
RxState = RadioGetReceiveState();
//if Receive operation is complete
if (RxState & RADIO_COMPLETE)
{
//If no error in reception
if ((RxState & RADIO_ERROR) != RADIO_ERROR)
{
//End reception. Returns the payload size
ReceivedPayloadSize = RadioEndReceive();
M_RX_DATA = RxPayloadBuffer[0];
//Process the received data packets
//ProcessReceivedPacket(ReceivedPayloadSize, RxPayloadBuffer);
if (M_RX_DATA == S_ID )
{
Port_1_SHADE |= M_BUZ_MASK;
M_BUZ_Data_ADDR = Port_1_SHADE;
//M_BUZ_Data_ADDR =0x04;
//Generate a delay so that radio gets stabilized
//for(iDelayIndex = 0; iDelayIndex <30000; iDelayIndex++);
//Delay10msTimes(100);
//M_BUZ_Data_ADDR =0x00;
return 1;
}
else
{
return 0;
}
}
//If error in reception
else
{
//End the radio reception
RadioEndReceive();
//Abort the Radio operation
RadioAbort();
}
//Break from the loop
break;
}
}
return 0;
}
Show Less
Where can i find the recoomended CapSense board layout guidelines ?