PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
After going through a few application notes and datasheets of the SPI module, I wrote a very basic program to send one bite data through the SPI.
But the oscilloscope does not show any thing on the MOSI pin.
(All default settings of the SPI module)
My program is:
SPI1_Start();
SPI1_SpiUartWriteTxData(82);
Now the binary equivalent of 82 should be sent through the MOSI pin, but that pin does not generate pulses at all.
Where am I going wrong 😞
Show LessHi,
Most examples of getting deepsleep operating with BLE follow this pattern:
CyBle_ProcessEvents(); // service BLE stack events
CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP); // put BLESS into lowest power mode
intrStatus = CyEnterCriticalSection(); // disable interrupts
blessState = CyBle_GetBleSsState(); // get current BLESS state
if(blessState == CYBLE_BLESS_STATE_ECO_ON || blessState == CYBLE_BLESS_STATE_DEEPSLEEP)
{
CySysPmDeepSleep(); // 1.3uA current consumption
}
else if (blessState != CYBLE_BLESS_STATE_EVENT_CLOSE) // BLESS is active
{
CySysPmSleep(); // ~1.6mA current consumption
}
CyExitCriticalSection(intrStatus); // re-enable interrupts
The issue with this is that the critical section disables interrupts [CyEnterCriticalSection]. This means my ISRs don't fire. If I bring the sleeps outside the critical section, BLESS get's stuck in an internal state loop calling sleep.
How can I go into deep sleep with BLESS running, but still service interrupts?
Thanks, Dave
Show LessHey guys, I'm reading about rfid module and try to connect it my psoc4 pioneer kit cy8ckit042.
I'm pretty new in this area. In web is plenty of tutorials for arduino microcontrollers and all of them starts from downloading and installing lib. for RFID RC522 module. Is there some analogs for PSoC4 ? Or maybe there is some way to use or port arduinos lib?
I want to use RFID via UART or I2C, but as I see UART is simplier.
Show LessI have several Psoc-4 prototyping kits, but their chips have been damaged.
I want to replace those chips whit new ones.
I have a programmer. But how to enter the bootloader program into new chips so that they can be used with the prototyping kit in bootloadable mode.
Is there any example project for the prototyping kit to load the bootloader?
Show LessHi!
Each time I connect my pioneer kit to an external psoc-4 chip, it lands up in the mass storage mode.
I had burnt a bootloader program in the external chip, now that chip is simply not getting re-programmed. It sends the poineer kit to mass storage mode. What to do?
Show LessHello
Please refer some way to measure power for CY8kit042 psoc 4 ble.
If i calculate current on multi meter then what i set voltage in multimeter.
Thanks
Show LessHi,
We are using PSoC4 in a combo BLE and capsense application. To try and reduce noise we are attempting to to perform capsense activity between BLE intervals. As there is a whole mess of capsense we are doing, ie takes a lot of time, this is non trivial.
The summary of the plan is like this. Usually you have something like:
while(1)
{
/* CyBle_ProcessEvents() allows BLE stack to process pending events */
CyBle_ProcessEvents();
//do your stuff
}
while doing "our stuff", we are interested to know how much time is remaining before BLE will want to do something. The application notes on how to enter bless deep sleep offers a solution.
uint16_t start_instant = CY_GET_REG32(CYREG_BLE_BLELL_TIM_COUNTER_L);
uint16_t adv_instant = CY_GET_REG32(CYREG_BLE_BLELL_ADV_NEXT_INSTANT);
uint16_t init_instant = CY_GET_REG32(CYREG_BLE_BLELL_INIT_NEXT_INSTANT);
uint16_t scan_instant = CY_GET_REG32(CYREG_BLE_BLELL_SCAN_NEXT_INSTANT);
uint16_t ce_instant = CY_GET_REG32(CYREG_BLE_BLELL_NEXT_CE_INSTANT);
We then choose the closest event. and continually check CYREG_BLE_BLELL_TIM_COUNTER_L to see if we are running out of time. So far so good i hope. However the trouble happens right in the beginning. The docs say that we must check if the LL is idle before reading TIM_COUNTER_L, ie CY_GET_REG32(CYREG_BLE_BLELL_CLOCK_CONFIG) >> 7) & 1.
Under some circumstances, this operation *appears* to throw a hardfault. Now I can picture this happening if some peripheral clock gets turned off and this is an illegal read, but the read works in the debugger so I can't rule out anything. Could be memory corruption, stack troubles, some fault on ISR return.
We are looking for clarification as to whether or not there is actually some circumstance that would cause said read to fault, and if so, what is the workaround.
Regards,
Jon Pry
Show LessI'm Using a CYBLE-022001 module and trying to keep the current consumption down to a minimum.
I noticed higher than normal current levels when connecting to the module using an iPhone5. The behavior is not apparent when using an iPad, an Android phone or the CySmart App on a PC.
When I connect with the iPhone the BLESS will transition in and out of DeepSleep for the first few events and then refuses to go back into DeepSleep for up to a minute and then at random decides to drop back into DeepSleep as it should, just waking at each connection event.
For an iPad, Android and CySmart on PC the following are a typical event logs:
** CySmart 1.2 **
GATT_CONNECT_IND
GAP_DEVICE_CONNECTED
L2CAP_CONN_PARAM_UPDATE_RSP (ACCEPT)
GATTS_XCNHG_MTU_REQ
GAP_CONNECTION_UPDATE_COMPLETE
....
GATTS_READ_CHAR_VAL_ACCESS_REQ
** iPad **
GATT_CONNECT_IND
GAP_DEVICE_CONNECTED
GATTS_XCNHG_MTU_REQ
L2CAP_CONN_PARAM_UPDATE_RSP (ACCEPT)
HCI_STATUS (Error 04 - PAGE TIMEOUT)
GAP_CONNECTION_UPDATE_COMPLETE
....
GATTS_READ_CHAR_VAL_ACCESS_REQ
The iPhone typically produces an event log as follows:
GATT_CONNECT_IND
GAP_DEVICE_CONNECTED
GATTS_XCNHG_MTU_REQ
L2CAP_CONN_PARAM_UPDATE_RSP (ACCEPT)
HCI_STATUS (Error 04 - PAGE TIMEOUT)
....
GATTS_READ_CHAR_VAL_ACCESS_REQ
Notably the iPhone connection doesn't include the 'Connection Update complete' event and if I suppress the connection interval update, the problem doesn't arise with the iPhone.
A common DeepSleep lockout occurs shortly after the L2CAP_CONN_PARAM_UPDATE_RSP (ACCEPT) event occurs as with all of the clients but doesn't return to normal in the case of the iPhone, presumably due to the lack of GAP_CONNECTION_UPDATE_COMPLETE event?
Also with iOS it seems that the Page Timeout error occurs in both cases. I am not sure what this is referring to unless its the lack of connection update response in the case of the iPhone but doesn't seem to be a problem for the iPad connection??
Just to add to the confusion I can sometimes get the iPhone to connect without the DeepSleep problem when initially powering up the ez-ble module!
The connection parameters I am trying to use are shown below but have tried many other combinations, keeping within the apple guidelines:
CYBLE_GAP_CONN_UPDATE_PARAM_T connParamsSlow =
{
152, /* Minimum connection interval - 152 x 1.25 = 190 ms */
168, /* Maximum connection interval - 168 x 1.25 = 210 ms */
0, /* Slave latency - 0 */
200 /* Supervision timeout - 200 x 10 = 2000 ms */
};
I was originally using the BLE component v2.20 but updated it to V2.30 without any improvement.
Can anyone shed light onto what I am seeing here and offer a possible workaround to get the module to go back into DeepSleep correctly?
Show LessHi all,
I need to test the CY5670 USB Dongle as a GATT Server with a bluetooth name, connect it and send e receive command from a UART serial port software terminal
If I start Putty or TeraTerm and set the parameters COM7, Baud rate 115200, Parity Even, Data Bit 8, Stop bit 1, I don't receive any response.
Are there commands documentated to send through COM port to set the bluetooth name, bluetooth discoverable, etc?
Are they Hayes like commands?
Could you help me?
Thanks
Show LessHello,
There are two UART interfaces in my project, one with the laptop and one with the GSM/GPS module. One with the laptop is correctly working on pins P1.4 and P1.5 using UART SCB mode. I assigned pins P0.2 and P0.3 for GSM/GPS module using UART v2.50.I am trying to display data received from GPS/GSM module on hyperterminal of the laptop. But the screen displays strings sent on laptop UART interface only and not the data received(on P0.2 and P0.3) from module. Baud rate and other settings of hyperterminal are also checked.
I have attached my project file herewith. "Hello welcome" appears on the hyperterminal. But no further data is displayed. UARTpc uses SCB mode and P0.2 and P0.3, UARTmod is for module and uses v2.50and pins P1.4 and P1.5 . Any solution for this?
Show Less