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

CY8CKIT-042 I2S Example Project - DMA tr_out to Timer Counter

$
0
0

Hello,

 

I have been looking at the example USB Audio example project for the CY8CKIT-042 and, looking at the schematic, it looks like DMA can be connected from tr_out to the 'count' input in a timer counter. I tried to do this myself in a different project but got the error:

E2806: Failed to place fixed-function blocks. See the report file for details.

 

I also tried copying and pasting the components from that project to my project. The device I have for my project is CY8C4248LQI-BL583 so I was wondering if there would be a difference based on the device used.


I2C_Stop and set scl pin to output while running

$
0
0

Hello ,

I would like to stop i2c communication during runtime and use the scl pin to toggle several times to reset a slaves State Machine.

It seems that calling the SCL_Stop() function is not enough to get the scl pin back to normal output function.

Here is my code:

I2C_Stop(); /* Stop I2C */
I2C_scl_SetDriveMode(I2C_scl_DM_STRONG); /*set DriveMode*/

I2C_scl_Write( 1u ); /*set pin output manually*/

Eagle CAD Support for PSOC4 Series

$
0
0

Hello,

I'm searching for an Eagle Library for PSOC 4 (4200-L) Series Devices.

Specially QFN68 and TQFP64 Packages.

Best Regards,

Jackson

Can't build due to some component over-packing PSOC 4 UDB

$
0
0

Initially in my project I was following the iOS Build a Robot tutorial which incorporates BLE, Capsense, and PWM components.  I just added an SPI Slave component in order to receive data from a cRIO-based instrument and received an "Unable to pack the design into 4 UDBs" error message.  The project that I'm going to be making incorporates some of the implementation from the iOS tutorial, but I will not be needing the Capsense interaction at all.  However, when I remove that component (and the pin attachments), I still cannot build the project.

I am very new to this such that I have no idea what particular part of a component is causing the database to over-pack.

I've attached the project, and don't hold back into going into heavy details about this issue.  Anything I can learn is a plus.

- Anthony

IDAC with DMA

$
0
0

I'm using the CY8C4247AZI-M485.  I want to use the IDAC component with the DMA to generate a sine wave.  I believe I have everything set up correctly but it's not working.  In the "DMA Support" section of the IDAC datasheet it states the following:

Note DMA support in the IDAC_P4 component is limited due to the following reasons:

 The IDAC_1_IDAC_CONTROL register is common for two IDACs (8-bit IDAC and 7-bit IDAC).

 The IDAC_1_IDAC_CONTROL register is common for the IDAC setting and IDAC data.

Before using the DMA channel with the IDAC_P4 component, review the description of this register in the device registers Technical Reference Manual (TRM).

I've searched for "IDAC_CONTROL" in the TRM but couldn't find anything. 

Can someone tell me if this is even possible with this PSOC?  If so, what am I doing wrong?

 

Problem with CY8CKIT-048 power supply

$
0
0

The factory soldered 3.3V and 5V pin does not provide power at all. If I don't connect anything to these pins I can measure 5V, but if I connect them as a power supply to any circuit the voltage drops to 0V. The other, unsoldered 3.3/5V and the VDD pins are all right, but I can't figure out why the factory soldered pins doesn't work. I worked around it by using the other pins, but it is quite annoying. This is the case when I use USB power supply.

I also have another power supply problem: If I try to power it from a 12V DC power source through the VIN connections, it just doesn't work. PWRLED flashes for a moment and that's it. SW4 is set to REG, J9's connection is 1-2. If I measure the VDD pin's voltage it's about 0.8V and I can measure ~4.5V on the 5V pins, but if I connect anything to them their voltage drops to 0. I measure 0V on the 3.3V pins.

Am I missing something? What is causing these problems and how can I solve them?

Conflict between GPIO OE and SCB

$
0
0

Hello Everyone

I am interfacing with an 8-bit bus with read/write capability, so I'm using an 8-bit port with Output Enable. There is as well a SCB UART. The prototype I implemented with the CY8CKIT-042 works perfectly.

For the prototype, I switched to a bigger chip: CY8C4245LTI-M445. When compiling the same project (after remapping the IO of course) I now get the following errors:

Pin guidance unavailable: CD(0) cannot be configured for Output Enable or Input/Output Synchronization while connected to \UART_1:SCB\'s rx terminal.

Pin guidance unavailable: CD(0) cannot be configured for Output Enable or Input/Output Synchronization while connected to \UART_1:SCB\'s cts terminal.

...

I have attached a screenshot of the errors. CD(0) is the bit 0 of the data bus. CD(0) is mapped on P1.4.

