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

I2C question

$
0
0

I'm working with a proc 4 device and a LIS3DH accelerometer. I've stripped down my code to do the most basic thing to demonstrate my problem. I read the "who am I" register (0x0F) of the accelerometer. The response is 0x33 and that's just what I get if I let the psoc read it once, twice or even 10 times. But if I read it (or other registers more than ten times the proc hangs. I'm watching everything on the I2C bus with a logic analyzer. I can tell it hangs because it doesn't get to the LED section at the end.

Thanks for any help with this...

Kevin

#include <project.h>

uint32 i;
uint8 userArray[6] = {0x01,0x02,0x03,0x04,0x05,0x06};
uint8 status;
uint8 I2C_WRITE_XFER_MODE = 0x00u;
uint8 I2C_I2CMSTR_NO_ERROR;
uint32 LIS3DH_ADDRESS = 0x18 ;

int main()
{   CyGlobalIntEnable;
    LED_Green_Write(0);

//    UART_Start();
//    UART_UartPutString("The first words out...");
    
   I2C_Start(); //Start the I2C component
          

    
    I2C_I2CMasterSendStart(LIS3DH_ADDRESS, I2C_I2C_WRITE_XFER_MODE);
    
 //   I2C_I2CMasterWriteByte(0x20);
 //   I2C_I2CMasterWriteByte(0x97);
 //   I2C_I2CMasterSendStop();
    
    
    
    for(i=0; i<10; i++)
        {
         
         I2C_I2CMasterSendStart(LIS3DH_ADDRESS, I2C_I2C_WRITE_XFER_MODE);
         I2C_I2CMasterWriteByte(0x0F);
         I2C_I2CMasterSendStop();

         I2C_I2CMasterSendStart(LIS3DH_ADDRESS, I2C_I2C_READ_XFER_MODE);
         userArray[i] = I2C_I2CMasterReadByte(I2C_I2C_ACK_DATA);
         I2C_I2CMasterSendStop();

        }
        
    LED_Blue_Write(0);
    LED_Green_Write(1);
        
    I2C_I2CMasterSendStop(); /* Send Stop */
    
   
    
    
}

/* [] END OF FILE */

 


PSoC Creator 4.1 incompatibility with previous Creator version (4.01 Update 1)

$
0
0

Dear Sir, 

I did an update on installed PSoC Creator from version 4.01 Update 1, to Version 4.1. After this, I tried to re-compile a project by using the new version. Of course, first I had updated the project components (Project -> Update Components). Unfortunately teh project does not compiled without errors, while in the previous PSoC Creator version the compilation was OK.

I received the following error messages:

1.  E2713: <sensors(2)> cannot be placed at <P2[2]> because the location does not support the required features: <ROUTABLE>. The placer reported an error.

2. E2055: An error occurred during placement of the design.

3."C:\Program Files (x86)\Cypress\PSoC Creator\4.1\PSoC Creator\bin/sjplacer.exe" failed (0x00000001)

4. The fitter aborted due to errors, please address all errors and rebuild.

have you got any idea about this error, or how to overcome it?

 

Best Regards

Bill

Template project for a CY8CKIT-046 shield (pref. in Altium)

$
0
0

Hi,

- Is there a ready made template project for making a CY8CKIT-046 shield? 
  basically just position and port-names for utilizing all the IO headers

- Does anyone happen to have converted the ev-kit project (CY8CKIT-046) .brd and .dsn files into Altium format?

- Finally, is there a .xls or file somewhere handy that outlines which GPIO's that are "free" on the kit, i.e. not tied to other IC's or parts.

Bootloading using a UMTS/HSPA+ as a Host

$
0
0

Hi guys,

