PSoC™ 6 Forum Discussions
In my current project ... we plan on ONLY using ALL BLE5 modules.
I want the PSOC6 to advertise using S8 + BLE5 extensions. Does the Cypress PSOC6 currently support this? If not, how do I modify this?
Thanks;
krwada
Show LessHi,
I am trying to generate a bootloadable file for my application. I added a post-build script that calls cymcuelftool.exe for this purpuse. I get the following error:
The application 'C:\Program Files (x86)\Cypress\PDL\3.0.1\tools\win\elf\cymcuelftool.exe' could not be started. Error: 'The specified executable is not a valid application for this OS platform.'
I am using PSoC Creator 4.2 on Windows 10.
Can someone help me with this?
Show LessHello I´m testing the FreeRTOS in a Psoc6 (In a Psoc 6 BLE Pioneer Kit). I have created from zero a new proyect and I have added in the build settings option the FreeRTOS-Memory Management option to my proyect. In that moment I can see the FreeRTOSConfig.h file in it.
The first problem that I had was when I tried to add a task for making blink a led to the main_cm4.c file, it didn´t work until I added this lines at the start of the file:
#include "FreeRTOS.h"
#include "task.h"
If I didn´t add these lines the compiler got some errors when I was using the freeRTOS functions. In the example on the web It was no neccesary to add those lines.
With the lines the LED blinks at the right rate.All woks as expected.
This is the code in cm4 core:
#include "project.h"
#include "FreeRTOS.h"
#include "task.h"
void LED_TASK(void)
{
for(;;)
{
Cy_GPIO_Write(LED_ROJO_PORT,LED_ROJO_NUM,1);
vTaskDelay(50);
Cy_GPIO_Write(LED_ROJO_PORT,LED_ROJO_NUM,0);
vTaskDelay(50);
}
}
int main(void)
{
__enable_irq(); /* Enable global interrupts. */
xTaskCreate(LED_TASK,"LED_TASK",400,NULL,1,0);
vTaskStartScheduler();
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(;;)
{
/* Place your application code here. */
}
}
When this was working I wanted to test the freeRTOS in the other core so I added to the main_cm0p.c file this code:
#include "project.h"
#include "FreeRTOS.h"
#include "task.h"
void LED_NARANJA_TASK(void)
{
while(1)
{
Cy_GPIO_Write(LED_NARANJA_PORT,LED_NARANJA_NUM,1);
vTaskDelay(100);
Cy_GPIO_Write(LED_NARANJA_PORT,LED_NARANJA_NUM,0);
vTaskDelay(100);
}
}
int main(void)
{
__enable_irq(); /* Enable global interrupts. */
xTaskCreate(LED_NARANJA_TASK,"LED_NARANJA_TASK",400,NULL,1,0);
vTaskStartScheduler();
Cy_SysEnableCM4(CY_CORTEX_M4_APPL_ADDR);
for(;;)
{
}
}
Then I get these errors in main_cm0p.c file:
Build error: undefined reference to `vTaskDelay'
Build error: undefined reference to `vTaskStartScheduler'
Build error: undefined reference to `xTaskCreate'
In the main_cm4 file there are no errors.
What could be the problem? Is it possible to use the freeRTOS on both cores?
Thak you in advance.
Show LessHi there,
We are wondering if it's necessary to check that the BLE stack is on before going to Deep Sleep?
We see in example projects:
if(Cy_BLE_GetState() == CY_BLE_STATE_ON)
{
Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT);
}
We have tested for both cases with and without the if-statement which returns the same result:
(1) While ble is not advertising and no device connected, the system always fails to enter deep sleep (always returns failure)
(2) While ble is advertising, the system enters deep sleep every second deep sleep attempt/call (returns failure then success)
(3) While device connected, the system always succeeds to enter deep sleep
(4) After device disconnection/advertisement timeout, the system always fails to enter deep sleep until advertisement restarts
We are curious the reasoning for checking the BLE stack before entering deep sleep and why the system isn't able to go to deep sleep in cases (1) and (4) as described above. What is also happening internally after device disconnection/advertisement timeout, because we notice there is a time frame where the system doesn't attempt to enter deep sleep (though we have the deep sleep API called in a while loop) and then the system always fails to deep sleep thereon after.
Best,
Steve
Show LessHello,
I'm using a PSoC6 and Creator 4.2. I have my project doing some relatively simple EEPROM read/write functions. It reads first, then increments, and writes. Just basic stuff to test it out.
When I hit reset in the debugger, my number continues to increment. Which indicates to me that the NVM is holding its value through the reset. However if I stop debugging, and start debugging again, my number loses its value, as if NVM is no longer holding it.
Is this potentially related to Debug settings and it overwriting flash when the debugger connects? Is there a debug setting or a setting in the Em_EEPROM block that will let it program/debug without touching the Em_EEPROM area of Flash?
I cannot attach the project, but I can give you code snippets if you need them.
Thanks,
Nick
Show LessHello, I use CY8CKIT-062-BLE to test the SMIF XIP mode.
The addresss mapped to 0x18000000u, the size is 0x04000000. and I also set up the write enable bit.
Then,I can read these memory. But I cannot modify the value like this, *(int *)(0x18000000u) = 0x55. How can I do ?
Here is the code:
/* SMIF IP initialization */
Cy_SMIF_Init(SMIF_FLASH_HW, &SMIF_FLASH_config, 200, &SMIF_FLASH_context);
Cy_SMIF_SetDataSelect(SMIF_FLASH_HW, CY_SMIF_SLAVE_SELECT_0, CY_SMIF_DATA_SEL0);
Cy_SMIF_Memslot_Init(SMIF_FLASH_HW, (cy_stc_smif_block_config_t * const)&smifBlockConfig, &SMIF_FLASH_context);
/* Set XIP mode */
Cy_SMIF_SetMode(SMIF_FLASH_HW, CY_SMIF_MEMORY);
Cy_SMIF_Enable(SMIF_FLASH_HW, (cy_stc_smif_context_t *)&SMIF_FLASH_context);
They are the same to these codes who are generated by PSOC creator 4.2:
SMIF_FLASH_Start(&smifBlockConfig, 200);
SMIF_FLASH_SetMode(CY_SMIF_MEMORY);
smifBlockConfig is generated by SMIF configuration tool: memory mapped, also write enable.
thanks.!
Show LessI'm trying to incorporate the example from the eeprom example:
into my project.
However when I compile the code, it generates Em_EEPROM_config as a const, and therefore causes warnings when I compile with the following line:
eepromReturnValue = Cy_Em_EEPROM_Init(&Em_EEPROM_config, &Em_EEPROM_context);
The warning is:
prj.M0121: passing argument 1 of 'Cy_Em_EEPROM_Init' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
The example project does not generate this as a const, but mine does in PSoC Creator 4.2.
Any help would be much appreciated.
Thanks
Show LessHi
I appreciate all the discussions and doc's on enabling serial terminal behavior between PC and PSoC 6 Pioneer Kits.
I am having issues in following the suggested sample project in KitProg2 User Guide, Doc. # 002-10738 Rev. *I and am wondering if I am missing anything.
The User guide project is based on PSoC 4 and there are some differences with the behavior for PSoC 6 Pioneer Kit programmed via (PSoC Creator 4.2 (4.2.0.641).
First is the configuration menus for the USB-UART now handles interrupts differently than shown in the user guide and I can not see that it offers a "none" setting. At first I assumed that "internal" would take care of the interrupt. Then I read information in the datasheet that suggested the "external" option with the pin unconnected might be right way to go. I was able to successfully build and program with either interrupt setting, but so far there is no sign of communication via this channel. I have a suspicion that I am not properly handling the interrupt and cm0p properly.
I let the Creator select the UART-RX and UART-TX pins automatically on generation of the application- it selected RX on pin P0[2] and TX on pin P0[3] for the PSoC 6 Pioneer Kits. All seems well there.
When I tried to use the KitProg2 User Guide code example in my main_cm0p.c I got warnings that UART_1_UartGetChar(); was not declared (see sample below). I looked in the UART_1.h and found UART_1_Get(); which built without issue. You can see both in the code below. I tried to include <stdlib.h> in case that was the source for missing definition, but had no luck.
With line 35 commented out the project builds and programs, but I do not get any text back from the PSoC 6 kit. I also do not get the red text string above when I hit reset.
- Additional info:
- I loaded PuTTY terminal and do get the local echo.
- Device Manager does see the KitProg2 USB-UART on COM5, so I opened a terminal session to it.
I infer that the USB-UART is specific and sufficient to connect the cm0p to the USB port without further connection on my part.
I guess my questions are :
- Why am I having trouble with the suggested code UART_1_UartGetChar(); and its cousins in my PSoC 6 project? (Was looking at UART_1.h, the right place to expect the headers?)
- Are the UART configuration differences are specific to PSoC 6 or PSoC Creator 4.2 ?
- What is the best way to set up the UART Configuration of interrupts relative to my PSoC 6 project?
- Should I be targeting mc0p or mc4p? (Actually I an unclear on why/when to use either or how to use both.)
Advice on any of these points would be helpful.
Thanks,
Chris
Show LessHello members.
I created a project (attached file "Decimation-Filter.cyprj.Archive01.zip")
for counting the total H width of a pulse output from PWM during Timer Period.
However, counting the count value of Counter by debugging,
the desired value and the measured value were misaligned as in the attached file(Decimation Filter.pdf).
Please tell me why this will happen.
Best Regards.
Show LessHi Cypress
I couldn‘t example code about TFT with 8080 interface? Could you send it to me?
about some following notes:
Display resolution: [240xRGB](H) x 320(V)
driver chip in the lcd module : ILI9341V
interface : 16 bit 8080 MCU interface
Many thanks!
Show Less