cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Hi sir i am interfacing cyble 22001 with Thermocouple ic USING SPI.But while reading data i am getting only 0xff.

my code is here.

uint8  MAX31856_Read_Data(uint8 Reg_Addr)

{

uint8_t ReadData = 0;

    uint8_t dummy = 0;

    SPIM_SpiUartClearRxBuffer();

    SPIM_SpiUartWriteTxData(Reg_Addr);

    while (!SPIM_SpiUartGetRxBufferSize());

    dummy  = SPIM_SpiUartReadRxData();

     SPIM_SpiUartWriteTxData(0xFF);//writing Dummy Data

    while (!SPIM_SpiUartGetRxBufferSize());

    ReadData = SPIM_SpiUartReadRxData(); // Read Data

    return ReadData;

   }

if  i am using this while(!(SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE));  compiler unable to find  SPIM_ReadTxStatus()  and SPIM_STS_SPI_DONE)

generates error. please help me to solve the issue.Thanks in advance..

0 Likes
Reply
14 Replies
Anonymous
Not applicable

And also in the code i am adding header files

#include  "SPIM.h"

#include "SPIM_SPI_UART.h"

if  i am using this while(!(SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE));  compiler unable to find SPIM_ReadTxStatus()  and SPIM_STS_SPI_DONE)

generates error. please help me to solve the issue.Thanks in advance..

0 Likes
Reply
Esteemed Contributor II

Can you please post your complete project so that we all can have a look at all of your settings. To do so, use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file.

There is no need to #include component header files, this is done automatically.

Bob

0 Likes
Reply
Anonymous
Not applicable

if  i am using this while(!(SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE));  compiler unable to findSPIM_ReadTxStatus()  and SPIM_STS_SPI_DONE)

generates error. please help me to solve the issue.Thanks in advance..

0 Likes
Reply
Anonymous
Not applicable

Fyi: & and && are different operations; If you are looking for a logical comparison between the SPIM_ReadTxStatus() and the SPIM_SPI_DONE being both true, then use the double ampersand, else the bit and with the single ampersand as you are doing is fine.

0 Likes
Reply
Anonymous
Not applicable

Thanks for reply

But here the problem is when i use this  function  SPIM_ReadTxStatus() ;  compiler generates error i.e,unable to find

SPIM_ReadTxStatus() ; 

0 Likes
Reply
Anonymous
Not applicable

Hi,

              i want to send the rtc time stamp to the mobile. And i able to send this.but the problem is while programming the chip the RTC takes the internal time

and it starts updating.But i want to set my own time not the psoc time i.e, my time is  10:10:10(H:M:S)->10hr,10min,10sec.

even if i use below API'S to set the time  it's not working

RTC_SetSecond(time,10);

RTC_SetMinutes( time, 10);

RTC_SetHours( time,10 );

The RTC as usal starts from the psoc internal RTC time

Please help me to resolve the issue.

please find the attachment

Thanks in advance

0 Likes
Reply
Anonymous
Not applicable

please find below attachment.

in that i want max31856

0 Likes
Reply
Anonymous
Not applicable

Looking at your attached project, it looks like you are not handling the header file includes to allow your code to handle references to functions/variables in other files.

Use Header File Guards

Include files should protect against multiple inclusion through the use of macros that "guard" the files. Note that for C++ compatibility and interoperatibility reasons, do not use underscores '_' as the first or last character of a header guard (see below)

#ifndef sys_socket_h #define sys_socket_h  /* NOT _sys_socket_h_ */ #endif 

Also, you are referencing "max31855". Change the references to "max31856".

Otherwise, just look at the compiler errors and step through them from top to bottom to solve most issues

0 Likes
Reply
Anonymous
Not applicable

HI,

i have created custom service and build but source code foe custom service is not generated

can you please help me

thanks in advance

0 Likes
Reply
Anonymous
Not applicable

HI,

i have created custom service and build but source code foe custom service is not generated

can you please help me

thanks in advance

please find the attachment

0 Likes
Reply
Anonymous
Not applicable

It looks to build and generate the code fine.

The custom service/code doesn't create code in quite the same format as the standard services, but you can still use and interact with it in a similar fashion. Check out the "BLE_custom.c" and "BLE_custom.h" files under the "Generated_Source/PSoC4/BLE/" folder in the left-hand-side window to see the handles/attribute constants created for the custom service you created.

Also, check out this guide on custom services for BLE: http://www.cypress.com/documentation/application-notes/an91162-creating-ble-custom-profile

Here is the datasheet for the BLE component that should help you out too: http://www.cypress.com/documentation/component-datasheets/psoc-creator-component-datasheet-bluetooth...

The datasheet is also available by right-clicking the BLE component and selecting "Open Datasheet"

Finally, here is a video describing the process of adding a custom service: PSoC 4 BLE 101: 4. Add a Custom CapSense Service | Cypress Semiconductor

0 Likes
Reply
Anonymous
Not applicable

Thank you sir for your reply.

*****************************************************PWM PROBLEM********************************************

I  want to generate the  PWM output continuosly. but after 1 minute(i.e not exactly may be few seconds)  PWM not generating

any clk period. But if i made CyBle_ProcessEvents(); statement commented then it's working fine  but i think to access the ble data

CyBle_ProcessEvents();  is mandatory but pwm is not working.

Please help me sir to solve the issue.

Thanks in advance.

0 Likes
Reply
Anonymous
Not applicable

*****************************************************PWM PROBLEM********************************************

I  want to generate the  PWM output continuosly. but after 1 minute(i.e not exactly may be few seconds)  PWM not generating

any clk period. But if i made CyBle_ProcessEvents(); statement commented then it's working fine  but i think to access the ble data

CyBle_ProcessEvents();  is mandatory but pwm is not working.

I WANT TO GENERATE PWM CONTINUOSLY without stopping.

Please help me sir to solve the issue.

Thanks in advance.

0 Likes
Reply
Anonymous
Not applicable

See your new thread with response there: PWM Problem

0 Likes
Reply