Im trying to implement a FOTA to program a PSoC4 using a Quectel UC20 as a Host. First I download the .cyacd file from an FTP server and store it in the UC20´s RAM memory and then sending the file through UART to the MCU in bootloader mode using the function Booloader_Start(). Now, im stuck. As far as im concerned, only by sending the correct data (.cyacd file parsed to hex) to the PSoC4, the bootloadable should be correctly installed, but reading the documentation i have noticed that the MCU answers to every command sent by my host, are these answers needed by the host to do a correct programming? Or are they only useful for a flow control when using another mcu as host? I have read about the Silicon ID and the format of the .cyacd file and it seems that what i´m trying to do is to bypass all of that. I´m a newbie in the microcontroller world so i´ll be happy for any of your guidance and to explain myself.

Esteban

Error Compiling Project with IAR

$
0
0

Hello,

I have to build a project with IAR (version 7.80.4 using a commercial license). The project is set-up with PSoC Creator 4.1 and then connected to IAR via the Project->Export to IDE. Since adding the CapSense [v4.0] component I get the following error:

Error[Li016]: size limit exceeded. The application needs 0x1a29a (107 162) bytes, which is greater than the limit of 0x8000 (32 768) bytes.
            The limit is due to license "ARM.EW.LINKER" from "CapSense_SmartSense_SL_v3_10.o(Capsense_P4Library_IAR.a)" (and 1 other module).

It seems like a component (Capsense_P4Library_IAR.a) was put together with the Kickstart edition of IAR? 

After taking out the CapSense component everything is fine in IAR and the application still needs more than 100kbytes.

What can I do to make it work (I have to use IAR instead of PSoC creator)? 

Thanks

Thomas

 

I2C basic - trying to analyse the signals without slaves

$
0
0

Hi,

I am using the 4200 BLE pioneer kit board to interface an external FRAM chip (not the one on the board itself). Since it works little bit different I will understand the I2C protocol and try to analyse the signals with a logic analyser.

As a base project I use the simple fram test project from this topic http://www.cypress.com/forum/psoc-4-ble/fram-ble-pioneer-board-and-i2c.
This project works as expected with the onboard Fram chip (pins 5.0 SDA and 5.1 SCL), so I know the I2C component is properly working as such.  The program tries to write to and read from FRam every second.
Now I map other I2C capable pins to drive an external I2C bus. There are no slaves on the bus and each line is pulled up by a 2K resistor to ca. 3.3 V  (voltage divided from 5 V). Each line has a logic analyser probe attached and I do not see any activity on the lines. SCL is always low and SDL always high.
Shouldn't there be at least START sequences from the master?
When I attach a slave though, I can see full communication. Is this the expected behaviour?

4200L Series RS-485 Bootloader - UART component V2.50

$
0
0

I'm using a CY8C4246AZI-L423 for a project with RS-485 communication (PSoC <-> SN65HVD22D). Realised with UART component V2.5. In normal operation mode everything works fine.

 

Yesterday I tried to get the firmware update function over RS-485 running.

Step1: This picture shows the normal RS-485 communication includung tx-enable handshake.

Step2: This picture shows the initial bootloader communication between PC an PSoC. PSoc don't handle the tx-enable handshake any more. A firmware update isn't possible.

Now I added some glue logic between the PSoC an the RS-485 transceiver to emulate the tx-enable handshake. I just wanna test if the firmware download runs basically with the UART component V2.5. After I tried to download some firmware - see step3.

Step3: This picture shows the communiacion between PC an PSoC with emulated tx-enable handshake (glue logic). Updating the PSoC fimware is no problem.

 

Is is possible that the UART component is buggy or do I something wrong? It's curious that in operation the tx-enable is served and in bootloader mode not.

Can anybody help me?

Does SCB_P4_V3_20 support Master bidirectional SPI ?

$
0
0

By bidirectional I mean MOSI and MISO in the same line, often times labeled  as SDA.    Looking at the datasheet, there is no indication of it.

Tony

 


Multiplex single SCB to multiple ports in application?

$
0
0

On a PSOC 4000s, 2 x SCBs are available. However I have a need for 3 x UART bi-directional interfaces. SCB1 is mappable to 2 different ports (P0, P3), SCB0 to a single port (P4).

