Quantcast
Channel: Cypress Semiconductor - PSoC 4 Architecture
Viewing all 796 articles
Browse latest View live

PSoC 4100/4200 registers TRM entries omitted


S/PDIF Receiver ?

USBUART showing as Unknown USB Device

$
0
0

I'm using a PSOC CY8C4248AZI-L485 and trying to implement the USBUART but no matter what I do, I can't get it to recognize the device in Windows.

I started with the sample USBUART project, and made very few changes beyond stripping out some #ifdef code that wasn't executing, and adding a red and green status LED.  

The 4248 is running at 3.3V, and I'm self-powering it from an external source.  The 5V from the USB is applied to the VBUS, and I've tried all combinations of VBUS monitoring both on and off.  I've tried swapping D+/D- and it made no difference.  The D lines were initially passed through series resistors, but I've since eliminated them.  There is no other filtering or static protection on the current prototype.

Whenever I plug it in, I get an error message in Windows (10) that the Device Descriptor Request Failed.  It usually recognizes that I did plug something in to the USB port, but I will add that especially early on during the dev cycle, it wouldn't always attempt to load drivers.  Somewhere along the way it's gotten more responsive to that function.

I installed the .inf file that is generated as part of the projct (I had to boot into the recovery mode to allow Windows to install an unsigned driver).  That made no difference.

I had also installed some generic Cypress USB driver that I found during my travels, but that hasn't seemed to make any difference either.

Attached is the project as it stands today, as well as a screenshot of the error message that I'm seeing in Device Manager.  

I'm new to the USB device development, so I'm not really sure what else might be useful to others to troubleshoot.  It seems like I'm just one little step away from getting this going though.

Zack

Incompatibility between bootloader and emulated EEPROM?

$
0
0

Hi,

 

I'm running the UART bootloader example that come with the CY8KIT-049-41xx USB dev kit.

 

I used this as a base to build my own project and have found everything to work as described execpt for the emulated EEPROM.

I've looked at the example code and at what's on this forum and it seems that when I create an image that invokes the EEPROM_Write() call and I download it using the bootloader host, it programs successfully and starts running.  However, if I power cycle, I'm back at the UART bootloader startup (quick blinking blue LED).  If I then comment out the EEPROM_Write() call and burn that image, the project persists through power cycles.

I suspect that because the UART bootloader project flashes the new image in EEPROM, it doesn't play well with the emulated EEPROM.

Any thoughts?

Andre

How to implement touchpad?

$
0
0

Hi, I want to use touchpad or button matrix to detect presence of object on a plane.

The design guide and component datasheet have few information about this.

So how could I set up a button matrix? How to physically connect each sensor widget? Is there any more detailed description about this component?

I attached my project with Tuner. 

PS: I often get I2C communication fail problem, any one knows why is that?

 

Thanks!

Good luck.

 

Song

UART interruption

$
0
0

I need to read the input from the UART.

Set the UART working as interruption mode.

RxBuf =4; TxBuf=40;

 

Then once Rx Recieve char 'a' need to read another 16 bytes.

The problem is ,if read less than 8, it works fine, more than 8 it will report a strange value. 

I try to change the RxBuf to 16 not helping.

 

CY_ISR(UART_RX){
    ch = get_byte();
    if (0xffffu != ch)
    {
       if(ch=='a'){

        get_byte();

  .....

        get_byte();

       }

    }

}

uint16 get_byte(){
    uint16 ch = 0;
    uint16 _timeout=200;
    do{
        //if(UART_DEB_GetRxBufferSize()>0)
        {
            ch = UART_DEB_GetByte();
            if((ch&0xff00)==0){
               return ch&0xff;   
            }
        }
        _timeout--;
    }while(_timeout>0);    
    return 0xFFFF;
}

 

 

Attachments: 

Using the programmer in the CY8CKIT-049-41xx kit

$
0
0

Hi,

I have several programming boards of the CY8CKIT-049-41xx (the programmer and the target board can be broken off). I have used up the CY8CKIT-049-41xx board but removed the programmer part. The chip used is CY7C65211-24LTXI

Please see link to the kit.

http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits

Is it possible to use this programmer itself to develop applications ?

I need to generate two PWM signals, some digital outputs and also use the UART in the board. Is it possible to use the programmer itself ?

Please also suggest what SDK/Compiler is required for this, I have downloaded the USB-Serial SDK software, however I am not sure how it can be used for my application.

thanks

a

external clock for PSOC4

$
0
0

I need to using an external crystal for better performance (40MHz TCXO).

So I connect this with P5(1). 

Configure all the clock using external clock.

But the system can't boot up.

Any special setting needed?

Please check the attached for clock setting.

BTW: The crystal is 40MHz. Is this must be 48MHz/24MHz?

 

 

Attachments: 

UDB Counter values update

$
0
0

Hi Everyone,

I am having trouble with a Counter, my program has an EEPROM memory from which it reads the values and updates the counter,

I cant get the values to update.

the counter triggers an interrupt with a compare value

void update(){ 
    Counter_Stop();
     Counter_WritePeriod(revcount);
    Counter_WriteCompare(revcount);     
    Counter_WriteCounter(0); 

   Counter_SaveConfig();  
    Timer_WritePeriod(Period);  
    Timer_WriteCounter(Period); 
    Counter_Start();
    clr();screen();
}

PSoC 4200M Family non-volatile variables

$
0
0

Dear all PSoC fans!

I am currently working in a project where a PSoC 4, powered by a battery pack, collects sensor information and sends it via ZigBee to a Central Node that upload the data into a server or the PSoC4 sends the data directly via GPRS to the server (I have two possible configuration). I need to store some data into a non-volatile memory, information like the ID of the last packet sent, the node identification, user configuration and so on. I was using a PSoC4200 device which allowed me to use the EmEEPROM block to store variables into the Flash. Therefore, I need more then 2 SCBs, making me to change to a PSoC 4200M chip. Unfortunately I could not find a way to store variables into the Flash as was doing before. The PSoC 4200M do not support the EmEPPROM block. Do you have ever faced something like that? Could you give me a direction?

