PSoC™ 6 Forum Discussions
I need to do some clocked logic between SPI_Master block and the hardware output pins. I need a clock for the other logic, which I think means that I need to use the same clock as for the SPI_Master block. I've set "Enable Clock from Terminal" on my SPI master block, but when I connect it to ClkPeri on my board, routing fails with "E1216: Routing of net ClockBlock_PeriClk Failed. Source : :Clockcontainer:Clock[0].periclk, Sink : :SCBcontainer:SCB[0].clock ".
I've attached the (very simple) testcase, with just a single clock block set to existing clock peri and an SPI master. In my real project, I also need to change the clock tree so that ClkPeri = 100 MHz, but I didn't need that to reproduce the issue.
Show Less
On the CY8CKIT-062S4 Kit, On the device configurator I set the AREF 1.2V to output to the P10.2 pin and measure the voltage on P10.2 pin on the kit, it reads a 1.28V on the multimeter. Isn't it should be 1.2V +/- 1% ?
Show LessHello,
I have a question about GPIO state on power up.
My device is CY8C6136, and I found the following in the TRM document.
"During power up, all the GPIOs are in high-impedance analog state and the input buffers are disabled."
By the way, even if P0.5 is not initialized in the firmware, it is measured as high.
Even after I erase the flash memory it still measures high voltage at P0.5.
In my application, the IC connected to P0.5 should not receive high input during power up.
Because of special circumstances, the corresponding pin must be set low even when the MCU is mounted on the PCB for the first time.
(Even when powering up before downloading the firmware)
Or should I modify the schematic and use a different pin?
Thanks and Regards,
YS
Hello everyone,
I work on a project where i use Freetos BLE on a CYBLE-416045-02 module.
To start my project, i took the Thermometer_RTOS example that i have modified.
I have create a news task to process data, i have just created the structure of my new task and declare in my main_cm4. When i program my module, my other task no running correctly ( they just process few information and block).
FILE : test_task.h
#ifndef TEST_TASK_H
#define TEST_TASK_H
#include "project.h"
#include "FreeRTOS.h"
#include "queue.h"
void Task_Test(void *pvParameters);
#endif
FILE : test_task.c
#include "test_task.h"
#include "uart_debug.h"
#include "task.h"
void Task_Test(void *pvParameters)
{
/* Remove warning for unused parameter */
(void)pvParameters ;
Task_DebugPrintf("Debut Task dataMeasure\r\n", 0u);
}
FILE : main_cm4.c
#include "ble_task.h"
#include "status_led_task.h"
#include "notification_task.h"
#include "dataMeasure_task.h"
#include "test_task.h"
#include "measure_task.h"
#include "uart_debug.h"
#include "project.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "fram.h"
#include "data_storage.h"
#include "one_wire.h"
#include "test.h"
#include "bistable.h"
#include "contact_sec.h"
#include "manage_alim.h"
/* Priorities of user tasks in this project */
#define TASK_BLE_PRIORITY (configMAX_PRIORITIES - 1)//(20u)
#define TASK_NOTIFICATION_PRIORITY (configMAX_PRIORITIES - 2)//(15u)
#define TASK_STATUS_LED_PRIORITY (configMAX_PRIORITIES - 5)//(10u)
#define TASK_DISPLAY_PRIORITY (configMAX_PRIORITIES - 4)//(5u)
#define TASK_DATAMEASURE_PRIORITY (configMAX_PRIORITIES - 3)
//#define TEST_PRIORITY (0u)
/* Stack sizes of user tasks in this project */
#define TASK_BLE_STACK_SIZE (1024u)
#define TASK_STATUS_LED_STACK_SIZE (configMINIMAL_STACK_SIZE)
#define TASK_NOTIFICATION_STACK_SIZE (256u)
//#define TASK_DISPLAY_STACK_SIZE (512u)
#define TASK_DATAMEASURE_SIZE (256u)
//#define TASK_TEST_SIZE (128u)
/* Queue lengths of message queues used in this project */
#define BLE_COMMAND_QUEUE_LEN (10u)
#define NOTIFICATION_QUEUE_LEN (2u)
#define STATUS_LED_QUEUE_LEN (5u)
#define DATAMEASURE_QUEUE_LEN (5u)
/*******************************************************************************
* Function Name: main
********************************************************************************
* Summary:
* System entrance point. This function enables interrupts and then calls the
* the function that sets up user tasks and then starts RTOS scheduler.
*
* Parameters:
* void
*
* Return:
* int
*
*******************************************************************************/
int main()
{
//test task creation
BaseType_t statusTaskCreation;
/* Create the circular buffer references */
circular_buffer_t alarmBuffer, logBuffer;
alarmBuffer.baseAddr = ALARMS_FRAM_BASE;
alarmBuffer.maxRecords = ALARMS_MAX_RECORDS;
alarmBuffer.recordSize = ALARMS_RECORD_SIZE;
logBuffer.baseAddr = LOGS_FRAM_BASE;
logBuffer.maxRecords = LOGS_MAX_RECORDS;
logBuffer.recordSize = LOGS_RECORD_SIZE;
/* Initialize thread-safe debug message printing. See uart_debug.h header
file to enable / disable this feature */
Task_DebugInit();
//Function initialization
FRAM_Enable();
test_main();
/* Create the queues. See the respective data-types for details of queue
contents */
bleCommandQ = xQueueCreate(BLE_COMMAND_QUEUE_LEN,
sizeof(ble_command_t));
notificationMessageQ = xQueueCreate(NOTIFICATION_QUEUE_LEN,
sizeof(notification_message_t));
statusLedDataQ = xQueueCreate(STATUS_LED_QUEUE_LEN,
sizeof(status_led_data_t));
dataMeasureQ = xQueueCreate(DATAMEASURE_QUEUE_LEN,
sizeof(dataMeasure_data_t));
/* Create the user Tasks. See the respective Task definition for more
details of these tasks */
statusTaskCreation = xTaskCreate(Task_Ble, "BLE Task", TASK_BLE_STACK_SIZE,
NULL, TASK_BLE_PRIORITY, 0);
statusTaskCreation |= xTaskCreate(Task_Test, "Notif Task", 128u,
NULL, 2u, NULL);
statusTaskCreation |= xTaskCreate(Task_Notification, "Notif Task", TASK_NOTIFICATION_STACK_SIZE,
NULL, TASK_BLE_PRIORITY, 0);
// statusTaskCreation |= xTaskCreate(Task_StatusLed, "Status LED Task", TASK_STATUS_LED_STACK_SIZE,
// NULL, TASK_STATUS_LED_PRIORITY, NULL);
// xTaskCreate(Task_StatusLed, "Status LED Task", TASK_STATUS_LED_STACK_SIZE,
// NULL, TASK_STATUS_LED_PRIORITY, NULL);
statusTaskCreation |= xTaskCreate(Task_DataMeasure, "DM Task", TASK_DATAMEASURE_SIZE,
NULL, TASK_DATAMEASURE_PRIORITY , 0);
DebugPrintf("statusTaskCreation : %d \r\n",(uint16_t)statusTaskCreation);
if( pdPASS == statusTaskCreation){
DebugPrintf("Start RTOS scheduler\r\n");
/* Start the RTOS scheduler. This function should never return */
vTaskStartScheduler();
/* Should never get here! */
DebugPrintf("Error! : RTOS - scheduler crashed \r\n");
}else{
DebugPrintf("[Error] : FreeRTOS failed to create task \r\n");
}
/* Halt the CPU if scheduler exits */
CY_ASSERT(0);
for(;;)
{
}
}
/*******************************************************************************
* Function Name: void vApplicationIdleHook(void)
********************************************************************************
*
* Summary:
* This function is called when the RTOS in idle mode
*
* Parameters:
* None
*
* Return:
* None
*
*******************************************************************************/
void vApplicationIdleHook(void)
{
/* Enter sleep-mode */
Cy_SysPm_Sleep(CY_SYSPM_WAIT_FOR_INTERRUPT);
}
/*******************************************************************************
* Function Name: void vApplicationStackOverflowHook(TaskHandle_t *pxTask,
signed char *pcTaskName)
********************************************************************************
*
* Summary:
* This function is called when a stack overflow has been detected by the RTOS
*
* Parameters:
* TaskHandle_t : Handle to the task
* signed char : Name of the task
*
* Return:
* None
*
*******************************************************************************/
void vApplicationStackOverflowHook(TaskHandle_t *pxTask,
signed char *pcTaskName)
{
/* Remove warning for unused parameters */
(void)pxTask;
(void)pcTaskName;
/* Print the error message with task name if debug is enabled in
uart_debug.h file */
DebugPrintf("Error! : RTOS - stack overflow in %s \r\n", pcTaskName);
/* Halt the CPU */
CY_ASSERT(0);
}
/*******************************************************************************
* Function Name: void vApplicationMallocFailedHook(void)
********************************************************************************
*
* Summary:
* This function is called when a memory allocation operation by the RTOS
* has failed
*
* Parameters:
* None
*
* Return:
* None
*
*******************************************************************************/
void vApplicationMallocFailedHook(void)
{
/* Print the error message if debug is enabled in uart_debug.h file */
DebugPrintf("Error! : RTOS - Memory allocation failed \r\n");
/* Halt the CPU */
CY_ASSERT(0);
}
I would like to know if you have informations about this problem or advice to help me.
Thanks in advance,
Best regards,
Max
Show Less
Error in pSoC Programmer window: fail to aquire board. Make sure connection or settings are correct.
Verified footprint. Verified symbol. Verified connections between board and mini prog4. Unloaded one component at a time and tried to program.
Checked board for shorts. Probed all lines from programmer and nothing stood out. Checked a bare board and did continuity check. Visually inspected assembled board. Verified settings. Powering board from bench power supply.
Last idea that I'll try this evening is to dead bug the bga cypress chip and break out the programming lines, VDD and GND and see if I can't program/aquire the chip when connected directly to it.
Any other suggestions?
Show LessHello.
I'm using psoc6 and I'm having trouble connecting to segger J-link with cypress programmer (v4.0.0.708).
The user guide states that J-link is supported, but the Probe/Kit section of the GUI cannot be activated.
Of course it works fine in CY8CKIT-062-WIFI-BT EVK.
Please let me know how to connect J-link.
Regards,
YS
Hello,
I have questions about PSoC61.
1. In the PSoC6 overview (Infineon Homepage), PSoC61 is classified as a single core.
But does PSoC61 actually contain M0+ as well as M4?
The datasheet states as follows : "In PSoC 61 the Cortex M0+ is reserved for system functions, and is not available for applications."
2. I created a PSoC61 BSP, there is a cy_m0p_image[] array in the psoc6_01_cm0p_sleep.c file.
What is it for? Does it make the M0+ core go to sleep and jump to M4?
When I compile the project, are both M0+ and M4 created as one hex file?
3. If I use the IAR compiler should I export the progect and include psoc6_01_cm0p_sleep.c?
Thanks and Regards,
YS
Dear support team,
I'm using CY8CKIT-062S2-43012 demo and MTB 2.4 to debug UART comunication. now the uart TX interrupt funcation is ok. but uart RX interrupt can't go into the interrupt service,so can't recive data.Although uart polling mode can revice the data, which also certify the hardware is ok. i have attched my uart code as below, could you give me some advice?thanks!
Show LessI have two projects, the first is called Simple Port and the second Simple Port 2. Simple Port 2 was created by saving the first project under a new name. Everything has worked olkay in both projects until about a week ago, when I noticed today that PSoC Creator is showing me copies of some of the first project's files which have been created in My Templates.
I have simply no idea how or why this happened. Is it supposed to happen? Is there a way to respore my project under a new name with the up to date copies?
Show LessDear Receiver,
Can I use "PSoC Creator 4.4" to test cap sense functions in "CY8CKIT-062S2-43012" kit ?!
(Because using PSoC creator 4.4 is more convenient than using Modustoolbox at this moment.)
Thank you.
Show Less