Is it possible, during run-time in an application, to multiplex SCB1 between P0 and P3? I'm thinking build/synthesis only allows a fixed SCB-to-port mapping, but that would make a world of difference if this can be dynamic!

If not possible, I'm open to alternate approaches. UART is not a requirement, slow baud rade is okay (e.g. 9600) but flash memory is tight. SW UART component is Tx only. I feel writing my own Rx or protocol would be a time sink.

Thanks!

 

BLE OTA Fixed Stack with Use of BLE API service in the bootloadable

$
0
0

Hello,

I am working on an existing project which uses BLE services. A BLE component was defined in its design. 

In order to implement a OTA functionality in the existing project, I created a Fixed Stack Bootloader Project in the workspace, configured it (as well as the existing project to be bootloadable) using the AN 9706. I then followed the instruction from the "BLE OTA Fixed Stack Bootloader and Bootloadable"for adding service to the bootloadable:

I first added the APIs needed by the bootloadable in the linker Script of the bootloader cm0gcc.ld (eg KEEP(*(i.CyBle_Start)))
Then, ran the mk.bat file to generate the bootloadable linker Script BootloaderSymbolGcc.ld

My problem is now that I should add the used BLE APIs as extern declaration (as well as the BLE types and defines) to the OTAMandatory.h file of the bootloadable project. That is where I am stuck because I do not know how to do that and I did not find example projects on the forum with the bootloadable using BLE services.

Thank you in advance.

Quadrature decoder at PSoC 4

$
0
0

Hello. Sorry for my english, I'm using a Google translator.

I want to use the quadrature decoder module to connect the mechanical encoder to the PSoC 4 (CY8CKIT-049-4200). When I add the module and collect the project, I get a message "E2071: Unable to pack the design into 4 UDBs." See the Digital Placement section of the report file for details. "
I watched in datashit that the component of the quadrature decoder (8 bits) takes 6 PLDs, if the filter is off, and 7 PLDs if the filter is turned on. By default, the filter is enabled. I turned off the filter, and was able to assemble the project. Why does not the default component allow me to build a project? Is there not enough macrocells in CY8CKIT-049-4200 4 for this?
I do not want to put external capacitors, I need this filter. I tried to add 1 external filter such as "Glitch Filter", and the project again refused to assemble with the same wording of the problem.

I was able to assemble the project by adding 2 elements such as "Debouncer". Will this element be used as a simple alternative to "Glitch Filter"?

Attachments: 

Cheapest PSoC with CAN?

$
0
0

Hi,

I would like to know what's the cheapest PSoC4 device with CAN support, so far i know 4200 doesn't have CAN, i guess 4000 doesn't have it neither. I know 4200M do have CAN support.

Tha purpose of this is develop a CAN node for learning purposes, so i will try to keep it as "cheap" as possible for ~5 prototypes.

 

Thanks in advance

Carlos

ADC to PWM

$
0
0

Hello All!

 

I have a need to generate a PWM signal with an adjustable duty cycle controlled via a 10K POT.   Having a bunch of 8 pin CY8C4014SXI-420 chips laying around I decided to try using them for this project.  Just enough room for Analog Input and PWM Output.

I am attaching my project which 'should' work.  Of course it doesn't....

I am using the CSD_ADC component and feeding it's output to the compare of the PWM component.  I started from an example I think i found in the component docs.  I have increased a couple of the delays to try getting it to work, but still a no go.

When debugging, I basically get only 1 value from the ADC (0x19FE) with it connected as shown.  I get basically a 0x01 when the pin is disconnected from the resister.  With my multimeter, I am reading about 1.2V at the pin when connected, no matter the POT setting.  (Sweep arm of pot is verified working and voltage is changing when disconnected from PSoC...)

I have tried 3 different chips, so I don't think the issue is hardware.

Anyone have ideas?

Dan

the PSoC 4 Firmwarezip for CY8C4245AXI-483 cannot change the device for CY8C4125AXI-483

$
0
0