P1.4 ctb0.oa1.inm tcpwm.line[6]:1 scb[0].spi_select1:1

Although the UART is not using scb[0] but scb[1].

Of course, disabling the Output Enable for the 8-bit port gets rid of the error, but that's not an option for my application.

Any idea why I'm getting this conflict?
Thanks!

 

Attachments: 

PsOC4 Project - Alarm Loop

$
0
0

As part of my current education as an Electronic Engineer, I am currently attending a course in Embedded Systems. For this course, we are required to complete several projects concerning the PSoC4 Pioneer Kit and multiple Shields (including the Arduino MultiFunctionShield); my final assignment for this course is to simulate an alarm system, which must be monitored via at least three methods (see below). However, I am currently experiencing several recurring problems, which have caused me to restart my project multiple times.

 

As such, I thought it might prove fruitful to ask for your advice concerning the project. To be specific, the hard requirements for the project are as follows:

 

- The system has to detect/simulate the status of the loop via three methods; the Capsense present on the PSoC4 (loop 1), the PotMeter present on the Shield (loop 2) and an additional slider which has to be configured on the Shield via Input Gate A5 (loop 3).

 

- In each loop, five specific voltage/current intervals have been defined. As these are applied in relation to a 5V power supply, these are as follows:

          1; Sabotage 1 --> 2,483 V - 4,999 V

          2; Alarm open --> 2,246 V - 2,482 V

          3; Sabotage 2 --> 1,345 V - 2,245 V

          4; Alarm active --> 1,161 V - 1,283 V

          5; Sabotage 3 --> 0,001 V - 1,160 V

 

- If Key 1 on the Shield is pressed, the RGB-LED on the PsOC4 has to turn Green after a 10-second delay; As long as this is not the case, the RGB-LED has to turn Blue, EXCEPT when any of the loops is subject to Sabotage. In case of Sabotage, the RGB-LED has to turn Red and the Buzzer on the Shield has to produce a continuous signal, which can be turned of by pressing Key 2 on the Shield. Once all loops are in correct current ranges (either Alarm open or Alarm active), the Buzzer has to turn off automatically and the RGB-LED has to turn Blue once again. 

 

- Each of the specified areas has to produce specific visual messages via the 7-segmentsdisplays (present on the Shield), as well as turning on LED's on the shield in binary code. These messages/LED's are as follows:

          1; Sabotage 1 --> "S1" --> LED1 

          2; Alarm open --> "OPEN" --> None

          3; Sabotage 2 --> "S2" --> LED2

          4; Alarm active --> "AAN" --> None

          5; Sabotage 3 --> "S3" --> LED3

 

- When sabotage is detected, the display has to be followed by a space, after which the respective loop is also displayed. Each of the aforementioned visual messages must be displayed for exactly the duration of 1 second, which is followed by the actual Voltage meassured in that specific loop (varying between 0,000 V and 5,000 V); the programme itself continuously alternates between each of the three loops. 

 

FOR EXAMPLE: when the PotMeter is adjusted to create 1,500 V, the text "S2 2" is displayed; Exactly one second later, the text 1.500 is displayed; afterwards, the correct message for loop 3 (the slider) is displayed, after which the correct voltage is displayed; the same follows for loop 1 (CapSense), and so forth. I have been able to construct the necessary components and Pin Configuration for the project (see the attached project). It is mainly, and perhaps purely, the software programme itself that presents the challenges I can't seem to overcome.

 

As such, the realisation of the system presents the following challenges;

     I. To construct a scanning-program that puts data obtained via inputs in array(s).

     II. To create a display-programme that can relay data from the array(s) dynamically per second.

     III. Loop both programmes continuously.

     IV. Control the 7-segmentsdisplays with the help of an interrupt-routine. 

 

 

Additional Requirements:

- Incorporation of a Deep Sleep Mode into the system --> By pressing both Key 1 and Key 2 simultaneously for three seconds, the system has to put itself into Deep Sleep Mode to preserve energy; after pressing both buttons for three seconds once again, Deep Sleep Mode is lifted and the system functions normally.

- Incorporate Hard Reset into the system --> by pressing the Reset-button, the user has to be able to completely reset the entire system.

 

As an enthousiast technician (who seriously attempts to obtain as much knowledge in as little time as possible), I sincerely hope you might be able to help me in creating the project. Sincerely and many, many thanks in advance.


How to make .cysch layout for voltage divider of analog input signal

$
0
0

