PSoC™ 6 Forum Discussions
Hi Team,
I am using psoc 6. my query is related to the generated code (after compilation). As I am working with ble section.
I got the error "CY_BLE_GATT_ERR_INVALID_OFFSET".
I am using function Cy_BLE_GATTS_SendNotification(&ConnectionHandle, &handleValuePair) for updating any changes to gatt client.
Inside this funcion, there is a function (generated code) named Cy_BLE_GATTS_WriteAttributeValueLocal(const cy_stc_ble_gatt_handle_value_pair_t *handleValuePair). this has structure
cy_stc_ble_gatts_db_attr_val_info_t param =
{
.handleValuePair = *handleValuePair,
.flags = CY_BLE_GATT_DB_LOCALLY_INITIATED
};
this structure instance "param" has other members also apart from the handleValuePair & flags which have not been given any value. e.g. structure members "offset" is also there.
why not all the structure members initializes here?
and finally this structure being passed to function Cy_BLE_GATTS_WriteAttributeValueCCCD(¶m) which gives the error "CY_BLE_GATT_ERR_INVALID_OFFSET"
my doubt is here only, if "offset" had been initialized here, then "CY_BLE_GATT_ERR_INVALID_OFFSET" error would not have come.
Is my understanding correct or Could you please get me a resolution of this error?
/Vinay
Show LessHi
My kit is PSoC63.I can find some information from ADC datasheet .The achieved scan rate is dependent on the following:
▪ ADC clock rate
▪ Number of channels
▪ Averaging
▪ Resolution
▪ Achieved acquisition time
The parameters of number of channels ,averaging and resolution are fixed, so which API can change the scan rate ?
Best regards, vick.
Show LessI'm using a USB CDC serial port on a PSOC 62. Everything works fine on windows. However, Android seems unable to detect the port. What might I try?
Thanks!
I have code that needs to run on a timer. Running with a fixed sleep in between won't be accurate enough, the timer is necessary. I've set up a "Timer Counter" on the schematic to fire on an interrupt which is handled by CM0+. The problem is that the code I need to run can't run correctly inside an interrupt handler. Instead, I wrote
Cy_SysPm_Sleep (CY_SYSPM_WAIT_FOR_INTERRUPT);
and put my code after it, but this function call never returns. If I add debug code in the interrupt handler, that fires, but not code after Cy_SysPm_Sleep. I've also tried not installing any handler for the interrupt, no difference.
How do I sleep CM0+ until an interrupt fires, but otherwise ignore the interrupt or have no handler for it?
Show LessHello,
How can I get the maximum Datarate from the UDB to RAM?
I use 32Bit wide Readacces to the FIFOs. It looks like I need round about 10 Clock Cycles for a read access of a single 32bit Word. Indipendent if I use the M0 CPU or the DMA.
I the post PSoC6 Memory and DMA Performance there was mentioned that the Taa time is 2 but depends on the device. I use a CYBLE-416045-02. Is there a PSOC6 with better acces Times regarding the UDB? How should I configure the UDB for maximum Perfomance from FIFO to RAM and what is the maximum possible Speed there?
Regards
Sven
Show LessHey there!
I read in the "CYBLE-416045-02 EZ-BLE™ CREATOR MODULE.pdf" document:
"Cypress-provided peripheral component library using UDBs to implement functions such as communication peripherals (for example, LIN, UART, SPI, I2C..."
For my application I need to implement 2x I2C Master Controllers, 1x partial SPI Controller (MOSI, CLK, SS), and 1x UART (TX & RX). I additionally need pin 24 for the SWO functionality. From what I see in "Table 4. Digital Peripheral Capabilities", there appear to be 4x groups of pins that are capable of UART/I2C/SPI. Unfortunately using SWO (pin 24) stomps on one of those blocks and removes an UART RX, SPI MOSI, and I2C SCL from being accessible.
Given my current wiring layout I've implemented the UART, SPI, and only 1x of the I2C controllers using the SCBs. I do still have spare SCBs available and general purpose pins. However I don't have enough SCB-dedicated pins. From what I understand SCB pins are hardwired and cannot be rerouted to general purpose pins.
In light of what the aforementioned document claimed, I'm looking for instructions on how I can implement the remaining I2C Master controller with an available UDB block. Can anyone point me in the right direction of how to accomplish this?
I've read posts from over a year ago saying that PSoC 6 / Creator 4.2 Beta weren't quite ready to have UDB-based communication modules ready.
Re: No UDB-Components for PSoC6
Re: How to use PSoC6 UDB in Creator4.2?
I've also seen that there appears to be a process for forcing compatibility of UDB-implementation of I2S to work with PSoC 6:
Import UDB-based I2S Component in a PSoC 6 MCU Project (PSoC Creator) – KBA229971
So with that said, could anyone point me in the right direction to either get an I2C or UART-RX Controller implemented with UDB(s), or magically reroute dedicated-pin SCBs signals to other pins?
Cheers,
Timothy
Show LessHello,
Executing Task delete causes an infinite loop in portFORCE_INLINE static void vPortRaiseBASEPRI( void ) of "portmacro.h".
The "#define INCLUDE_vTaskDelete" is 1 in "FreeRTOSConfig.h".
Please tell me how to resolve.
Best regards,
Yocchi
Show LessHi everyone!
I have a project where i want to hook up a single electret microphone to a raspberry pi via the psoc i2s interface.
I built a analog preamp circuit for the mic which seems to be noisy but working so far, fair enough. I have a single output that gives me 0.6-2v DC.
I hooked the thing up to an ADC and read the values via UART.
i used the following code:
x = Cy_SAR_GetResult16(SAR,0);
v = Cy_SAR_CountsTo_Volts(SAR,0,x);
printf("v = %fv \r\n",v);
CyDelay(50);
that spits out volts in my terminal. So far so good, it seems like the analog to digital conversion worked, but now i want to send this data to another System, and i'd like to use I2S (or I2C if that is more reasonable, but i researched a bit and it looks like i2s is made for digital audio transmission, so i guess thats the right one.)
And now i'm stuck on the i2s part. i tried hooking "sdone" up to "rx_sdi" (i'm guessing both are serial data?). Notice list says "routing failed". If someone could direct me to a solution or a better way to do this, i would greatly appreciate it.
Show Less