PSoC™ 6 Forum Discussions
Hi,
It seems that "PSoC Programmer" software does not have the data about the CY8C6245AZI-S3D72:
Memory Types Scan Device Finished at 07:37:13
FAILED! PSoC Device (6B A0 24 77) is not in the DataBase
Detected JTAG ID: "6B A0 24 77" is not in database
Is there a method to update the database to have "PSoC Programmer" working?
I am using the latest version: 3.29.1
Regards,
Gintaras
Show LessDear Sirs and Madams,
The Scan_ADC component data sheet of PSoC6 contains the following:
"The maximum number of channels is 16."
However, the analog of PSoC6 is similar to PSoC4 as shown below.
How is the single-ended 16ch set by this Scan ADC MUX?
Regards,
Show Less
Hello Community,
I finally got the scb4 UART with pins configured from port 8 to initialize without errors. The pins 8.0 and 8.1 can be disconnected from the CAPSENSE Buttons as instructed in the KIT documentation on page 48.
The RX signal arrives at the respective pin but I cannot register any interrupt or received bytes in the code. Am I still missing something ? Again, the uartInit() runs without any error, I can measure the RX signal coming in to P8.0
but no firing of the Interrupt. Likewise if I try to send a TX, the first TX returns successfully but the second TX produces
an error saying the TX is still busy.
I am using freertos, the UART_task runs in a separate task. The uartContext is a global variable and, where needed made available via "extern".
Any help is greatly appreciated - we are crunching on an exciting ornithology research projects using Wifi-BT KITs as
a central component.
Thanks
Stefan
Here is the relevant part of the code:
###############################
int main()
{
cy_rslt_t result;
/* This enables RTOS aware debugging in OpenOCD. */
uxTopUsedPriority = configMAX_PRIORITIES - 1;
/* Initialize the board support package. */
result = cybsp_init() ;
CY_ASSERT(result == CY_RSLT_SUCCESS);
/* Set up the device based on configurator selections */
init_cycfg_all();
/* To avoid compiler warnings. */
(void) result;
initUART();
/* Enable global interrupts. */
__enable_irq();
######################################
/* Allocate context for UART operation */
cy_stc_scb_uart_context_t uartContext;
/* Initialize the UART configuration structure */
const cy_stc_scb_uart_config_t LID_UART_config = {
.uartMode = CY_SCB_UART_STANDARD,
.enableMutliProcessorMode = false,
.smartCardRetryOnNack = false,
.irdaInvertRx = false,
.irdaEnableLowPowerReceiver = false,
.oversample = 8,
.enableMsbFirst = true,
.dataWidth = 8UL,
.parity = CY_SCB_UART_PARITY_NONE,
.stopBits = CY_SCB_UART_STOP_BITS_1,
.enableInputFilter = false,
.breakWidth = 11UL,
.dropOnFrameError = false,
.dropOnParityError = false,
.receiverAddress = 0x0UL,
.receiverAddressMask = 0x0UL,
.acceptAddrInFifo = false,
.enableCts = false,
.ctsPolarity = CY_SCB_UART_ACTIVE_LOW,
.rtsRxFifoLevel = 0UL,
.rtsPolarity = CY_SCB_UART_ACTIVE_LOW,
.rxFifoTriggerLevel = 0UL,
.rxFifoIntEnableMask = 0UL,
.txFifoTriggerLevel = 0UL,
.txFifoIntEnableMask = 0UL, };
bool uartEventArrived = false;
void initUART() {
/* Initialize the UART Block */
cy_en_scb_uart_status_t initStatus;
cy_en_sysclk_status_t setClockStatus;
cy_en_sysint_status_t intrSetStatus;
/* Configure UART to operate */
initStatus = Cy_SCB_UART_Init(SCB4, &LID_UART_config, &uartContext);
if (CY_SCB_UART_SUCCESS != initStatus) {
handleError();
}
/* Assign pins for UART on SCB4: P8[0], P8[1] */
#define UART_PORT P8_0_PORT
#define UART_RX_NUM P8_0_NUM
#define UART_TX_NUM P8_1_NUM
/* Connect SCB5 UART function to pins */
Cy_GPIO_SetHSIOM(UART_PORT, UART_RX_NUM, P8_0_SCB4_UART_RX);
Cy_GPIO_SetHSIOM(UART_PORT, UART_TX_NUM, P8_1_SCB4_UART_TX);
/* Configure pins for UART operation */
Cy_GPIO_SetDrivemode(UART_PORT, UART_RX_NUM, CY_GPIO_DM_HIGHZ);
//Cy_GPIO_SetSlewRate(UART_PORT, UART_RX_NUM, CY_GPIO_SLEW_SLOW);
//Cy_GPIO_SetVtrip(UART_PORT, UART_RX_NUM, CY_GPIO_VTRIP_TTL);
Cy_GPIO_SetDrivemode(UART_PORT, UART_TX_NUM, CY_GPIO_DM_STRONG_IN_OFF);
//Cy_GPIO_SetSlewRate(UART_PORT, UART_TX_NUM, CY_GPIO_SLEW_SLOW);
/* UART desired baud rate is 19200 bps (Standard mode).
*/
setClockStatus = Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 1U, 651U);
if (CY_SYSCLK_SUCCESS != setClockStatus) {
handleError();
}
setClockStatus = Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 1U);
if (CY_SYSCLK_SUCCESS != setClockStatus) {
handleError();
}
/* Assign UART interrupt number and priority */
#define UART_INTR_NUM ((IRQn_Type) scb_4_interrupt_IRQn)
#define UART_INTR_PRIORITY (7U)
/* Populate configuration structure (code specific for CM4) */
cy_stc_sysint_t uartIntrConfig = {
.intrsrc=UART_INTR_NUM,
.intrPriority = UART_INTR_PRIORITY, };
/* Hook interrupt service routine and enable interrupt */
intrSetStatus = Cy_SysInt_Init(&uartIntrConfig, &UART_Isr);
if (CY_SYSINT_SUCCESS != intrSetStatus) {
handleError();
}
NVIC_EnableIRQ(UART_INTR_NUM);
/* Enable UART to operate */
Cy_SCB_UART_Enable(SCB4);
}
void UART_Isr(void) {
Cy_SCB_UART_Interrupt(SCB4, &uartContext);
uartEventArrived = true;
}
void uart_task(void *pvParameters) {
uint32_t numReceived;
cy_en_scb_uart_status_t uartStatus;
for (;;) {
if (uartEventArrived) {
uartEventArrived = false;
/* Start receive operation (do not check status) */
uartStatus = Cy_SCB_UART_Receive(SCB4, rxBuffer, sizeof(rxBuffer),
&uartContext);
if (CY_SCB_UART_SUCCESS != uartStatus) {
handleError();
}
vTaskDelay(pdMS_TO_TICKS(1000));
numReceived = Cy_SCB_UART_GetNumReceived(SCB4, &uartContext);
if (numReceived > 0) {
reportOnDevice("Data arrived", false);
} else {
reportOnDevice("no Data arrived", false);
}
}
}
}
Show LessHello Cypress,
I would really appreciate some help with an issue I have on addressing a UART resource in the SCB4 block.
The UART is configured using the Device Configurator which also generates code for it.
Seems like I do not register the interrupt correctly as the MCU throws a "cannot address memory" error when
Cy_SCB_UART_Interrupt(scb_4_HW, &uartContext); is called.
I have not found any working example that uses an UART configured with the Device Configurator. Any idea on how to
correctly address this resource ? Could be that scb_4_HW, which is generated by the Configurator, is not the correct
address to reach the configured UART ?
Thanks for any hints
Stefan
Show LessHello,
I try to run Bluetooth mouse example on CY8CPROTO-063-BLE, after change device by device selector in project, bluetooth works fine. I try to add capsense button using capsense example - it look that capsense doesn't work at all, nothing change in tuner as well as in program also it doesn't give any reaction on touch.
When I create new project and add capsense it works fine ( only difference I found is clock that for bluetooth example is 50Mhz and for Cap sense is 100MHz ( it defines maximum modulator frequency for 50Mhz is 25000KHz and for 100Mhz is 50000kHz)
Code I add to Bluetooth mouse hid example:
......
__enable_irq(); /* Enable global interrupts. */
EZI2C_Start(); /* Start EZI2C Component */
/*
* Set up communication and initialize data buffer to CapSense data structure
* to use Tuner application
*/
EZI2C_SetBuffer1((uint8_t *)&CapSense_dsRam,
sizeof(CapSense_dsRam),
sizeof(CapSense_dsRam));
CapSense_Start(); /* Initialize Component */
CapSense_ScanAllWidgets(); /* Scan all widgets */
/***************************************************************************
* Main polling loop
***************************************************************************/
while(1)
{
/* Do this only when a scan is done */
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
CapSense_ProcessAllWidgets(); /* Process all widgets */
CapSense_RunTuner(); /* To sync with Tuner application */
if (CapSense_IsAnyWidgetActive()) /* Scan result verification */
{
Cy_GPIO_Write(Advertising_LED_0_PORT, Advertising_LED_0_NUM, 1);
/* add custom tasks to execute when touch detected */
}
else
{
Cy_GPIO_Write(Advertising_LED_0_PORT, Advertising_LED_0_NUM, 0);
}
CapSense_ScanAllWidgets(); /* Start next scan */
}
.......
I will be very thankful for any suggestions
Show LessHello,
I need to create a square wave signal generator in the range of 1.5Mhz-1.8MHz, in resolution of 10KHz, by PSOC63
How do I do that ?
When I try to use the PWM timer I can't reach the frequency resolution I need.
I can set in the "TopDesign" HW configuration several clocks with the frequencies I need, but I can't change them by SW like I am expecting
What would be the best way to do that ?
THank,
Shy
Show Less
I’m using CYW9P62S1-43012EVB-01.
I'm thinking of communicating with a PC via UART.
Can PSoC5LP(KitProg) on the board support for this?
Please let me know if you have any methods or recommendations other
than UART.
Hello Cypress,
I am trying to use an SCB UART but it is very hard to find a suitable and free pin to connect to. For example P3.0 and P3.1 would be suitable, according to the device configurator. Yet, I cannot find P3.1 on the breakout board !
Can you please suggest suitable pins to utilize an SCB UART for an external RS232 connection ?
Any help is greatly appreciated.
Regards,
Stefan
Show LessHello,
I try to implement 2 alarms with the RTC component on the PSOC6,
My issue it's when I call 2 functions to Set the 2 different alarms :
rtcApiResult = Cy_RTC_SetAlarmDateAndTime(&alarm1,CY_RTC_ALARM_1);
rtcApiResult = Cy_RTC_SetAlarmDateAndTime(&alarm2,CY_RTC_ALARM_2);
I got the good return for the first function, but an error for the second (CY_RTC_INVALID_STATE)
If I put a CyDelay(1) between the 2 functions, I don't have any trouble
My question is : how to set the 2 alarms correctly (use the delay it's maybe not the good way to do it)
Thank you
Hello Cypress,
I get a CYHAL_UART_RSLT_ERR_INVALID_PIN error result from calling
/* Initialize the UART Block */
rslt = cyhal_uart_init(&uart_obj, CYBSP_UART1_TX, CYBSP_UART1_RX, CYPSP_UART1_CLK_HW, &uart_config);
if(rslt != CY_RSLT_SUCCESS)
{
handle_error();
}
The pins are named just like this in the Device Configurator. Seems like I am having trouble allocating the resources correctly.
Or there is some well hidden syntax when naming pins or clocks ?
Debugging gets me down to CYHAL_HWMGR_RSLT_ERR_INVALID from the CYHAL_HWMGR. I have made the P8_0 and
P8_1 pins available as they are used in the PSoC 6 WIFI-BT Pioneer Kit - had to remove a resistor and to add two 0Ohms as explained in the kit documentation.
Any help is appreciated.
Regards
Stefan
Show Less