I have a pressure transducer circuit that outputs a voltage between 0-5V.  There's a pin connected to that output that I connect to analog pin P2[2] on the PSoC 4 board.  I was wondering how to divide this down to meet the 3.3V max VDDA for the ADC SAR Sequencer.  Right now I have my "Transducer" analog input pin connected to the 1st pin of the 12 bit ADC (the 2nd going to ground).  For the divider, I have R1 as 5k and R2 as 10k, connected to the PWR Vdd (all of which is fed to external terminal of the analog pin).  Is this how it's supposed to be connected in the TopDesign.cysch?

I attached the project bundle.

-Anthony

Interrupt for buried component pin

$
0
0

For my design i'm using a SCB SPI slave component and need to generate a interrupt from slave select. This pin is hidden from the top level schematic so i cant simply place a ISR component on this I/O line. 

I need the steps for enabling the interrupt at the GPIO pin and all other steps up to the ISR service function. I have so far determined these steps but dont have the complete solution: 

Create ISR prototype 
     CY_ISR_PROTO(SPIS_nSS_Isr); 
Create function 
     CY_ISR(SPIS_nSS_Isr) 
Link function to interrupt vector??? I believe port 5 is connected to IRQ5 
    CyIntSetSysVector(5,SPIS_nSS_Isr); 

Enable interrupt vector??? 

Enable Pin interrupt 
     SPI_SLAVE_ss_s_SetInterruptMode(SPI_SLAVE_ss_s_INTR_ALL,SPI_SLAVE_ss_s_INTR_RISING);

Trans-Impedance Amplifier configuration for 5 Amp Current Sense

Problem creating a Central GAP role

$
0
0

Hello, I am working with CY8CKIT-042-BLE, it´s the BLE Pioneer Kit. 

The problem, I have, is to create a Central GAP role, using the USB dongle 56LQXI , I did already a Server GAP Role project  and it works when I used CySmart.

I read some tutorials about how to initialize the StackEventHandler but when I developed the code

the connection between the USB dongle and the PRoC BLE Module. However, using the Cysmart the connection is posible.

Also I´m having problem how to write on my server, I´m using the function  CYBLE_GATTC_WRITE_REQ_T 

but I dont know how get the attrHandle

I´ve attached the file with the Peripheral and Central  projects.

 

Thanks you for your help

David Caraveo

Attachments: 

Interrupt pin

$
0
0

Can someone clear this up for me?  On the Timer component there is an interrupt pin.  If I want to generate an interrupt every time the timer reaches terminal count I can enable the interrupt by checking the check box.  Then I'd put an "Interrupt" component on that pin.  How is that any different then leaving the interrupt check box clear and putting the interrupt component on the OV pin? Is this the difference between a hardware and software interrupt?

static code analysis using PSoC Creator 4.0

$
0
0

i want to perform static code analysis using PSoC Creator 4.0, please suggest some wayouts for this task.

Difference between CY8C4247LQI-BL493 and CY8C4247LQI-BL483

$
0
0

Hi everyone,

