PSoC™ 4 Forum Discussions
Problem: GPIO interrupt source is not initiating a software reset, as specified, from Hibernate. What are the possible reasons? EZ-BLE 4100
I have configured a GPIO the same as in the Hibernate_PSoc4_Example and do not see my device entering the Reset Vector when the input is switched to ground. Prior to entering Hibernation I stop all my other interrupt ISRs, disable resources and outputs driving loads. Next I perform the following sequence:
isr_SW_Enable();
SW_ClearInterrupt();
isr_SW_ClearPending();
isr_SW_StartEx(&ButtonPressInt);
CySysPmHibernate();
The GPIO input (SW) is set as a digital input, initialized High with a pullup. Its interrupt is set to falling edge, transparent, dedicated and buffered. The isr_SW is configured to DERIVED.
In the debugger the code waits at (seen when I pause the debugger):
CyExitCriticalSection(interruptState); in void CySysPmHibernate(void) of cyPm.c
Resuming in the debugger and commutating SW to ground the code vectors to the ButtonPressInt instead of resetting to the top of main() as expected.
In standalone mode, the system just hangs. Any cause for not resetting that I'm overlooking?
Rick
Show Less(disclosure: I followed the capsense tutorial to get my original code working)
I'm able to successfully send single int values from my app to the BLE device. This is easy enough taken from the example code:
func writeLedCharacteristic(var val: Int8) {
let ns = NSData(bytes: &val, length: sizeof(Int8))
capsenseLedBoard!.writeValue(ns, forCharacteristic: ledCharacteristic, type: CBCharacteristicWriteType.WithResponse)
}
I updated my BLE custom profile for the led characteristic so that it now looks like this (see Download IMG_0327.jpg):
Really only changed the type to uint16
so that it would accept more characters. My rational here was that the capsense characteristic needed to be of type uint16
since more than a single bit was going through. If you can't tell already I'm extremely new to this.
Next I updated my iOS code to try and send the data like this:
let string = "hello"
let bytes: [UInt8] = Array(string.utf8)
let data = NSData(bytes: bytes, length: bytes.count)
capsenseLedBoard!.writeValue(data, forCharacteristic: ledCharacteristic, type: CBCharacteristicWriteType.WithResponse)
I have updated my PSoC code to look like this:
/* only update the value and write the response if the requested write is allowed */
if(CYBLE_GATT_ERR_NONE == CyBle_GattsWriteAttributeValue(&wrReqParam->handleValPair, 0, &cyBle_connHandle, CYBLE_GATT_DB_PEER_INITIATED))
{
UART_UartPutString("did get write request LED");
char t = wrReqParam->handleValPair.value.val[0];
CyBle_GattsWriteRsp(cyBle_connHandle);
UART_UartPutChar(t);
//red_Write(!wrReqParam->handleValPair.value.val[0]);
}
When I run and test my code I don't even get acknowledgement that the iOS device sent anything..aka this is never spit out in HyperTerminal:
UART_UartPutString("did get write request LED");
My initial thought was that I was encoding was wrong so tried changing the led Custom Characteristic type to uint8
how that is still not working!
The other issue is that from what I can tell I should be getting a char
array from this line handleValPair.value.val[0]
in PSoC however I'm not sure how exactly to extract that into an array.
Again, I'm extremely new to this lower level stuff, my C
is amateur at best. Any help is very much appreciated!!
Hello all,
I currently have a watchdog timer setup to 2 seconds (divider is 16bit @65535) and would like to extend it to 30 seconds. I use the built in auto generated watchdog timer that uses the LFCLK. Is there any way to do this? Can I use WDT2? If so how??
Thanks,
Rick
Show LessI want to control bonding by enable/disable and need change security mode from "Authenticated pairing with encryption" to "Unauthenticated pairing with encryption".
How to do this ? What a functions exist ?
Show LessHello,
i am using CY8C4247AZI and i want to alternatively start and stop line and line_n.
In my project invert signal is require for that i am using both line and line_n. but i don't know
how to stop line_n while line is running or generating PWM .
in next step i have to close line but line_n must be turn on and generate invert PWM..
Best Regard
Deepak Aagri
Show LessI use psoc4 the bootloader and bootloable components, to upgrade a device when it is successful, but to upgrade a number of equipment, then it is not possible.I use the communication is 485 communications.
Show LessPSoC 4 BLE
So in the KB article "PSoC® 3, PSoC 4, and PSoC 5LP Flash Memory Organization and Array ID Parameter - KBA84740" <http://www.cypress.com/knowledge-base-article/psoc-3-psoc-4-and-psoc-5lp-flash-memory-organization-and-array-id-parameter> flash memory organization is discussed.
I'd like to know the flash organization for the PSoC 4 BLE parts.
How many bytes does each row contain? The KB article says "Refer to the Ordering Information section of the family datasheet" but is isn't apparent from looking at that table <http://www.cypress.com/file/137466/download> what the row length is?
Show LessHi all,
I have a master and a slave on an i2c bus. I need to give an address to this slave by bit-banging the sda pin. On the slave, I want to detect an interrupt on the sda pin and read the address. Then the master will communicate with the slave using the i2c. My questions are the followings:
1) How can I detect an interrupt on the sda pin and then start the SCB component?
2) How can I link my CY_ISR() function to this interrupt?
It's easy with a pin that you put on the schematic, but I don't have access to the sda pin on the schematic. My slave device is a cy8c404lqi-422 and I'm using PSoC Creator 4.0.
Thanks in advance.
-Antoine
Show Lessi want to set 8-digit seven segment display in Timer Interrrupt.
iteration time for every interrupt is 6 ms.
i done this in psoc-1 in past.its working fine there.
so i want to make it same on psoc-4 but when i set same setting on psoc-4 then its not working correctly.
can you tell me is that psoc-1 and psoc-4 Timer configuration are different??
Show Less