PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
Hi everyone,
I am using CYBL11172-56LQXI in my project. I am trying to read hex values of the bootloader from flash starting at address 0x0000 (where the bootloader starts) but the values received are incorrect.
Also the values read from the address where the bootloadble application starts are correct. I wonder what's the difference as both data are in the same flash and would be very helpful if someone could comment on this.
Thank you.
Show LessI realize this is a specific question but I'm having trouble with having CYBLE-202007-01 BLE module communicate with a BNO055 absolute orientation sensor (IMU) (https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview). The bluetooth module advertises but when connecting to it with my laptop, it shortly disconnects. This problem doesn't happen with communication of the bluetooth module and a load cell however. I can include the code if that would be helpful.
Thank you.
Show LessHi
I'm trying to write a hex file and program using PSOC programmer. I'm using the information in this document (Document 001-91508 Rev. *B)
http://origin-www.cypress.com/file/137281/download
In section 2.3 it details the HEX file format. Great. However for metadata it shows Internal Use is not required to program. Except it is!
If I have the wrong values in a generated file PSOC programmer says "FAILED! Hex File parsing failure. Meta Data is corrupted"
So... what are the values here. Clearly the last two bytes change:
:0200000490501A
One image:
:0C00000000020E50119E00010EECF1F603
Another:
:0C00000000020E50119E00010EE5355E5E
Is this documented somewhere?
Many thanks, Dave
Show LessHello Forum,
ARM provides CMSIS DSP library for its Cortex - M processor.
Has any one developed any projects using this library with the PSOC Creator?
Show LessHello,
I am using a bootloadable component in my project which points to bootloader.hex. The bootloader.hex is generated from a bootloader project which is a UART bootloader. In short, I can update the firmware in my CYBLE module using an external embedded host via UART.
I am using the UART host bootloading code from cypress to update my CYBLE. I was able to update my CYBLE successfully. So far so good. My image is of type .cyacd.
I am interested in knowing how the bootload component works. What happens if I interrupt the firmware update? Will my previous application run because the new image update was interrupted?
Say at 99% if I interrupted the firmware update and restarted the module, what will the CYBLE run? Can I issue an update to CYBLE again in this stage?
Can a CYBLE ever enter into a state which causes the bootloader not to kick in?
Thanks
Dheeraj
Show Less①サンプルCE216892のデバイスのVIDとPIDの値は正しいのでしょうか?
Is the VID and PID values of the device of sample CE 216892 correct?
※ce216892(Document No .002-16892)
他サンプルCE210486と画像が一緒の様なのですが?
The other samples CE 210486 and the PID and VID values are the same, is not there a mistake?
※ce210486(Document No .002-10486)
②CE216892とCE210486のブートローダファイル(KitProg2_Custom_2.cyacd)は、同じものでしょうか。
[CE216892のブートローダファイルが、CY8CKIT-041-40XXにプログラムできたので確認しております。]
Is the boot loader file (KitProg2_Custom_2.cyacd) of CE 216892 and CE 210486 the same file?
[The bootloader file of CE 216892 could be programmed to CY 8 CKIT - 041 - 40 XX.]
Show LessHello,
I'm trying to get the CYBLE-202007-01 BLE module to advertise (can't find it with phone) and can't figure out why. I'm using it with the CYBLE-202007-EVAL board and CY8CKIT-042-BLE Pioneer Kit. The previous BLE module (VY8C4247LQI-BL483) I was using advertises but it is PSoC instead of PRoC. Do you have to do something different to get PRoC BLE modules to advertise?
Show LessHi all,
I am working on CY8CKIT-043. I needed at least 32-bit for a quadrature decoder in my project, however, TCPWM only offers16-bit of counter width.
I wanted to extend the 16-bit to 32-bit, but, the only interrupt source available are "terminal_count" and "compare".
I believe I will need at least an overflow and underflow flag for me to get this to work.
I know I can't use non-TCPWM QuadDec because it consumes all of the UDBs.
Any tips?
Thank you.
Show LessHi,
i am struggling a bit with the watchdog on PSoC 4 and Cascading Watchdog. Here is my program:
I have following questions:
1. How long are the intervals from WDT_COUNT0_MATCH and WDT_COUNT1_MATCH respectively? How can i translate the hex values to milliseconds? How can i measure how long my program takes to see if the watchdog interval is long enough?
2. Do i need the cascade for my program? I just want to be sure my program never hangs up, since its in a sealed environment.
3. I tried with only one WDT counter an no cascade and resette the timer in the main while loop with CySysWdtResetCounters(CY_SYS_WDT_COUNTER0_MASK); but it didnt reset the wdt.
When i use the cascade construct, like in the code below and call CySysWdtResetCounters(CY_SYS_WDT_CASCADE_01); in the main loop it works, but i still have no idea how to measure the time my program needs for one run and how big to set the timers...
Please give me some advice on how to implement a simple proper WDT to detect program hang ups.
Thanks in advance,
Patrick
CODE:
/*******************************************************************************
* File Name: main.c
*
* Version: 1.0
*
* Description:
* BLE example project that works as a BLE to UART bridge, using
* Cypress's BLE component APIs and application layer callback.
* This project demostrates a custom service usage for BLE to UART
* bridge in a PERIPHERAL role.
*
* References:
* BLUETOOTH SPECIFICATION Version 4.1
*
* Hardware Dependency:
* (1) CY8CKIT-042 BLE
* (2) An external UART transciever (if flow control is needed)
*
********************************************************************************
* Copyright 2015, Cypress Semiconductor Corporation. All rights reserved.
* You may use this file only in accordance with the license, terms, conditions,
* disclaimers, and limitations in the end user license agreement accompanying
* the software package with which this file was provided.
*******************************************************************************/
#include "main.h"
/* WDT counter configuration */
#define WDT_COUNT0_MATCH (0x4FFFu)
#define WDT_COUNT1_MATCH (0x0008u) //0008u
/* Prototype of WDT ISR */
CY_ISR_PROTO(WdtIsrHandler);
uint8 proximityWasActive = 1;
uint16 ms_count = 0;
//Debouncing the CapSense
CY_ISR(MY_ISR) {
ms_count++;
if(ms_count == 500) { // 0.1 seconds
proximityWasActive = 1; //Reset proximity switch
ms_count = 0; // reset ms counter
}
}
int main()
{
#ifdef LOW_POWER_MODE
CYBLE_LP_MODE_T lpMode;
CYBLE_BLESS_STATE_T blessState;
#endif
CYBLE_API_RESULT_T bleApiResult;
/*######################
Start the Watchdog Timer
######################*/
/* Setup ISR for interrupts at WDT counter 0 events. */
WdtIsr_StartEx(WdtIsrHandler);
/* Enable global interrupts. */
CyGlobalIntEnable;
/* Set WDT counter 0 to generate interrupt on match */
CySysWdtWriteMode(CY_SYS_WDT_COUNTER0, CY_SYS_WDT_MODE_INT);
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER0, WDT_COUNT0_MATCH);
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER0, 1u);
/* Enable WDT counters 0 and 1 cascade */
CySysWdtWriteCascade(CY_SYS_WDT_CASCADE_01);
/* Set WDT counter 1 to generate reset on match */
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER1, WDT_COUNT1_MATCH);
CySysWdtWriteMode(CY_SYS_WDT_COUNTER1, CY_SYS_WDT_MODE_RESET);
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER1, 1u);
/* Enable WDT counters 0 and 1 */
CySysWdtEnable(CY_SYS_WDT_COUNTER0_MASK | CY_SYS_WDT_COUNTER1_MASK);
/* Lock WDT registers and try to disable WDT counters 0 and 1 */
CySysWdtLock();
CySysWdtDisable(CY_SYS_WDT_COUNTER1_MASK | CY_SYS_WDT_COUNTER0_MASK);
CySysWdtUnlock();
/*######################
Start CapSense Component
######################*/
/* 1. Enable Proximity sensor as it is disabled by default */
CapSense_1_EnableWidget(CapSense_1_PROXIMITYSENSOR0__PROX);
/* 2. Start CapSense block - Calibrates the proximity sensor for the set sensitivity setting (in the Scan Order tab of Component Configuration */
CapSense_1_Start();
/* 3. Initialize Proximity baseline */
CapSense_1_InitializeSensorBaseline(PROXIMITY_SENSOR_INDEX);
/* 4. Setup a timer to debounce the CapSense */
Timer_1_Start();
debounce_timer_isr_StartEx(MY_ISR);
/* Start UART and BLE component and display project information */
UART_Start();
bleApiResult = CyBle_Start(AppCallBack);
//Test the UART
UART_UartPutString("\n\r***************** UART TEST OK *****************\n\r");
if(bleApiResult == CYBLE_ERROR_OK)
{
#ifdef PRINT_MESSAGE_LOG
UART_UartPutString("\n\r************************************************************");
UART_UartPutString("\n\r***************** BLE UART example project *****************");
UART_UartPutString("\n\r************************************************************\n\r");
UART_UartPutString("\n\rDevice role \t: PERIPHERAL");
#ifdef LOW_POWER_MODE
UART_UartPutString("\n\rLow Power Mode \t: ENABLED");
#else
UART_UartPutString("\n\rLow Power Mode \t: DISABLED");
#endif
#ifdef FLOW_CONTROL
UART_UartPutString("\n\rFlow Control \t: ENABLED");
#else
UART_UartPutString("\n\rFlow Control \t: DISABLED");
#endif
#endif
}
else
{
#ifdef PRINT_MESSAGE_LOG
UART_UartPutString("\n\r\t\tCyBle stack initilization FAILED!!! \n\r ");
#endif
/* Enter infinite loop */
while(1);
}
CyBle_ProcessEvents();
/***************************************************************************
* Main polling loop
***************************************************************************/
while(1)
{
CySysWdtResetCounters(CY_SYS_WDT_CASCADE_01);
CyDelay(10);
#ifdef LOW_POWER_MODE
if((CyBle_GetState() != CYBLE_STATE_INITIALIZING) && (CyBle_GetState() != CYBLE_STATE_DISCONNECTED))
{
/* Enter DeepSleep mode between connection intervals */
lpMode = CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP);
CyGlobalIntDisable;
blessState = CyBle_GetBleSsState();
if(lpMode == CYBLE_BLESS_DEEPSLEEP)
{
if((blessState == CYBLE_BLESS_STATE_ECO_ON || blessState == CYBLE_BLESS_STATE_DEEPSLEEP) && \
(UART_SpiUartGetTxBufferSize() + UART_GET_TX_FIFO_SR_VALID) == 0u)
{
#ifdef FLOW_CONTROL
EnableUartRxInt();
#endif
CySysPmSleep();
#ifdef FLOW_CONTROL
DisableUartRxInt();
#endif
}
}
else
{
if((blessState != CYBLE_BLESS_STATE_EVENT_CLOSE) && \
(UART_SpiUartGetTxBufferSize() + UART_GET_TX_FIFO_SR_VALID) == 0u)
{
#ifdef FLOW_CONTROL
EnableUartRxInt();
#endif
CySysPmSleep();
#ifdef FLOW_CONTROL
DisableUartRxInt();
#endif
}
}
CyGlobalIntEnable;
/* Handle advertising led blinking */
HandleLeds();
}
#else
//HandleLeds();
#endif
/*******************************************************************
* Process all pending BLE events in the stack
*******************************************************************/
//HandleBleProcessing();
//CyBle_ProcessEvents();
/*******************************************************************
* Handle the Cap Sense
*******************************************************************/
//HandleCapSense();
}
}
CY_ISR(WdtIsrHandler)
{
/* Clear interrupts state */
CySysWdtClearInterrupt(CY_SYS_WDT_COUNTER0_INT);
WdtIsr_ClearPending();
}
/* [] END OF FILE */
Hello everyone : )
I have a problem with SPI slave in psoc creator, related to my inexperience. In my main() program, I have calculated array of 0's and 1's, and I need to SPI it out (communication controlled by external clock bursts LGC-clk).
I believe must change my array to a binary data word, for this to work?
The main question is: Can I simply write my data word to SPI module using Code? If so, why is it mandatory to connect MOSI input and what should i connect to it?
Thanks guys
Show Less