My kindest regards.

Nicolas

[solved] CY_ISR not working with freertos

$
0
0

I'm currently trying to port freertos v9.0.0 to my CY8C4247LQI-BL483 (PSOC4 device). (Using with CY8CKIT-042-BLE Pioneer baseboard)

I've got succeeded in making a simple led blinking with a freertos task.

However, when I try to implement a button press ISR, I have failed.

I used the CY_ISR in order to implement a button press ISR.

I've attached my project.

I'm not sure why the ISR is not occuring when I press the button.

I've check some other sample freertos ported projects, and they have implemented the CY_ISR the same way as I did.

Could anyone nudge me in the right direction?

PSOC 4 CY8CKIT-049-4xxx proto typing kit - UART_Bootloader.hex

$
0
0

I am trying to write a bootloadable hello world program , but the UART_Bootloader.hex/ SCB_Bootloader.cywrk is missing in both Psoc Creator 3.3 version & 3.1 version .

Where I can get this file? ..  Any ideas ?

About BLE read callback

$
0
0

I have customer server service, with one character as uint8[128].

I want to implement as when the client request a read request, the server will fillin new values, then return with new values.

 

So my question is the CYBLE_EVT_GATTS_READ_CHAR_VAL_ACCESS_REQ is invoked before send out the read response or after the read response?

Display float value using sprintf not working

$
0
0

Hi,

i would like to display the results of a division as a float using sprintf and display it using the UART communication component.

My code is give below.

 

float ft,db;

char buffer[20];
 
db=9.9*3.141; 
sprintf(buffer,"value=%f\n\r",db);

UART_UartPutString(buffer);        

 

I don't get any value at all on my terminal program.

Just 

value=

I am unable to understand how to display float values using sprintf.

I am using PSOC Creator 3.2

thanks

a

unable to programm Device


PSoC4 half high level output?

$
0
0

Hi:

  I use Cy8C4124 as an I2C slave device. if master don't read anything after 30 secounds. CY8C4124 will go to stop mode.most times are fine but some times, i find all of output pin of CY8C4124 is high level output. it is not 3.3V, but is 1.7V.

  I don't know why. please help me. thank you very much.

my code you can see below:

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

    I2CM_Start();
    EZI2C_EzI2CSetBuffer1(BUFFER_SIZE, READ_ONLY_OFFSET, ezI2cBuffer);
    EZI2C_Start();

    ReadfromBattary();
    
    Test_Write(1);
    CyDelay(10);
    Test_Write(0);
    CyDelay(1000);
    Test_Write(1);
    
    Timer_1_Start();
    TimerISR_StartEx(timer_isr); // Do use this one! 
    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    while(1)
    {}
}

void TimerISR( void )
{
    sleepcount++;
    if(timecount>=500000)
    {
    timecount=0;
    Test_Write(1);    
    ReadfromBattary();   
    }
    else
    {
    timecount++;
    read_flag=0;  
    Test1_Write(0);  
    Test_Write(0);
    }
    if(sleepcount>=5000000)
    {
    sleepcount=0;

    I2CM_Stop();    
    EZI2C_Stop();    
    Timer_1_Stop();
    
    CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_HIGH); 
    
    CySysPmStop();

    }
    
}

Select Debug Target Blank for CY8CKIT-049-42xx

$
0
0

Well, I installed all the tools for my CY8CKIT-049-42xx and built the project Breathing LED.  All going well until the program step.  Here I get a blank pop-up when trying to select debug target.  The board is plugged into the USB socket and I check in Device Manager on my Windows 10 PC and it looks like the driver is installed.  How to acquire the port?

unable to programm device after set Debug interface to Gpio

$
0
0

Hello,

I use the device Cy8C4013LQI.

I must disable all components for power saving.
So I followed the instruction to change the debug interface to from SWD to GPIO.

Programming should always be possible.

But after download the firmware I can not connect the device anymore.
I use Segger-Jlink with the newest Firmware and software.

Here I found a similar problem.

http://forum.segger.com/index.php?page=Thread&threadID=2945

There are speaking about the version p, but in the download area only available version j.

So - how can I fix the problem? Now I blocked 3 prototypes.

 

 

 

How to set low Power Modes on CY8C4013?

$
0
0

Hello,

 

I tried a lot of different things, but nothing works really good.

System-Resourcen
1 digital Input with pullup (used for WakeUp Key)
1 digital Output on 3.2 PWM mode strong drive
Clock 12MHz

If I try the following:

CySysWdtDisable();
PWM.Stop();
CyDelay(50u);
Motor_SetDriveMode(Motor_DM_ALG_HIZ);
Key_PWR_SetDriveMode(Key_PWR_DM_ALG_HIZ);
CySysPmDeepSleep();

still I consume aprox. 670µA on 3.3V

But only if I run this after a fresh Power-On Reset.

If I start the PWM, and run then in the same Power-Off, i come to 1.8mA

How can I save more Power? The Hibernate-Mode don´t exists on this device.
In the Datasheet should be the Power-cosum in DeepSleep 4.5µA - this would be nice.

What must I do, to save the maximum power as possible. I will wakeup on Key-IRQ, I must not keep nothing in Ram - I can reinitialize all again.

 

 

 

 

 

SPI UDB multi slave example

$
0
0

Hi all,

Is there any SPI master ( UDB mode ) example codes that illustrates how to use multiple slaves with it ? 

Viewing all 796 articles
Browse latest View live