PSoC™ 4 Forum Discussions
Hi All,
I have the following code:
int main()
{
UART_Start();
int len = 6;
uint16 tx_array [len];
for (;;)
{
tx_array [0] = 0xFFFF;
tx_array [1] = 0x6C56;
tx_array [2] = 0x6461;
CyDelay (100);
UART_SpiUartPutArray (tx_array, len);
}
}
It works fine with Hyper Terminal, but IO have a warning of incompatible pointer type.
"passing argument 1 of 'UART_SpiUartPutArray' from incompatible pointer type"
According to the datasheet the function can take uint16 * or uint8 * as first parameter. What is more interesting GDB crashes when I want to look into the way UART transmits the data:
"/home/build/work/GCC-4-9-build/src/gdb/gdb/utils.c:1056: internal-error: virtual memory exhausted: can't allocate 1049375820 bytes.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? "
The only thing on the TopDesign is the UART component (SCB type).
Does anyone have any ideas about the warning and the crash?
Thanks,
Stoyan
Show LessI'm slowly diving in to the world of BLE. The BLE pioneer kit and the examples have been very helpful and I was able to generate my own custom device/profile.
The end goal is to have a a number of BLE sensors that all connect to a single "central".
- Data rate: very low (2-4 bytes/minute) from each sensor
- Battery life: important but not critical.
- Security: Some basic security, so that data can't be read just by any smartphone. But don't need anything advanced, none of the data is sensitive.
- Number of sensors: 10 to 20
The question is: How do I architecture this?
Do my sensors send notifications or indications?
Should sensors wake up on 1min interval and waits for connection, while the "central" is scanning for devices? Then "central" connects securely, reads data and the slave goes back to sleep?
How do I implement basic security? Should sensors have the "central" added to the white-list (hard-coded)?
Thank you,
Boris.
Show LessHi,
I am very interested in the mesh flood example (Day 49 in the 100 projects/100 days) for a project I am working on, indeed it is almost exactly what I need.
What I want to do is make one of the PSOC BLE's a controller who's only role is to send our the RGB data at the push of a button. I am looking at modifying the existing mesh flood example code, and hopefully simplifying it greatly. I am new to BLE, and it is wildly more complicated than the BT serial links I am used to dealing with.
Where do I start with this? Do I need to modify the custom profile? Are any of the examples similar to what I am trying to do?
I saw Cypress had a demo at CES that was very similar to what I am looking for with a proximity sensor controlling light bulbs that were in a mesh - does this code exist somewhere?
Thank you,
Tom
Hello All,
I am a CY8CKIT-043 user trying to work my way through my first application.
A couple weeks ago I posed some questions using the kit's UART function and within a day or so I was back on track, so I am hopeful that my current quandry is something that is easily fixed (i.e. some kind person will point me at an obvious solution I've overlooked.)
Here is my situation: Using the PSOC Creator 3.3 application I have modified the kit's "breathing led" application to make use of the UART function to send strings from the kit to a Putty application. That is working okay now making use of sprintf to fill buffers and then "printing" them using the UART_1_UartPutString() function included in the creator application.
Now I am trying to go in the opposite direction. I'd like to be able to do a 'scanf' response and capture either an integer, float or string value from the UART. I've experimented with scanf which seems to be implemented in the creator but I can't make it work. Essentially I'd like to be able to echo a string back to the user in putty and have them respond, for example "how many iterations?" to which the user responds with an integer.
I realize I could do the getchar() route, capture every byte, convert the ascii to an integer, etc. etc. but I guess I'm just lazy. I'd prefer to not to have to go to this level of effort unless I really have to.
As I've already said, I could very well be missing something. I've searched the net and browsed forums and looked at the reference manuals I've found and I come up empty. Has anyone solved this problem before?
Rich
Show LessHello Folks,
I am running the sample of HR sensor on PSOC4 BLE Pioneer Kit. On the client side I am running BlueZ stack on a Intel Edison board. But immediately after doing a "connect <mac> ", disconnect happens. Is this normal? Shouldn't the connection remain. Is their anything I can write in code to prevent this disconnection. I am new in BLE, so please guide me.
Thanks,
-Gitesh
Show LessHi,
I have the CY8CKIT-042-BLE kit and have used the CY5670 dongle with CySmart 1.2 and it has been very useful. Now suddenly CySmart won't see the dongle. It brings up a dialog that says I have to update the firmware to C:\Program Files(x86)\Cypress\Cysmart1.2\dongle\CY5670\BLE_4_1_Dongle_CySmart_128K.hex.
But when I open PSoc Programmer 3.24.2 It says the dongle is running that file. (see PNG attached)
Successfully Connected to KitProg/BLE0F20122F03314400 at 4:32:11 AM | KitProg Version 2.16
Opening Port at 4:32:10 AM |
Device set to CYBL10162-56LQXI at 4:32:09 AM | 131072 FLASH bytes
Device Family set to CY8C4xxx-BLE at 4:32:09 AM |
Active HEX file set at 4:32:09 AM | C:\Program Files (x86)\Cypress\CySmart\1.2\dongle\CY5670\BLE_4_1_Dongle_CySmart_128K.hex
|
| Users must be aware that the following PSoC device should not be powered or programmed at 5V. Doing so will cause damage to the device: CYRF89xxx
Session Started at 4:32:08 AM | PPCOM Version 20.0
So it has the correct file but still won't use it. All my Cypress programs have been updated to current, Any suggestions what I can do ?
Thank you,
--jim schimpf
Show LessI've noticed that the Psoc Creator environment hangs and hangs and hangs. While debugging via USB, the microcontroller could be doing the simplest of tasks, like multiplying two float numbers together and it takes almost minutes it seems to update and move forwards in the debug window. How can it take this long for such a simple task?
Show LessHi,
On a PRoC BLE, we can configure a GPIO in Open Drain, pulls low. What is the maximum voltage we can put on the pin and sink?
E.g. if VCC is 1.8V, can we sink a 3.3V LED? The electrical characteristics mentions one thing to do with GPIOs - a tolerance of +0.5V, and as a digital input I can see why that would be, but how about as an Open Drain?
Thanks, Dave
Show LessHello everyone,
I want to send a variable string (for eg.: varying ADC value) to a computer using SCB-UART component. How can I achieve this?
The kit I am using is CY8CKIT-042-BLE and I also making use of TeraTerm emulator to observe the string sent via UART. Is there any api that I can make use of in order to send a variable string of characters??
Show Less