Quantcast
Channel: Cypress Semiconductor - PSoC 4 BLE
Viewing all 757 articles
Browse latest View live

Updated OTA External Memory bootloadable does not compile

$
0
0
Forums: 

The started with the BLE OTA External Memory bootloader/Bootloadable example project and it ran just fine on the pioneer board.

When I updated the components ane re-compiled,  the bootloadable  output indicates 4 undefined references.

The bootloader/bootloadable 1.50 document (page 16) indicates added defines but does not indicate where and what

if any/ changes are required for the base example code.

Any assistance would be appriciated.


Is the BLE stack free'd after each CyBle_ProcessEvents() call?

$
0
0
Forums: 

I'm running into an issue where I believe that I'm overflowing the BLE stack with notify events. I can't seem to find any documentation of if the BLE stack is processed and empty after every CyBle_ProcessEvents() call. 

I have a function that looks like this: 

 

    while(temp != NULL) {        

        if (CyBle_GattGetBusStatus() == CYBLE_STACK_STATE_FREE) {

            // This methods writes data to the GATT profile 
​            printEvent(temp);

            temp = temp->next;

        }

    }

 

So my understanding is that the only time my printEvent() function will be called only when the BLE stack is free....

However, after a few runs through this I start getting CYBLE_INVALID_OPERATION error. This is leading me to believe that the stack is overflowing somehow....

 

This question is working off of this one: http://www.cypress.com/forum/psoc-4-ble/extremely-weird-error-when-writi...

please tell me how to set random device address

$
0
0
Forums: 

I use PSoC Creator3.3.

Please tell me how to set  (Advertiser Address Type=random )  on broadcaster role?

Best Regards,yoshizu

 

 

ANY idea for infrared library specifications for psoc?

$
0
0
Forums: 

I am doin a project on psoc ble based universal remote with iot connection.So is there any infrared library supporting psoc programming (like kin shirrifs infra library in arduino).Help me out.Because defining functions for each appliance is making it too tedious and long.Other then AnalysIR if any please do reply me....

Disconnection from GATTserver (GAP Peripheral)

$
0
0
Forums: 

Hello All,

I am Anthony and now I am doing a bluetooth controlled padlock using mobile app and I use PSoC4BLE module, CYBLE-224110-00. In this project, we have low-power-mode feature and the lock will sleep after it's unlocked or locked. So I use deep-sleep mode I want to stop the ble before entering into the sleep mode so I want to disconnect the connection with the phone before stopping the ble. What should I need to do? Thanks.

Update BLE values while connected

$
0
0
Forums: 

I am not sure about how this works. I have never tried to run a program with BLE before I think.

I have a program which I have to update. I modify some things (nothing related with ble behaviour). things like: now this sketch controls 5 motors and it has to control 10, not i has 2 force sensors and it has to control 3... This kind of stuff. BLE file is almost equal.  I just add notifications for new variables.

I have a problem when I try to run the program in my pioneer development board (ble version). It hangs and gives an error:

"Debugger exited unexpectedly during run. Encountered error (Target disconnected See output window for more information.)"

Clicking over Show more details" gives:

"There was an unhandled error during the debug session. This has forced the debugger to shutdown. Try again."

I am testing it without anything connected. Just to see if it works. So maybe this is the problem and I need to connect everything to make it working.

As soon as main function starts, InitializeSystem is called:

[code]

void InitializeSystem(void)
{
    CyGlobalIntEnable;                //Activate mask of interrupts
    CyBle_Start(CustomEventHandler);  //Init BLE and set event handler function
    ADC_IRQ_StartEx(ADC_ISR);         //Interrupt for reading ADC
    isr_button_StartEx(MyISR);
    /*Set vector for WDT interrupt to desired function. This function will be in charge of updating values to be sent by BLE*/
    CyIntSetVector(WATCHDOG_INT_VEC_NUM, &WDT_INT_Handler); 
    InitializeWatchdog();
    OPA_Start();                     //Start OPA
    OPA_Enable();
    ADC_Start();                     //Start ADC
    ADC_StartConvert();
    //CyDelay(1000);
}

