PSoC™ 6 Forum Discussions
Hi!
I'm currently working on a composite device (UAC-CDC) where the host PC streams audio to a FIFO in DMA. I used the Request Received and Completed callback from the PSoC 6 MCU USB Audio Device FreeRTOS example project. The problem comes when I try to select the audio device, I can only select the device from the "Audio Settings" of Windows and if I try to change the volume it flickers between 0 and the level desired to always end back to 0. Also, if I have spotify running, it will start to skip songs without me pressing an button.
I think the cause is the request handlers but I don't really know where the problem might be or how to handle it.
Show LessOur customer wants to use the CY8C624AAZI-S2D14 but the datasheet (vn ‘H’) here https://www.cypress.com/file/460816/download is worrying me as the word ‘PRELIMINARY’ is printed all over it and the pinout table, table 4 on page 17, has the following minor typos..
- Pin 36 has been moved to the very end of the table so it’s out of sequence
- Pin 114 has duplicate line entries although they seem to be identical
I’d hate to have a PCB made that has an error on it, can you guys confirm that the pinout table is correct and why the table has the issues I note above on a revision "H" of the datasheet?
Show LessI am trying to transmit 251 byte packets from my PSoC 6 Kit (CY8CKIT-062-BLE). Whenever I have the "link layer max TX size (bytes)" set to any value 93 or larger, Cy_BLE_Start returns CY_BLE_MEMORY_ALLOCATION_FAILED.
I've found instructions regarding how to change the total stack and heap by setting the __STACK_SIZE and __HEAP_SIZE compiler macros, but those don't change whether the BLE stack starts up. I'm using the PSoC 6 Kit (CY8CKIT-062-BLE).
Show LessHi,I have a USB device using both a CDC and an Audio interface with Interface Association Descriptor. This is my init function:
CommPort *comportInit()
{
CommPort *port = NULL;
Context *ctx = getNewCtx();
if (ctx != NULL &&
Cy_USB_Dev_Init(USBFS0, &usb_0_config, &ctx->usbfsDevDrvContext,
&usb_devices[0], &usb_devConfig, &ctx->usbDevContext) == CY_USB_DEV_SUCCESS &&
audioCommInit(ctx) &&
cdcCommInit(ctx) /*&&
audioCommunicationInit(ctx)*/)
{
/* Initialize USB interrupts */
bool res = Cy_SysInt_Init(&UsbDevIntrHigh, &USBUART_IsrHigh) == CY_SYSINT_SUCCESS;
res = res && Cy_SysInt_Init(&UsbDevIntrMedium, &USBUART_IsrMedium) == CY_SYSINT_SUCCESS;
res = res && Cy_SysInt_Init(&UsbDevIntrLow, &USBUART_IsrLow) == CY_SYSINT_SUCCESS;
/* Enable the USB */
NVIC_EnableIRQ(UsbDevIntrHigh.intrSrc);
NVIC_EnableIRQ(UsbDevIntrMedium.intrSrc);
NVIC_EnableIRQ(UsbDevIntrLow.intrSrc);
/* Enable global interrupts. */
__enable_irq();
/* Make device appear on the bus. This function call is blocking, it waits till the device enumerates */
if (res && Cy_USB_Dev_Connect(true, CY_USB_DEV_WAIT_FOREVER, &ctx->usbDevContext) == CY_USB_DEV_SUCCESS)
{
initFctDriver(ctx);
port = &ctx->port;
}
}
return port;
}
And this is my audioInit:
bool audioCommInit(Context *ctx)
{
bool retStatus = false;
if (Cy_USB_Dev_Audio_Init(NULL, &ctx->usbfAudioContext, &ctx->usbDevContext) == CY_USB_DEV_SUCCESS)
{
retStatus = true;
}
USBCOMM_INTERFACE_FUNCTIONS intfFunc =
{
.disableIn = AudioIn_Disable,
.enableIn = AudioIn_Enable,
};
UsbComm_RegisterInterfaceFunctions(&intfFunc);
registerAudioCallback(ctx);
Cy_SysInt_Init(&UsbDevIntrHigh, AudioIn_IsrHandler);
Cy_USBFS_Dev_Drv_RegisterEndpointCallback(USBFS0, AUDIO_STREAMING_OUT_ENDPOINT, NULL, &ctx->usbfsDevDrvContext);
Cy_USB_Dev_OverwriteHandleTimeout(AudioApp_UsbDelay, &ctx->usbDevContext);
return retStatus;
}
And this is the CDC init:
bool cdcCommInit(Context *ctx)
{
bool retStatus = false;
if (Cy_USB_Dev_CDC_Init(&usb_cdcConfig, &ctx->cdcContext, &ctx->usbDevContext) == CY_USB_DEV_SUCCESS)
{
retStatus = true;
}
return retStatus;
}
My problem is that when I call the Cy_USB_Dev_Connect, it triggers both the CDC and Audio Request Handler with the following Control Transfer Request :
Expression | Value |
---|---|
Direction | 1 |
Type | 0 |
Recipient | 0 |
bRequest | 6 |
wValue | 1536 |
wIndex | 0 |
wLength | 10 |
What I don't understand is that a request for a standard device is passed to the specific classes asking for the descriptor (I guess the device descriptor?). This request then can't be handled by both my custom handler for the audio and the default for the CDC and it then says that my device can't be configured and it disables certain endpoints making my USB device unusable. I linked my configuration below if it can help.
Thank you for your time.
*** EDIT***
The error I get when I run the code is :
The device cannot start. (Code 10)
The object was not found
Hi everyone!
With my PSoC6 6 Prototyping kit I would like to receive an ultrasound signal with an analog sensor. But firstly I have to amplify that signal before the acquisition with ADC.
This signal is a PWM with amplitude ranging from -Vcc/2 to Vcc/2.
I am trying to use the OpAmp in non inverting configuration with external resistors and with a wished gain = 100.
But I have not the desired results because the signal is not well amplified!
How can i proceed to implement the amplification?
Show LessWe started a project with the CY8C6137BZI-F34 Psoc6. We started from the mtb-example-psoc6-emwin-oled example project provided with Modustoolbox. We changed some configuration in the make file such the device in the CY8CKIT-062-WIFI-BT.mk.
We also generated a new configuration with the device configurator with the matching microcontroller.
However, we always catch Cy_SysLib_ProcessingFault() when we execute the line 2236 in the cy_syspm.c of the psoc6pdl. See the screenshot below.
I'm a bit confuse because this section on the code is only applicable ""if curDevice == CY_SYSLIB_DEVICE_PSOC6ABLE2"". My device is not PSoC6 BLE2 device Family ID right? I feel we miss something to reconfigure for running the project on the CY8C6137BZI-F34.
Show LessDoes the CYBLE-416045-EVAL support DAPLink? I want to flash it with Mbed based firwmare. The fw-loader tool always shows a timeout.
Info: Start API initialization
Info: Connected - KitProg3 CMSIS-DAP HID-061208F302098400
Info: Hardware initialization complete (515 ms)
Info: Disconnected - KitProg3 CMSIS-DAP HID-061208F302098400
Info: Connected - KitProg3 CMSIS-DAP BULK-061208F302098400
Error: Wait for device DAPLink connect is timed out
Mode switch on 'KitProg3 CMSIS-DAP HID-061208F302098400' device failed.
Thanks
Show LessI have used the Em_EEPROM on a PSoC6.
I'm trying to preload values from a struct into the Em_EEPROM at compile-time.
I've tried different methods such as "Use emulated EEPROM = No" and it isn't working.
Attached is a simple test program.
Any suggestions?
Len
Update: 01/14/2020.
Apparently when a Cy_Em_EEPROM_Read() is performed, it is pulling the data from the EEPROM image to copy into RAM from the EEPROM_addr+0x100 bytes.
Here are some code snippets as I stepped through the code from my trouble-shooting session:
Show Lesscy_en_em_eeprom_status_t Cy_Em_EEPROM_Read(uint32_t addr, void * eepromData, uint32_t size, cy_stc_eeprom_context_t * context)
{
// addr = 0, eepromData = pointer to the RAM copy of the struct size=size of the struct... // Next curRowOffset is computed.
curRowOffset = CY_EM_EEPROM_EEPROM_DATA_LEN + (rdAddr % CY_EM_EEPROM_EEPROM_DATA_LEN); //curRowOffset = 0x100 (256 bytes) because of CY_EM_EEPROM_EEPROM_DATA_LEN.
... // later the EEPROM image is copied to the RAM location./* Copy the data to the user buffer */
(void)memcpy((void *)(eeData), // eeData = eepromData.
(void *)(startRowAddr + curRowOffset), // startRowAddr = 0 curRowOffset = 0x100
numBytesToRead);
... //EEPROM data 0x100 bytes into the EEPROM allocation is copied into the RAM.
}
Hi, I didn't find what I am looking for on the capsense v3 datasheet for PSoC 6.
I know how to operate individual buttons with the self and mutual configs (PSOC 6 101 helped a lot) but I need to setup a matrix with the CSX mutual config.
I am looking for a firmware example so I could try to implement it by myself. I don't know at all how similar it is to implementing a single button widget.
I am also unsure of one thing on the hardware side: as I setup the number of TX and RX pins in my capsense instance, does it refer to the amount of rows and columns, in which case a 4x4 matrix would have 16 buttons with 8 pins. I have no Idea how to read each RX row (or column) individually with the firmware I must write (maybe it's done automatically with the APIs).
Basically, I just need to know how to write code for a CSX button matrix. Thanks!
Show LessIs the Psoc 6 pcb libraries released anywhere? I know they have the schematic files at PSoC® 6 BLE Pioneer Kit | Cypress Semiconductor
but don't know if they have the pcb libraries available.
Show Less