I would like to know if the only difference between CY8C4247LQI-BL493 and CY8C4247LQI-BL483 is the CapSense characteristics. I need to know if the same code can run in both MCU without any problem (I don't use the Capsense). Searching the CY8C4247LQI-BL483 in the search box of the cypress main web page, if  you click on the datasheet link you're redirected to the 4XX7_BLE family datasheet, meanwhile if you do the same thing with the CY8C4247LQI-BL493 you're redirected to the 4XX8_BLE family datasheet. Is this a mistake in the link?

Thanks in advance.


Problems using UART

$
0
0

I had problems using a 115200 baud UART on different states of the BLE Stack Event Handler. I have debug messages in every state and in some state I need to send some info over the UART. Sometimes when I write about 10-15 bytes, one character sent is changed by another one. Making a step by step debugging I can see that there's not corrupted memory. Also I know that it's not noise over the tx line of the UART. This issue is fixed adding a 1ms delay on the main infinite loop. Any idea of what is the cause of this behaviour and why this delay fixes it?

Thanks in advance.

External clock for a timer

$
0
0

I want connect an external clock (16 MHz) to a TCPWM for better accuracy. But I can't get it right.

I connected the external clock to Pin [0.6] and mapped it in the "configure system clock" - window to EXTCLK.
In the same window I routed the EXTCLK to "Routed2" and was then able to configure the clock-component in the TopDesign to the existing clock "Routed2".

I get the error:

Pin guidance unavailable: Invalid connection for clock input "\IVC_S1_Timer:cy_m0s8_tcpwm_1\:clock" 
driven from "ClockBlock:dsi_in_1". The component requires a clock from the clock block.

I tried also another pin and configured and routed it as "DigitalSignal" with the same result.

Is there somewhere a tutorial on how to use an external clock with PSoC 4?
What is a "clock from the clock block"?

Thanks
Thomas

Restarting DMA

$
0
0

I'm using the CY8C4247AZI-M485 to generate tones with the IDAC and DMA components.  I can create a custom sequence of tones.  The total duration of my sequence is 125 ms.  I repeat the sequence every second for a "beeping" effect.  I can initiate the beeping with a CAN message and I can stop it with a CAN message.  The problem I'm having is starting it again.  I have a feeling I'm not resetting my DMA channels properly.  What is the proper way to reset the DMAs?

i2c udb on psoc4

$
0
0

The datasheets seem to suggest that I can setup i2c on a udb but that option is not available in the component catalog.  I'm using CY8C4245AXI-483.  

PsOC4 Project - Alarm Loop

$
0
0

As part of my current education as an Electronic Engineer, I am currently attending a course in Embedded Systems. For this course, we are required to complete several projects concerning the PSoC4 Pioneer Kit and multiple Shields (including the Arduino MultiFunctionShield); my final assignment for this course is to simulate an alarm system, which must be monitored via at least three methods (see below). However, I am currently experiencing several recurring problems, which have caused me to restart my project multiple times.

 

As such, I thought it might prove fruitful to ask for your advice concerning the project. To be specific, the hard requirements for the project are as follows:

 

- The system has to detect/simulate the status of the loop via three methods; the Capsense present on the PSoC4 (loop 1), the PotMeter present on the Shield (loop 2) and an additional slider which has to be configured on the Shield via Input Gate A5 (loop 3).

 

- In each loop, five specific voltage/current intervals have been defined. As these are applied in relation to a 5V power supply, these are as follows:

          1; Sabotage 1 --> 2,483 V - 4,999 V

          2; Alarm open --> 2,246 V - 2,482 V

          3; Sabotage 2 --> 1,345 V - 2,245 V

          4; Alarm active --> 1,161 V - 1,283 V

          5; Sabotage 3 --> 0,001 V - 1,160 V

 

- If Key 1 on the Shield is pressed, the RGB-LED on the PsOC4 has to turn Green after a 10-second delay; As long as this is not the case, the RGB-LED has to turn Blue, EXCEPT when any of the loops is subject to Sabotage. In case of Sabotage, the RGB-LED has to turn Red and the Buzzer on the Shield has to produce a continuous signal, which can be turned of by pressing Key 2 on the Shield. Once all loops are in correct current ranges (either Alarm open or Alarm active), the Buzzer has to turn off automatically and the RGB-LED has to turn Blue once again. 

 

- Each of the specified areas has to produce specific visual messages via the 7-segmentsdisplays (present on the Shield), as well as turning on LED's on the shield in binary code. These messages/LED's are as follows:

          1; Sabotage 1 --> "S1" --> LED1 

          2; Alarm open --> "OPEN" --> None

          3; Sabotage 2 --> "S2" --> LED2

          4; Alarm active --> "AAN" --> None

          5; Sabotage 3 --> "S3" --> LED3

 

- When sabotage is detected, the display has to be followed by a space, after which the respective loop is also displayed. Each of the aforementioned visual messages must be displayed for exactly the duration of 1 second, which is followed by the actual Voltage meassured in that specific loop (varying between 0,000 V and 5,000 V); the programme itself continuously alternates between each of the three loops. 

 

FOR EXAMPLE: when the PotMeter is adjusted to create 1,500 V, the text "S2 2" is displayed; Exactly one second later, the text 1.500 is displayed; afterwards, the correct message for loop 3 (the slider) is displayed, after which the correct voltage is displayed; the same follows for loop 1 (CapSense), and so forth. I have been able to construct the necessary components and Pin Configuration for the project (see the attached project). It is mainly, and perhaps purely, the software programme itself that presents the challenges I can't seem to overcome.

 

As such, the realisation of the system presents the following challenges;

     I. To construct a scanning-program that puts data obtained via inputs in array(s).

     II. To create a display-programme that can relay data from the array(s) dynamically per second.

     III. Loop both programmes continuously.

     IV. Control the 7-segmentsdisplays with the help of an interrupt-routine. 

 

 

Additional Requirements:

- Incorporation of a Deep Sleep Mode into the system --> By pressing both Key 1 and Key 2 simultaneously for three seconds, the system has to put itself into Deep Sleep Mode to preserve energy; after pressing both buttons for three seconds once again, Deep Sleep Mode is lifted and the system functions normally.

- Incorporate Hard Reset into the system --> by pressing the Reset-button, the user has to be able to completely reset the entire system.

 

As an enthousiast technician (who seriously attempts to obtain as much knowledge in as little time as possible), I sincerely hope you might be able to help me in creating the project. Sincerely and many, many thanks in advance.

Viewing all 761 articles
Browse latest View live


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