[/code]

I have read on other post about in the latest version of BLE watchdog is not used. It is used something called BLESS??. Maybe this is the problem. The current version of my software was built with an older version of PSOC and components. And now I updated the whole project to the latest one.

My problem is that if I set watchdog as active (in Initialize function), that function never ends. And in case it does, something goes wrong and it crashes.

I would want the code to reach this line in main():

[code]

for(;;) {       
        CyBle_ProcessEvents();

        ...

[/code]

I am developing a pcb to keep all my stuff there but unitl I have it printed, I have to test my code in this board.

Capsense Slider with both button function and slide.

$
0
0
Forums: 

Hey somebody out there...

I have a question about the Capsense slider.
Is it possible to make it have to functions at the same time? 
I done the tutorials and the best example is the video nr. 13 but is only one function there.  http://www.cypress.com/training/psoc-101-video-tutorial-series-how-use-arm-cortex-m0-based-psoc-4 

The functions that i like to have is:

1) Turn the volume op and down on my phone.
2) doublet tap on the slider to make a Pause/Play for music.

The nr. 1 volume part is done, I already made it. But the next step is the tricky part. I have attach the code.   

Print out uint64 to UART

$
0
0
Forums: 

I'm trying to simply print out a uint64 to UART. Currently I'm trying this: 

uint64 = 12345678;
char buff[10];
​sprintf(buff, “%” PRIu64, param);
UART_UartPurtString(buff);

Which all I get out from that is "lu" in the UART window.  I've tried other options I found on stack overflow but they all give the same output...Is there something I'm missing here? 


What to do before Entering into the deep-sleep mode

$
0
0
Forums: 

Hi Everyone,

I am Anthony, an Embedded Software Engineer. Currently, I am working on bluetooth-controlled padlock project for which we use PSoC BLE module (CYBLE-224110-00). In this project, we add low-power feature after unlocking the lock from the lock owner's phone app using bluetooth message. So, I put the code which enter into the deepsleep mode after unlock. But even after I put all modules and pin into sleep mode and stop the ble module before entering into CySysPmDeepSleep(); , the current consumption is so high after the device is sleep. I want to know what are the steps to do before entering into the sleep mode. Thanks.

Setup RTC time using unix timestamp

$
0
0
Forums: 

I'm attempting to set the current time of my RTC by sending a Unix timestamp from a smartphone to the device. I am successfully able to get the timestamp from my smartphone to the ble device. 

If I try to just hardcode something to test like this: 

uint64_t out = 1475591308;
RTC_SetUnixTime(out);

My RTC clock goes to 1/11/2372 ??  Am I not implementing this right? The method signature in the RTC.h is: 

RTC_SetUnixTime(uint64 unixTime);

And the docs say: 

Sets the time in the Unix/Epoch time format - the number of seconds elapsed from January 1, 1970 UTC 00:00 hrs. 

===

Update: I've changed nothing and now when setting the unix time it freezes....story of my life. 

I'm trying to call RTC_SetUnixTime in my BleCallBack method if that helps at all. 

Vref pin as input.

$
0
0
Forums: 

Hi,

 

Can Vref pin (10) on CYBLE-212019 be set up as digital input? I have a switch connected to it.

How?

Thanks

Fidel

Bootloader Issues Stack Trace

$
0
0
Forums: 

Hi all

Has anyone seen the following stack trace in the PSoC Creator 3.3 Call Stack window. Ignore lines 13 thru 17 as they are specific to my code.