HI, I change the the device for PSoC 4 Firmware.zip  from the  CY8C4245AXI-483 to the  CY8C4145AXI-483.I rebuild the project ,have many error.I has buyed the CY8C4145AXI-483, Can you give us the correct file of the PSoC 4 Firmware.zip for the CY8C4145AXI-483,I use  two days  but didn't change it to be good.My mail:705486026@qq.com,I thank you  very much! The Below is the error an your web. 

BLDC motor

$
0
0

Hello,

Will the output pattern be changed for different pole pairs in BLDC block commutation using hall sensor?

 

Thanks


Problem routing SPI SCB

$
0
0

Hi,

I have a problem with the project attached. I'm trying to figure out the best pinout of our device to develop a PCB. It seems I have done everything correctly but I get theses errors:

FFB and IO placement failed: Failed to find a valid placement for \SPI_1:SCB\.

The fitter aborted due to errors, please address all errors and rebuild.

And I can't find any information of why this error is happening and therefore I can't figure out a solution.

Can anyone help me with this?

Thank you

Programmable load with PSoC4

Is there a chip with BLE and GraphicLCDIntf ?

$
0
0

Hello,

As mentioned in the title,I want to know if there is a chip can integrate Bluetooth and GLCD at the same time.If not,I also want to know if there is any other way to implement Bluetooth and GLCD functions?

Thanks in advance.

SCB SPI interface not receiving

$
0
0

I'm trying to get the SCB SPI interface working with a CY8CKIT-046 because on my actual project I have to use this method rather than the regular non-SCB SPI interface. On this devkit, if I use non-SCB, I can recieve data just fine, but if I use the same pins or even a different set, and use the SCB SPI interface on both configured and unconfigured, I can't get it to receive any data packets from the other SPI device that is spamming out data every half second. What is the difference between the two interfaces? 

When I follow the debugger, I notice that when it goes into SPI_1_SpiInit(&config) and then into SPI_1_SetPins, there is a section that says it disables the input buffer:

#if (SPI_1_TX_SDA_MISO_PIN)
                /* Disable input buffer */
                 pinsInBuf |= SPI_1_TX_SDA_MISO_PIN_MASK;

 

and then used in 

#if (SPI_1_TX_SDA_MISO_PIN)
        SPI_1_SET_HSIOM_SEL(SPI_1_TX_SDA_MISO_HSIOM_REG,
                                       SPI_1_TX_SDA_MISO_HSIOM_MASK,
                                       SPI_1_TX_SDA_MISO_HSIOM_POS,
                                        hsiomSel[SPI_1_TX_SDA_MISO_PIN_INDEX]);

I can't see anywhere that it is re-enabled, and I have tried editing this value at runtime to see if it makes a difference by just keeping it enabled, and whether I add the other pin masks to the value or set it all to 0, it doesn't do anything. Here is my setup configuration. 

SPI_1_SPI_INIT_STRUCT conf;
    memcpy(&conf,&SPI_1_configSpi,sizeof(SPI_1_SPI_INIT_STRUCT));
    conf.mode = SPI_1_SPI_SLAVE;
    conf.submode = SPI_1_SPI_MODE_MOTOROLA;
    conf.sclkMode = SPI_1_SPI_SCLK_CPHA0_CPOL0;
    conf.rxBufferSize = 32u;
    conf.rxBuffer = buffer;
    conf.txBufferSize = 32u;
    conf.txBuffer = txbuffer;
    conf.enableInterrupt = 1u;
    conf.rxInterruptMask = SPI_1_INTR_RX_NOT_EMPTY | SPI_1_INTR_RX_FULL;
    
    SPI_1_SpiInit(&conf);

 

Any Ideas? 

 

which files to archive for a design.

$
0
0

Hello all,

I am unsure which files actually contain source material and which are derived or statically installed.

I have been archive my own .c/.h files, and the TopDesign.cysch only. Is this adequate to restore a project?

--Gregg

Viewing all 764 articles
Browse latest View live


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