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

How to soldering CY8CKIT-048's connectors?


How to indentify the handles from a findInfoResponse?

$
0
0

Hello everyone

 

I´m developing a BLE GATT client and GAP central,  and i want to find my handle of some services that i created using the following event to find my handle of my data characteristic

CYBLE_EVT_GATTC_READ_BY_TYPE_RSP:
readResponse = (CYBLE_GATTC_READ_BY_TYPE_RSP_PARAM_T *) eventParam;

and this event to find mmy handles of data characteristic descriptor:

CYBLE_EVT_GATTC_FIND_INFO_RSP:
findInfoResponse = (CYBLE_GATTC_FIND_INFO_RSP_PARAM_T *) eventParam;

I am using the 100 projects in 100 day: UART_TO_BLE_CENTRAL, it´s where I found the documentation, but I have a problem, 

how do I will know on which list are my handles that i need?

for example on the project of 100 day they use the following example

 if((0x29 == findInfoResponse->handleValueList.list[3]) && \
                                (0x02 == findInfoResponse->handleValueList.list[2]))
            {
                txCharDescHandle = findInfoResponse->handleValueList.list[0];
                txCharDescHandle |= findInfoResponse->handleValueList.list[1] << 8;
            }

How they did know that on array 3 of the list, the information of the handle was?

I attached a pictures of the list of the services, I need the QuatServ

Thanks

 

David Caraveo

Attachments: 

Processor Module for PCoC4 with USB (CY8C424x-L or BL)

$
0
0

Hi Everyone,

Is there a Processor Module for the CY8CKIT-001 that has a CY8C4246(or 7 or 8)-L or -BL?

Also, what module(s) are available for the CY8CKIT-001 wireless radio connector (P17) at this time? ... that would allow/support bluetooth development in lew of a processor module with bluetooth on board. ... and yes, I think I want USB as well.

I currently have the CY8CKIT-038 with the 4245-AXI part on it.

Thanks

Tim Miner

SPI Master Timing Question

$
0
0

First off, I would like to say I am new here and my apologies if I am posting this in the wrong place.

So quick back story, I bought 2 CY8CKIT-049-42xx PSoC 4 Prototyping Kits and they just arrived in the mail.  I have never used PSoC or any Cypress offerings before.  So far I have built my own project and got the LED on board to blink however fast I want and with whatever duty cycle I choose to get familiarized with the PSoC Creator 3.1.  (So far I love it, it took me 30 mins of just reading the kit guide to get started from start to finish of my own project.  Very well documented, anyone with some C experience can probably teach themselves this.  Excellent, 11/10, would recommend)