0 IntDefaultHandler() .\Generated_Source\PSoC4\Cm0Start.c 123 0x00004940 (All) 
1 <signal handler called>() ?????? ?????? 0xFFFFFFF9 (All) 
2 llh_clear_ack() ?????? ?????? 0x0001060E (All) 
3 ll_process_acks() ?????? ?????? 0x0000E69E (All) 
4 ll_handle_conn_interrupt() ?????? ?????? 0x0000F588 (All) 
5 ll_decode_interrupt_type() ?????? ?????? 0x00012310 (All) 
6 ll_task_handler() ?????? ?????? 0x0001234C (All) 
7 llft_service_queue() ?????? ?????? 0x00013FFA (All) 
8 llf_task_start_routine() ?????? ?????? 0x00013F52 (All) 
9 CyBle_StackTaskHandler() ?????? ?????? 0x0000C734 (All) 
10 OS_scheduler() ?????? ?????? 0x0000D61E (All) 
11 CyBleStackMgr_ProcessBleEvents() ?????? ?????? 0x0000C1CA (All) 
12 CyBle_ProcessEvents() ?????? ?????? 0x0000BD1C (All) 
13 HalBleProcessEvents() ..\Source\ClientSource\Hal_BLE\HalBle_Client.c 570 0x00003AB4 (All) 
14 SystemBleProcessEvents() ..\Source\ClientSource\System_Interface\SystemBleInterface_Client.c 71 0x00000590 (All) 
15 SYSTEM_BOOTLOADER_doRecurringActions() ..\Source\ClientSource\System_Interface\SystemStateControl_Client.c 1161 0x00001834 (All) 
16 SystemStateControl_Client() ..\Source\ClientSource\System_Interface\SystemStateControl_Client.c 194 0x00000B8A (All) 
17 main() ..\Source\ClientSource\Application\BLE_UART_Client.c 21 0x000002AC (All) 

The issue I am having is that my OTA Firmware application will randomly fail (1 in 8 times approximately) and the BLE Client will be locked in the IntDefaultHandler() routine.

The sequence is as follows:

  1. Windows application reads .cyacd line.
  2. Windows application sends the queue command and data via UART to Client (CY8C4248LQI-BL583).
  3. Client device uses "CyBle_GattcWriteLongCharacteristicValues" to write to Server Device (CY8C4248LQI-BL583).
  4. Server device actions the command.
  5. Windows application sends the program command and data via UART to Client.
  6. Client device uses "CyBle_GattcWriteLongCharacteristicValues" to write to Server Device.
  7. Server device actions the command.
  8. Windows application sends the verify command and data via UART to Client.
  9. Server Device actions the command.
  10. Repeat for next .cyacd line.

I get the failure after I write either the queue or the program command, so it looks like it is during the period that the BLE stack is sending the data to the server.

I know the Server side is working correctly as I can use the CySmart 1.2 tool to update the server firmware.

Thanks

John

Converting float to char [] to print in UART.

$
0
0
Forums: 

This seems extremely trivial but I'm trying to convert a float to the char [] so I can print it out in UART. Here is how I'm trying to achieve this: 

char buff[10];
float test = 2.32
sprintf(buff, "%f", test);
UART_UartPutString(buff);

However doing this nothing is printing out...The above is what i've seen on all the examples :,( why isn't this working for me. 

Clock PSoC4BLE

$
0
0
Forums: 

Hi everyone,

I'm using a CY8C4247LQI-BL483 and for our application the use of the bluetooth is not necessary, I'm wondering if I can remove from my design the two crystal 32Khz(WCO) and 24Mhz (ECO). If I'm right I will be able to choose ILO and IMO as define in the datasheet's schematic:

 

Attachments: 

PSOC 4 BLE Number of notifications sent

$
0
0
Forums: 

Hello everybody,

I have notice some strange behavior when trying to send some bursts of notifications over BLE. I will explain a little what I am doing.  I compute some data after my device will be first connected to another client(dongle, smartphone app, etc). After the client disconnects my device I will continue to save data in RAM until the RAM is full, then transfer all the bytes from RAM to FLASH and so one, until both FLASH and RAM are full if no connection is done. Once a connection is establish and the notification of my characteristic is enabled by the client I intend to empty both FLASH and RAM by bursting a number of notification with size 17.(if Both flash and ram is full I have about 180 kB of data).

What I observed is that the BLE sends 10 such burst notifications and stops sending them even if the code still sends notifications.

My call: /* Notify the phone that the values are update */
    CyBle_GattsNotification(cyBle_connHandle,  &tempHandle);

CyDelay(5);

This happens not only when I try to sent that 180kB but also if I only try 11 notifications.

So my questions:

Does PSOC 4 have the same Credit behavior like Nordic Chips, if someone worked with such thing? The credit behavior is like this: you have a number of bytes that can be sent and if you run out of credit you should put a while(delay, etc) until you will receive more or your data will not be sent.

Should I do other approach to overcome this problem?

I should mention that my code did not break even if the 180kB will introduce some Delay. The data from RAM, FLASH is correct and the code for sure calls the GattsNotification function for a lot of times. I have the same problem also in some status characteristics that should send 11 notifications once in a while. We developed another code for a Nordic nRF8001 chip with credit behavior and it sends even hundreds of notification without a problem. I have CY8C4248LQI-BL583 chip with 256 kB Flash/32 kB RAM.

Thank you!


Timer Continuous TC Interrupt only triggered once

$
0
0
Forums: 

I am trying to set up a periodic interrupt using the Timer 2.7 module. But I see that the interrupt is only triggered once ever.

I tried the same setup with the TCPWM module, and the periodic interrupt works fine.

The only difference in firmware that I see is the clearing of interrupt flag with TCPWM implementation. But Timer's datasheet says that interrupt is cleared automatically with this module, and there is no software interface to clear the interrupt either.

Could anyone give me an idea why the Timer module is not working the way I expect it to?

Edit 1: Update with Workspace Bundle as requested.

 

Help in a new project (mic,sdcard,ble)

$
0
0
Forums: 

Hello,

I am new to cypress products, and i have the cyc8kit-042-ble. I'm an electronic student and i have been requested to make a system that have 4 MEMS microphones (3 digitals,1 analog) to record sound, store it to an sdcard (maybe 64gb), send it over bluetooth on user request.
(The stored files would be analysed later to count words but it is not my part.)
See first block diagram (look at picture).

1) Is this all system is possible on the kit i have ? how would it be complicated for a student like me ?
2) How to connect an sd card to the kit, is there any module/shield compatible ? i didn't find any component in the list (top design) neither some library. What kind of communication ?
3) What components for the top design would i have to use ? (mic = mems ? , buffers , mux ,etc)
4) Is there some code to cancel noise, and for wav format ?

Thank you.
Gabriel.

ps: sorry if there are some english mistakes, it is not my native language.
 

 

Attachments: 

CY Boot Infinite Loop Problem

$
0
0
Forums: 

Hello I am trying to execute the following code: 

int main()
{

    /* Initialize ADC. Conversion is not enabled yet. */
    //void ADC_Start();
    CyGlobalIntEnable;
   ADC_Start();
   ADC_IRQ_Enable();
   ADC_StartConvert();

    /* Start ADC conversion. */
  for(;;)
{
while(row_count<2u)
{
       CySysFlashWriteRow(row_count,Buffer);
  
}      

        for(k=1u;k<2u;k++)
        {
        *readptr = CY_FLASH_BASE + (k*CY_FLASH_SIZEOF_ROW);
        for(byte_count=0u;byte_count< CY_FLASH_SIZEOF_ROW;byte_count++)
          {
          read_data[byte_count] = (*(uint8 *)(readptr + byte_count));
          //byte_count++;
          }
      //  k++;
        }

}
}  
          

However, after writing and entering the     for(k=1u;k<2u;k++) loop it enters into this while loop which I found from debugging: 

 #ifdef CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK
        CyBoot_IntDefaultHandler_Exception_EntryCallback();
    #endif /* CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK */

    while(1)
    {

    }

Any ideas as to what the problem might be?

How to check version and update BLE Stack

$
0
0
Forums: 

Hi

Currently, I'm using Cyble ProC BLE and I wonder how can I check and update the BLE Stack inside. Because I think maybe the Stack should be updated to fix some remain issues.

Thanks

psoc ble universal remote

$
0
0
Forums: 

I am doin a project on psoc ble based universal remote with iot connection.So is there any infrared library supporting psoc programming (like kin shirrifs infra library in arduino).Help me out.Because defining functions for each appliance is making it too tedious and long.Other then AnalysIR if any please do reply me....

Viewing all 757 articles
Browse latest View live


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