PSoC™ 4 Forum Discussions
I defined a constant arrary ,but I didn't use it.I can't find this constant arrary in the map file.
I have an application where I am trying to minimise current draw when waiting for an external trigger signal, but then need the PSOC to leap out of bed and set one of my GPIO pins high as quickly as possible - I'm talking sub 10usec after the trigger is received, if possible.
I'm putting my code into Hibernate and triggering it out of this mode with a GPIO interrupt. But I'm coming up against a couple of issues:
1. In the default start up code that PSOC Creator spews out (cyfitter_cfg.c), there are a number of delays (one of them is 500msec!!) slotted into the startup code to allow various clocks to settle. So, if I leave the cyfitter_cfg.c as is, I've got no hope. I'm seeing delays of 520msec or more between when the trigger occurs, and when my GPIO is set high.
2. In attempt to get around the above issue, I manually changed cyfitter_cfg.c so that the very first thing it does is write to one of my GPIO pins, but I think some other code needs to run beforehand, so that the appropriate GPIO is configured correctly (in my case as an output with Strong Drive). This is where I read this: https://community.cypress.com/t5/Knowledge-Base-Articles/GPIO-State-during-Startup-in-PSoC-4-KBA227963/ta-p/249649
I read in the datasheet for the PSOC4 that the wakeup time for the PSOC4 to exit Hibernate mode is 3msec, but its not clear what this refers to, particularly given the fact that there is a 500msec thumb-twiddling delay inserted into the start up code by default.
Does anyone know a way I can get my GPIO pin set up and write a "1" to it in the sort of time frame I'm needing? (< 10usec after the trigger signal)
Cheers,
Mike
Show LessHello,
I want to use the iDAC in the CYBLE-222014 and was wondering if the Vref supplies the iDAC. If so,
1) is it okay to supply Vref/iDAC with 5.5V and VDD/VDDR with 2.8V?
2) Also, is it okay to leave Vref disconnected when I am not using any analog blocks?
Show LessHello,
in my application, I have a lithium battery.
the system is powered when USB is pluging in and a specific IC charge the battery?
the IC charger has two differents set up: 1: limit the current at USB specifications (100 mA and 500mA after enumeration) and 2 :boost current more than 500mA (max 1800mA) when the USB cable is connect to a wall adapter.
I need to kown, when this two different stage happen
_ when enumeration is ok and USB port can send 500mA
_when the USB cable is connect to a wall adapter.
is there fonctions in the API of the USBFS component that can handle that.
Show LessHello
in my application the charger IC always feed the system and "disconnect" the battery when the charging process is finish.( ofr keeping a long life battery with less cycle)
So for my understanding, when a USB cable is plug into my device, my system is ALWAY bus powered.
Do I have to set my USB device as a self powered device, and just after the configured state, change into bus powered device ? or directly as a bus powere device ?
What about the hardawe configuration ? do i need external resistance for pull up or I just use the internal pull up resistance on D- and d+
Show Less
Hello sir, I have kitprog cy8ckit-059. Kitprog is successfully detected by PSoC programmer and PSoC creator 4.2. I have attached MCU cy8c4245axi-483. I have debug code in MCU through kitprog. But after one time connect now I'm getting error like Error dbg.m0039 there was an error running port acquire. Can not acquire SWD device!
Can any one give me any suggestion?
Thanks,
Prem KB
Show LessI like to use this device running an USB - HID profile. According datasheet Pin 13.1 (D-) 13.0(D+) and P13.2 VBUS (5V from USB?). Datasheet of USB tells me that I also have to assign VBUS to P0.0 ..(for 4200L devices). For me this is all not clear how to wire. It would be very great if your datasheet hold a schematics of all possible scenario.. how to connect. Pease assist !!
I like to run it as self powered, Not Bus powered. Please tell me the exact setting in USB configuration, and how to wire... what to connect where and how, Thanks.
Show LessHello, Cypress supporters.
About PSoC4: CY8C4024LQS S411, I want to set Pin(UART Rx setting) to detect GPIO edge occurrence and wake up from Deep Sleep. However, according to "AN90799: PSoC® 4 Interrupts", it says:
2.1 Interrupt Sources
(1)There are pin limitations; not all ports have dedicated interrupts. If the UART selected pins do not have dedicated port interrupt, it cannot wake up the device. See the "Interrupts" chapter in device Architecture Technical Reference Manual (TRM) to learn about ports that have dedicated interrupts.
It says "If the UART selected pins do not have dedicated port interrupt," Which Pins can't wake up?
I looked at the relevant part of TRM, but I can't find the description.
Thank you for your support.
Show Less
Hi,
I am having an issue with motor driver communication, and I would like to ask if my SPI code is correct. I am only getting 0xFFFF for any register that I am trying to read, and I know that that is not correct for startup of the registers.
The guts of the code is here:
uint16 DRV8323_Read(uint8 addr)
{
// Dummy byte needed to clock in read data
uint16 dummy = 0x00;
// Write read command and address
// Read bit is MSB, addr takes up next 4
uint16 cmd = ((SPI_READ << 15) | (addr << 11));
SPI_DRV_SpiUartWriteTxData(cmd);
// Write Dummy
SPI_DRV_SpiUartWriteTxData(dummy);
// Wait for data to be received - is size consisting of 16 or 8 bit elements?
while (SPI_DRV_SpiUartGetRxBufferSize() < 2) {}
// Read both data bytes
// dummy
data1 = SPI_DRV_SpiUartReadRxData();
// return data
data2 = SPI_DRV_SpiUartReadRxData();
SPI_DRV_SpiUartClearRxBuffer();
// Return register data
return (data2);
}
Attached is the full test project.
Datasheet for the motor driver is here: DRV8323
Thank you in advance for any help that can be offered.
Regards,
Tom
Show LessI am using the USB HID example from cypress. On the Cy8CKIT-059 (psoc5) it is running fine. I have to use CY8C4247AZI-L485 in a custom board.The system is self powered. I connected D+ D- and VUSB to the pins of the USB connector. I can programm but USB enumeration is not completed. The flow hangs in the while loop
int main(void)
{
uint16_t OUT_COUNT;
uint8_t* response;
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
/* Start USBFS operation with 5-V operation. */
USBFS_1_Start(USBFS_1_device,USBFS_1_5V_OPERATION); // USBFS_1_3V_OPERATION
while(USBFS_1_bGetConfiguration() == 0x00)
{
/* Waiting for device to be configured */
}
I also tried the 3V operation. I checked the USB configuration and tried all options avaliable
also using P0.0 with a voltage divider connected in parallel to VUSB. What do I miss? How can I get the device running?
Show Less