PSoC™ 6 Forum Discussions
Hi,
I hope you guys are doing well,
I had two questions about PWM on the CY8CPROTO-062-4343W board.
1. How can I set the PWM output to LOW when I stop that using cyhal stop funtion?
2. I have broken all the peripherals from the board except for debugger so my understanding is all GPIOs should be accessible. Now when I initiate PWM programmatically, some of the pins give no output and some others doesn't. for example P10.0,P10.3,P10.4 has the output but P10.2 and P10.1 gives no output. Any suggestions here?
Thanks,
As I tried to build the project, the console displayed as below:
09:22:02 **** Incremental Build of configuration Release for project LwDriverFF ****
"C:\\Infineon\\Tools\\ModusToolbox\\tools_2.4\\modus-shell\\bin\\make" CY_MAKE_IDE=eclipse CY_MAKE_IDE_VERSION=2.4 CY_IDE_TOOLS_DIR=C:/Infineon/Tools/ModusToolbox/tools_2.4 -j16 all
Tools Directory: C:/Infineon/Tools/ModusToolbox/tools_2.4/
CY8CKIT-062S4.mk: ./libs/TARGET_CY8CKIT-062S4/CY8CKIT-062S4.mk
C:/Infineon/Tools/ModusToolbox/tools_2.4//make/startex.mk:398: *** Build support for the target device not found. Run "make getlibs" to ensure all required build and code dependencies are present.. Stop.
"C:/Infineon/Tools/ModusToolbox/tools_2.4/modus-shell/bin/make CY_MAKE_IDE=eclipse CY_MAKE_IDE_VERSION=2.4 CY_IDE_TOOLS_DIR=C:/Infineon/Tools/ModusToolbox/tools_2.4 -j16 all" terminated with exit code 2. Build might be incomplete.
09:22:03 Build Failed. 1 errors, 0 warnings. (took 919ms)
Then I searched and figured out that Library Manager is required to update the project, and it turns out that it cannot resolve github.com. I tried to edit IP address inC:\Windows\System32\drivers\etc,but as a result, either connection timedout or connection reset happened.
Searching application directory (.mtb)...
Found 10 .mtb file(s)
Processing file "C:/Infineon/LwDriverFF_Edited/deps/TARGET_CY8CKIT-062S4.mtb"
Processing file "C:/Infineon/LwDriverFF_Edited/deps/TARGET_PSOC6-GENERIC.mtb"
fatal: unable to access 'https://github.com/cypresssemiconductorco/TARGET_PSOC6-GENERIC/': OpenSSL SSL_read: Connection reset by peer, errno 104
fatal: unable to access 'https://github.com/cypresssemiconductorco/TARGET_PSOC6-GENERIC/': Failed to connect to github.com port 443 after 21050 ms: Connection timed out
Processing file "C:/Infineon/LwDriverFF_Edited/deps/mtb-hal-cat1.mtb"
fatal: unable to access 'https://github.com/cypresssemiconductorco/mtb-hal-cat1/': Failed to connect to github.com port 443 after 21045 ms: Connection timed out
fatal: unable to access 'https://github.com/cypresssemiconductorco/mtb-hal-cat1/': Failed to connect to github.com port 443 after 21033 ms: Connection timed out
Processing file "C:/Infineon/LwDriverFF_Edited/deps/mtb-pdl-cat1.mtb"
fatal: unable to access 'https://github.com/cypresssemiconductorco/mtb-pdl-cat1/': Failed to connect to github.com port 443 after 21046 ms: Connection timed out
fatal: unable to access 'https://github.com/cypresssemiconductorco/mtb-pdl-cat1/': Failed to connect to github.com port 443 after 21034 ms: Connection timed out
Processing file "C:/Infineon/LwDriverFF_Edited/deps/retarget-io.mtb"
fatal: unable to access 'https://github.com/cypresssemiconductorco/retarget-io/': Failed to connect to github.com port 443 after 21038 ms: Connection timed out
fatal: unable to access 'https://github.com/cypresssemiconductorco/retarget-io/': Failed to connect to github.com port 443 after 21059 ms: Connection timed out
ERROR: Unable to checkout "retarget-io". This is not a valid git repository.
==============================================================================
ERROR: --ABORTING--
: Script : C:/Infineon/Tools/ModusToolbox/tools_2.4/make/getlibs.bash
: Bash path : /usr/bin/bash
: Bash version: 4.4.12(3)-release
: Exit code : 1
: Call stack : trap_exit error perform_git process_mtb extract_data find_mtbs main
make: *** [C:/Infineon/Tools/ModusToolbox/tools_2.4/make/getlibs.mk:121: getlibs] Error 1
Failed to update the project.
Br running the command 'make getlibs', the results display on the terminal is similar to that shows above. I don't know whether it is because of region or VPN network problem (if I don't use VPN I can't even '
Getting manifests from remote server...') or something else. Files and codes from the url in the update report can access successfully with Google Chrome. For example, like https://github.com/cypresssemiconductorco/TARGET_PSOC6-GENERIC/
So I was wondering if it is possible to manually update from the website (like download files as .zip file and add to some folders), or whether there are other solutions to this problem. BTW I'm new to ModulToolbox and github, and please forgive me if i express my words incorrectly. Any help or suggestions would be appreciated.
Best regards.
Show LessWe succeeded in adding a passkey for the pairing. So, without the passkey it’s impossible to pair. The problem is we can still connect with a non paired phone and exchange data. We try many security modes, but nothing works. How can we forbid connection to the not paired phones?
Is the any documentation for general guidance on Psoc6 device security? Is there some code examples?
Show Less
Hi all,
I am working on a project. FreeRTOS is used and we have a lot of tasks including UART communication.
I am trying to write to Flash after getting some data over from UART. This will be handled inside a task.
However, from what I see ModusToolbox PDL for writing to Flash, like Cy_Flash_WriteRow() is blocking operation. From instructions, it seems like interrupts must be enabled on both active cores and do not enter a critical flash operation. I have not started any code, but my concern is if other tasks running and other interrupt handler will cause any problem with FreeRTOS. I try to look for some documents that have FreeRTOS and ModusToolbox PDL for Flash write operation, but I do not find anything so far.
Will FreeRTOS scheduler or tasks be corrupted somehow if I incorporate Flash Write Operation like described above. Is there something I should be aware of?
Thank you for your help.
Show LessHi,
when calling cysecuretools -t cys06xxa -p policy\policy_multi_CM0_CM4_tfm.json re-provision-device in windows cmd line I get following error. I am using cysecuretools v3.1.0
2022-02-23 14:59:36,292 : C : WARN : There is gap between regions 269926400:270254080 and 270303232:270336000 (49152 bytes)
2022-02-23 14:59:36,293 : C : WARN : Policy validation finished with warnings
2022-02-23 14:59:36,327 : C : INFO : ######################################################################
2022-02-23 14:59:36,328 : C : INFO : Provisioning packet is created
2022-02-23 14:59:36,330 : C : INFO : ######################################################################
2022-02-23 14:59:36,356 : C : WARN : There is gap between regions 269926400:270254080 and 270303232:270336000 (49152 bytes)
2022-02-23 14:59:36,356 : C : WARN : Policy validation finished with warnings
2022-02-23 14:59:36,359 : C : INFO : Target: cys06xxa
2022-02-23 14:59:37,230 : P : INFO : Target type is cy8c64_sysap
2022-02-23 14:59:37,340 : P : INFO : DP IDR = 0x6ba02477 (v2 rev6)
2022-02-23 14:59:37,345 : P : INFO : AHB-AP#0 IDR = 0x84770001 (AHB-AP var0 rev8)
2022-02-23 14:59:37,355 : P : INFO : AHB-AP#0 Class 0x1 ROM table #0 @ 0xf1000000 (designer=034 part=102)
2022-02-23 14:59:37,358 : C : INFO : Use system AP
2022-02-23 14:59:37,361 : C : INFO : Probe ID: 0A0C135101220400
2022-02-23 14:59:37,373 : C : INFO : Secure Flash Boot version: 4.0.2.1842
2022-02-23 14:59:38,022 : C : ERROR : No ACK received. Check the log for details
Error: Failed processing!
Searching the web and the forum I did not find the solution yet.
I am looking forward for your advice.
Best regards,
Show LessHi
I need to power the PSoC-63 BLE devkit using a battery.
It seems to be it is not as straight forward as connecting the battery to the VIN pin directly, and requires modifying the zero-ohm resistors networks.
I followed the guidelines in one of the PSoC-63 support documents, but couldn't get the VIN to power the dev kit.
Any advice on this matter ?
thanks
Show LessI 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