High memory usage in AN91162

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I want to build a system that communicates over BLE. I used AN91162 to learn to configure and use BLE. It works well, but I see the following memory usage:

Flash used: 80271 of 131072 bytes (61.2 %).

SRAM used: 10896 of 16384 bytes (66.5 %). Stack: 2048 bytes. Heap: 128 bytes.

This has been reported by PSOC creator 4.1.

Below are the details about my setup and tools:

Environment:

PSoC Creator  4.1 Update 1 (4.1.0.3210)

Culture: English (United States)

OS Version: Microsoft Windows NT 10.0.14393.0

CLR Version: 4.0.30319.42000

BLE component version: 3.40

Prism component version 2.20

Please help me reduce the ram and flash usage.

Thanks,

Aditya

0 Likes
1 Solution
Anonymous
Not applicable

BLE itself uses most of the flash and ram usage sadly

If you remove the BLE component, but leave the rest of your code in the chip, the use should drop from roughly 66% down to 3% or so...

BLE is not a very space friendly component

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

BLE itself uses most of the flash and ram usage sadly

If you remove the BLE component, but leave the rest of your code in the chip, the use should drop from roughly 66% down to 3% or so...

BLE is not a very space friendly component

0 Likes
Anonymous
Not applicable

I want wireless connectivity in my application. If BLE is that memory hungry then does Cypress have any other solution for wireless connectivity?

Also the memory utilization that I reported was for CY8C4247LQI-BL483. If I upgrade to CY8C4248LQQ-BL583T, then I get double memory at slightly higher price. But it really nice to know if any other optimal solution exists!

Thanks,

Aditya

0 Likes
Anonymous
Not applicable

I looked at the cypress modules myself a little bit, but didn't see larger memory than the 256K, and the other choices would be WI-FI, WICED, or one of the other PSoC 3/4/5/6 chips.

A hima​ might have more information on recommendations, as I don't have great knowledge on which chips Cypress has available

The PSoC 6 has 1 MB of flash space, but that is probably more expensive

If you open a case with Cypress, potentially they can help you reduce the footprint of the BLE code, or to find the right chip that you need/lower price, etc.

Although, 33% of space is quite enough for applications that are mostly communicating through the wireless/bluetooth interface for the application. Potentially, changing the profile/component settings might yield better results as well, but not very effectively I think.