After that I tried to get my wireless PS2 Controllers running on this (I have already run them on the MSP430 from TI).  I love the SPI Master block so far, being able to set it to LSB First is great since the PS2 controller is little endian.  However the problems start to occur when I upload the code.  I grab a scope and check my Clk line, working great, so is Attention (SS/CS) and Command (MOSI).  However my Data line (MISO) is floating at about 4v.  The data being sent to the PS2 controller is correct on the scope, and its being run just in digital mode currently, so I am sending 5 bytes to it (0x01, 0x42, 0x00, 0xFF, 0xFF) and it should be returning (0xFF, 0x41, 0x5A) for the first 3 bytes (which I normally check but am not currently so that the transfer isn't interupted so I could check the data being sent) and then button data for the last 2 bytes.

I have tried slowing the clock I have attached to the SPI Master block as I know these PS2 controllers are somewhat finicky with timing.  Some places say they will run a bit below 100kHz all the way to a bit above 500kHz.  The ones I have from using the MSP430 seem to like to run between 350kHz and 500kHz and I have the external clock set to 850kHz so the Clk they get should be 475kHz, which it seems to be.  But I also know these controllers seem to like a small delay between bytes, and there is absolutely none.  Is there a way to code in a delay between each byte using the SPI Master?

I am using this link for reference;

http://store.curiousinventor.com/guides/PS2

Or if you have any other ideas, please let me know as well!  As easy as this seems and as quickly as I have taken to it, I am sure there is tons to learn still.

Code I am using to get it to send the data correctly so far is as follows; SPI Master setup with CPHA and CPOL both = 1.  RX and TX buffers both set to 5.  Data bits set to 8.

#include <project.h>

int i;

char button_Data[21];

char poll_Data[] = {0x01,0x42,0x00,0xFF,0xFF};
char check_Digital[] = {0xFF,0x41,0x5A};

int main()
{
    for(;;)
    {
        SPIM_WriteTxData(poll_Data[0]);
        SPIM_WriteTxData(poll_Data[1]);
        SPIM_WriteTxData(poll_Data[2]);
        SPIM_WriteTxData(poll_Data[3]);
        SPIM_WriteTxData(poll_Data[4]);
        SPIM_Start();
        for(i=0;i<5;i++)
        {
            CyDelayCycles(25);
            button_Data[i] = SPIM_ReadRxData();   
        }
        SPIM_Stop();
        CyDelayCycles(150);
    }
    /* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
    return 0;
}
/* [] END OF FILE */

Xres being driven low... but not by me... ?

$
0
0

Hi I have a strange issue. 

I have a fairly simple psoc4 (cy8c4248 44 tqfp) design that is adapted from the motor drive reference (cy8ckit-042) and it's been working OK until under load. Under load, there have been a few tearful moments, exploding FETs etc, and I've not been able to put my finger on how and why. 

One things that is consistently happening (other than smoke) is the the xres pin drives LOW, like the psoc4 is actively driving it. The parts aren't dead, and if I short xres to 3.3V they seem to work, I can talk to them using I2C and the bridge control software when xres shorted to 3.3V. This has happened on perfectly good units that have not leaked smoke from the h-bridge fets, and on ones that have suffered damage on the power drive stages. It seems to happen after a period of use/testing, never straight up. 

So I'm thinking that the xres problem, might be causing a chip reset at a bad time, tristate drive, destroying my fets which aren't turning off gracefully. (I'm correcting that on next pcb rev of course but still need to hunt down this problem.) That was different to my initial thought that the even that killed the fets, also killed the psoc and xres low was chip damage. 

The impedance of the low drive is strong but not short circuit, < 1k, probably less. A short to 3.3V does not make anything hot, I see now permanent issue. When I short xres to 3.3V up to 35mA can run (!) but then decays to 0. The xres pin has a top and tail BAT54 for a little more protection, and no capacitor. 

Any ideas? POR, BOD? damage to the device? System sees 24V for testing, has been tested for a short period with 42V.

What kind of failure modes are there that look similar? Any errata? Or is there something like the p1[6] pin xres behaviour on psoc 4000 parts? 

 

A lot of thanks in advance for your help.

pSoc4 tccpwm asymmetric pwm

$
0
0

Attempting to generate a sequence of variable width pulses using the  PWM component configured for asymmetric align.

Here is the configuration of the module

Prescaler - 1x

PWM Align - Asymmetric Align

PWM mode : PWM

Interrupt on Terminal count

Period Register = 50,  Period Register Buf = 206,  swap is checked

Compare Register = 10, Compare Register Buf = 103 swap is checked

(See Capture.png attached)

According to pSocCreator I should get a waveform that looks like capture2.png attached.

Instead I see continuously a waveform that appears to be based only on the initially configured period and compare values so it looks like the swap is not working.    The module datasheet indicates that the swap event can be generated in software and the swap will occur on the next TC event.    I tried using the void TCPWM_SetPeriodSwap(uint32 swapEnable)  and void TCPWM_SetCompareSwap(uint32 swapEnable)  api's to (re)enable the swapping at each TC interrupt but this does not impact the generated waveform.

Please advise on how to utilize the swapping function of the PWM component....

Thanks

Jim

 

 

 

 

 

PSoC4 errata? (aka: "I found bugs, are there more?")

$
0
0

So, where is the errata sheet for PSoC4000? I've searched the site high and low, and found nothing. Despite that, I already found some actual bugs:

 

  1. Documentation for the SROM syscall to setup clocks is wrong (TRM "Document No. 001-89309 Rev. *C" page 144). Docs say that this syscall takes a pointer to memory, and there I write param. This never works. Passing the actual param directly (like for "checksum" system call) in SYSARG register does work.
  2. Either documentation for SPCIF_GEOMETRY is wrong, or the chip has a bug where it reports the wrong value. My CY8C4013SXI-400 (which has 8K of flash) reports this register's value as 0x0001003f. As per register doc sheet (Document No. 001-90002 Rev. *C) that means it has (0x3f + 1) * 256 = 16384 bytes of flash. Of course in reality the chip has 8 (and as a test, I do indeed get a fault if I read past 8K)
  3. If I use the "Load Flash Bytes" SROM syscall shortly after boot, and point it to an area of flash where i put in the proper params to load 64 bytes of data into the write latches (0x0000d7b6, 0x0000003f) but I DO NOT WRITE THE NEXT 16 WORDS (let's assume i am ok writing whatever garbage was there into flash) , SROM locks up (actual cortex-m0 core lockup bit set and all). However, if those same words of RAM have ever been written before since boot (by core or by the MEMAP) no lockup occurs. (Yes, flash clock is properly set up. Yes, literally writing zeroes or any other values to these bytes immediately before or long before the syscall makes it work properly/)

Given all this, I am guessing at least a few more issues exist. is there a list?

SPI Link Between 2 PSOC Chips

$
0
0

Hello,

I have a project where I am attempting to use SPI to transmit information between two PSOC devices. The device on the white circuit board is a CY8C4245PVI-482.

The black circuit board is a CY8CKIT-059.

The CY8CKIT-059 is a SPI master that requests information be sent from the CY8C4245PVI-482 slave upon a string command. The data request is terminated by a line break.

As my code stands now, the data request arrives from the master intact and successfully executes the command parse routine in the firmware for the CY8C4245PVI-482 slave. The slave is then supposed to send a serial number back to the master. The characters "ABC\n" never arrive back reliably or intact to the master.

I checked activity on the MISO and all the lines. It all looks OK, so I think there is some poor code practice I am using. Please assist me in resolving the data transfer issue I am having back from the slave to the master. I have the project files attached for both the slave and master. hopefully what I am doing hardware wise and my code is self-explanatory.

Thanks


[4M] Reconfigure DMA on_the_fly

$
0
0

Hi,

I'm still making little projects to get familiar with the DMA engine on PSoC4M (and PSoC4L).

This project https://github.com/C47D/4M_DMAed_SPI tries to use DMA to send and read data via SPI, i did a function to change the source, destination and number of bytes to be transferred, but i'm getting troubles with it, i think i'm not waiting enough time before exiting the custom function, or maybe i'm missing DMA parameters that needs configuration.

 

Has somebody tried to change DMA parameters on the fly?

I spend some time searching on the forum and there are just a few topics about this.

 

Thanks in advance

Carlos

 

PD: the project on the git repo is done on Creator 4.0 and CY8CKIT043 kit as a target, v2 project is the current one :).

Packge 28-SSOP PIN29/30?

$
0
0

Hi,

I'm reading CY8C4AXX_FAMILY_DATASHEET to build PCB lib.

What is the PIN 29 and 30 at 28-SSOP packge?

Double the flash in low-end PSoC4 for free

$
0
0

https://dmitry.gr/index.php?r=05.Projects&proj=23.%20PSoC4

 

 

This article explains how I figured out how Cypress's jury-rigged "supervisor" mode in the PSoC4 family works, dumped the secret unreadable SROM, exploited it, and found a way to unlock extra flash in the PSoC4 as well as how you can develop scary rootkits for touchpads and touchscreens that use Cypress chips. I provide the code to do this yourself as well as as much guidance as I possibly can, for now. Along the way I explain how this was all done and what steps it took. This article encompasses a work of about a month.

Emulated EEPROM for PSoC 4100S family?

$
0
0

I apologize in advance, if this is a dumb question, but I am using a CY8C4146LQI-S432 for a new design.  I cannot find an Emulated Eeprom block available in PSoC Creator.  I also can't find any indication in the datasheet or reference manual about writing to the PSoC flash.

My question is, is there any way to store a few variables in the flash memory (either using some kind of flash-writing commands or an emulated eeprom function) for these 4100S family parts?

If anyone has done this, or knows the correct documentation/examples that can show me how, I would appreciate any information.  Thanks!

 

4000s Diplexed Slider

$
0
0

Hello, 

I am working on a 24+2ends segmented slider, and would like to Diplex it. I am concerned about the Cp of the segments in a diplexed configuration. I am also curious about increasing the segment height to 20-24mm, so the user has a better chance of hitting the slider that will be hidden under a wood overlay(85mm wide) with no outside visual indication the slider is beneath. 

Device is PSOC 4000S - CY8C4024LQI-S412

My traces are 0.16mm wide and are an average of 120mm long total for each diplexed channel. 

Slider segments are 8mm wide and 15mm in height using H/4 rule for the dual chevron and .5mm spacing as per datasheet.

4 layer FR4 1.2mm thick

3m 468MP for adhesive

1.2mm wood overlay oil/wax finish.

 

Should I be concerned about what I am attempting to do? It looks like the 4000s series is able to accommodate 200pF of sensor capacitance each channel will surely fall in that range. 

 

Adam

I2c master transmit problems on CYBLE-014008-00

$
0
0

Hey All,

 

     I am using PSoC Creator 4.0 for the CYBLE-014008-00  and I have an I2C bus set up on pins 1.4 and 1.5 which is SCB0.  I am pretty new to PSoC but when I set up an O-Scope on all pins and run the example project SCB_I2cCommMaster01 code, I don't even see a clock signal, and it gets hung up here:

 

 /* Waits until master completes write transfer */
    while (0u == (I2CM_I2CMasterStatus() & I2CM_I2C_MSTAT_WR_CMPLT))
    {
    }

 

I think i am missing something, but for the life of me, I can't figure out what it is.

Opamp at low Power

$
0
0

hi,

i have been working on Temperature Transmitter. its need very low power . so i am using Psoc-4 which has low power mode.

its work fine with RTD ..its consume only 3.2mA for full operation.

Now i also want to sense thermocouple(J-K). For use thermocouple i need amplify the signal with two opamp configuration. because SAR adc cant directly read. so i put two opamp.so right now my power consumpation is 5.5 mA which is not good for Temperature Transmitter(4-20mA). i have to make it below 3.5mA. 

so how can i do it??

and 

is that opamp of psoc-4 consume 1mA for its operation??

 

 


Getting NRF24L01 working with PSoC4

$
0
0

Good Afternoon Everyone,

So I have been working on this code for a few weeks. I have downloaded a few examples in other languages and translated as best as Google could and Im still having difficulty getting this to work. I will post the project files below but first some info on where im gathering all my info from.

nRF24l01 datasheet https://www.sparkfun.com/datasheets/Components/SMD/nRF24L01Pluss_Prelimi...

another student who tried this on the forums a few months back. Bob Marlowe seemed to help him a lot however the student never responded if he finished it or not

http://www.cypress.com/forum/psoc-4-architecture/connecting-psoc-4-and-n...

 

Im using his most recent code and trying to redo it. Using his transmitter code on my Scope im getting a signal out and when i flip my switch the signal changes to reflect that. So i think I have the transmission working as intended. Again im not sure as i have no serial monitor nor does the receiver work to get an LED to flash yet.

Im not expecting anyone to look at this and fix everything at once im hoping for someone to point out what I should do next or some glaring error like you forgot to do SPI_Enable();

all i want to do is send a 1 or 0 over radio. I am building a home security system for a project in my Engineering class. Thanks to anyone who can help.

Timer configuration

$
0
0

Hi Cypress Team, 

I want to configure timer in my project with 1 Micro second .

i used timer function block , set the clk at 2 MHz and count is 2, so it is showing 1us .

but i want to reconfigure timer in my state machine many times with different time configuration (1,3,20us and 125us).

so in the ISR , written code   

   CY_ISR(Timer_ISR)
{
    Timer_ISR_ClearPending();

 //Timer_1ms_ClearFIFO();

BottomTemperatureControl();

}

void BottomTemperatureControl(void)

{

//here am calling reload timer function with different timer time configuration.

ReloadTimer(Number of us timer configuration); 

}

 

void ReloadTimer(int nTimerInMicroSeconds)
{
  Timer_1ms_Stop();
    nTimerInMicroSeconds = nTimerInMicroSeconds * 2;
   Timer_1ms_WritePeriod(nTimerInMicroSeconds);
    Timer_1ms_Start();
   
}

if i want to set 3us timer, then i will pass 3 to the reloadTimer function and calculate the period count value inside the reload functon.

for 2 counts, 1us timer 

for 3 us, 2*3 = Count value(6).

if high set this value for 100us ,50us its working fine but for 3us timer , getting 40us pulse.

 

kindly help me in this.

I am not able to configure 16, 24 ,32 bit resolution for  the attached  timer function block .

it is showing error if I select 16,24 bit resolution.

please find the attached images for timer configuration. 

Psoc 4200 + CAN/LIN shield

$
0
0

Hi,

I'm using a Psoc 4200(cy8ckit-042) and a cy8ckit-026 can/lin shield and Creator V3.3 SP2.

My problem is that I can not get the CAN component working, meaning I can't even see it in the components list when I am building the project, only the LIN. In the shield's documentation it's stated that is works with the 4200 baseboard but it does not; apparently the CAN works only with the cy8ckit-044 or I am doing something wrong?

Also, it is unclear to me, can I debug the board via USB while communicating via CAN/LIN, because from what I understand from the documentation I can't because the power is coming from the shield @12V, so I should have the USB disconnected.

EzI2C data reading with pointers

$
0
0

Hi,

I have CY8CKIT-145-40XX PSoC 4000s prototyping kit.

Original idea was to read e.g. slider position directly from memory via EzI2C. To enable that, I updated the original CapSense V3.0 component to V3.1 to be able to export register map. I trialed the code functionality with Tuner and everything worked as usual.

To get better understanding what is transferred via I2C I was probing the communicating protocol directly with jump wires and logic analyzer. I was surprised that in every read, the whole registrymap is read through I2C, including somewhat irrelevant info such as device and config ID's..

Anyhow, I hooked Arduino as Master and tried to read directly from address SLD_POSITION 0x54, by setting pointer by writing to the same address, but alas, the reading starts always from registy position CONFIG_ID 0x00 position no matter what. I also used Bridge Control Panel without any better results. I start to get data from 0x00.

Have I understood something incorrectly? In EZI2C_Slave_V1-90_Datasheet.pdf document, at page 15,  It is said in the first sentence of last paragraph "Read operations always begin at the offset data pointer provided by the most recent write operation".

As an attachment, I added a screenshot from Bridge Control Panel demonstrating the writing/reading I tried to do.

SPI Master 3~16 bit width limit!

$
0
0

Hi all, 

Is there a way to increase the 3~16 bit SPI master data width limit to 20 bits maybe more? I worked around this issue by using the shift register component with the SPI master to get what I needed done but running into some timing issues.

I know that I can make custom components but would like to avoid doing this. Any ideas?

Thanks,

Eric

Viewing all 764 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>