PSoC™ 4 Forum Discussions
I have what is hopefully an easy problem to solve: How do I figure out why I am stuck here?
Using some breakpoints and stepping, I've discovered about where in my code I get kicked over into this handler, I just don't know what the exact cause is. My project has an OLED display that I have to map out (SSD1306, it requires a char array[4][128]). The project has three display modes, a standard display, a menu selection, and some input data (which is displayed as you key in the input). Things work fine in the standard display mode and menu selection mode.
When it comes time to build the OLED map for the input data mode, I keep getting kicked into the handler. Specifically, during the process of 'building' the map. I have a 3D array[12][4][20] full of the maps for various characters(stored in Flash as it overran the SRAM when I originally stored it there). The code copies the required character maps from that 3D array into the appropriate locations of the OLED display's map array. Below is the code snippet where it breaks on me. d1top is 0 and d1bottom is 20. I've stepped through, and things work great there. The issue is right when it transitions to add the second digit.
Last bit of information, this is almost identical to the function used to display the standard display mode and menu selection mode. Since this is the input data mode, I had to modify the function input parameters and hard code in
displayData[page] = digit[10][page][placeholder];
instead of
displayData[page] = digit[d1][page][placeholder];
There are other minor differences, but that's the only thing involved in this section of the function. The function that runs the other two modes works great.
When I try to add errno to the Watch list it just says that 'errno' does not exist in the current context, so I can't get any further information from there.
I also changed up the code where the functions are now passed a pointer to the display array (displayData[][]). Before I would just create a new one in each function and send the entire array to the display function. Since the only thing I have to go on is ENOMEM, I thought maybe I had ran out of SRAM, but now that I'm just passing the address to the two different functions (the one for the standard and menu, and then this one for the input data) I'm still getting kicked into this loop.
for(page = 0; page < 4; page++)
{
//
//clears entire display
//
for(initLoop = 0; initLoop < 128; initLoop++)
{
displayData[page][initLoop] = 0x00;
} //reset placeholder
//
//add digit in first place to display map
//
for(i = d1top; i < d1bottom; i++)
{
displayData[page] = digit[10][page][placeholder];
placeholder++;
}
placeholder = 0; //reset placeholder
//
//add digit in second place to display map
//
for(i = d2top; i < d2bottom; i++)
{
displayData[page] = digit[d2][page][placeholder];
placeholder++;
}
placeholder = 0; //reset placeholder
//
//add digit in third place to display map
//
for(i = d3top; i < d3bottom; i++)
Show LessHi,
During some development tests we discovered that the BLE Component stopped scanning.
We have 10 devices that (during this test) advertises at a rate of 20-30ms.
CyBle_ProcessEvents() is called every 5ms.
After a some time (anything from 10-60 mins) the devices stops scanning.
If we via software restart the BLE component the scanning is back for a while.
The above setup results in 300-500 advertising telegrams every second and only 200 CyBle_ProcessEvents() calls. It seems to us that there is some kind of scan buffer overrun that is triggered by heavy advertising by surrounding devices and not enough CyBle_ProcessEvents() calls.
If we now change the CyBle_ProcessEvents() interval to 1ms, the scanning continues to work over the weekend.
Is there a minimum interval CyBle_ProcessEvents() must be called at to ensure that the scanning will be working at all times - also under heavy load?
Is there an API that can be used to check the status of the scanning buffer so we can reset the BLE component based on that?
BR
Fink
Show Less
In my PSoC Creator 4.2 project the BLE component has a notice which states "There is an error associated with this component." The notice list shows that the program can't find a file named BLE_v3_53.dll. How do I acquire this missing dll? Uninstalling and reinstalling PSoC Creator did not work.
Show LessHi
Before going to sleep i would like to save as much power as possible and make sure no current is drawn from the battery.
how should i configure the output pins - Strong Drive low or put them is some sort of HighZ?
Show LessHello,
I wanted to know if we can access the 'ANT' pin of a PSoC module, suppose say CYBLE-022001-00.
In the above module they have used chip antenna.
So can the ANT pin of the chip module be used as per our needs, like for external antenna?
Thanks,
Ameya.
Show LessIn my Software I need a information about the mode in which a BLE module was bound. We have 2 modes. Standard and preferred. How can I deposit that I still know after reboot.
Tank you
H. K.
Show LessHi,
I am using CYBLE-214009-EVAL for my development.
According to the thread (Removing bonded devices ), I knew that CyBle_GapRemoveBondedDevice() OR CyBle_GapRemoveDeviceFromWhiteList() can be used to remove BLE bonded device.
However, after I added those API(s), the BLE bonded devices' information were still there.
Thus, I want to know how to use those API(s) to remove the BLE bonded devices' information?
Thanks!
Terry
Show LessI am using the bootloader example CE221653 – PSoC 4 Bootloader and Bootloadable. I modified it to use the serial port instead of I2C.
The BL seems to be giving a valid response, so I don't understand why I'm getting this error.
The Bootloader Host sends a start bootloader command.
The Bootloader replies with a "Waiting for command" message, along with the silicon ID and BL version.
Then the Bootloader Host sends an "Exit Bootloader" command and prints "The key provided for the packet does not match the key that the bootloader expects."
I do not have the Security Key enabled in the BL or the BL Host. I reduced the baud rate to 9600 and still have the same error. I have sniffed the communication and verified it bit by bit with an oscilloscope and by stepping through the BL code while it is generating its message. Below I show the output screen on the BL Host, The messages sniffed on the serial port and the message contents of the BL reply.
Can somebody please point me in the right direction?
From Bootloader Host Output screen:
03:11:14 PM - Selected device: USB Serial Port (COM4) - UART
Generic Serial Port
03:20:25 PM - program Started
03:20:25 PM - The bootloader reported error 'The key provided for the packet does not match the key that the bootloader expects.'.
03:20:25 PM - program failed in 179 ms.
Messages sniffed on serial port:
"Start Bootloader" cmd (38) from host 01 38 00 00 C7 FF 17 00
"Waiting for cmd" msg from BL 01 00 08 00 9E 11 50 0E 00 3C 01 01 AC FE 17 00
"Exit Bootloader" cmd (3B) from host 01 3B 00 00 C4 FF 17 00
This is a breakdown of the reply from the bootloader to the "Start Bootloader" command from the BL Host:
Thanks for your help,
Bob
Show LessIf connect the interrupt component to the "interrupt" pin, it not work at all, but if connect to the "tc" pin it work, but can change the period in software only if make it before the interrupt enable..
Show Less