BLE stack CM4 vs CM0 pros and cons?

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

cross mob
johnspeth
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

I'm hoping somebody could please explain the pros and cons of running the PSOC 6 BLE stack on CM0 instead of CM4 like all sample code I've seen demonstrates. First of all, is running it on CM0 even possible? It seems to me that the BLE stack is a low load software module that should work equally well on either core. I would love it if somebody could point me to any appropriate (and current!) app notes and/or example projects.

I'm providing BLE programming expertise to a customer. I have only a few months of experience using the PSOC 6 BLE module so the core selection tradeoff is new to me.

Thanks - JJS

0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,


PSoC 6 BLE offers Dual CPU architecture, where the Controller runs on the CM0+ CPU and Host runs on CM4 CPU, and Single CPU Architecture, where both Controller and Host are run only on one CPU either CM0+ or CM4.

Dual core (Controller on CM0+, Host and Profiles on CM4) option will split the BLE stack to work on both the cores. The CM0+ core runs the BLE controller portion of the stack and is responsible for maintaining the BLE connection. The BLE Host runs on the CM4 core and performs application level tasks. The main advantage of this dual-CPU setup is that the CM4 core can go into Deep Sleep low power mode when there are no BLE-related tasks pending.
Please refer to the below App notes for more information on PSoC6 BLE dual core.
https://www.cypress.com/documentation/application-notes/an210781-getting-started-psoc-6-mcu-bluetoot...

https://www.cypress.com/documentation/application-notes/an215656-psoc-6-mcu-dual-cpu-system-design

https://www.cypress.com/documentation/application-notes/an215671-psoc-6-mcu-firmware-design-ble-appl...

Please let me know if this helps.

Thanks,
P Yugandhar.

View solution in original post

0 Likes
4 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,


PSoC 6 BLE offers Dual CPU architecture, where the Controller runs on the CM0+ CPU and Host runs on CM4 CPU, and Single CPU Architecture, where both Controller and Host are run only on one CPU either CM0+ or CM4.

Dual core (Controller on CM0+, Host and Profiles on CM4) option will split the BLE stack to work on both the cores. The CM0+ core runs the BLE controller portion of the stack and is responsible for maintaining the BLE connection. The BLE Host runs on the CM4 core and performs application level tasks. The main advantage of this dual-CPU setup is that the CM4 core can go into Deep Sleep low power mode when there are no BLE-related tasks pending.
Please refer to the below App notes for more information on PSoC6 BLE dual core.
https://www.cypress.com/documentation/application-notes/an210781-getting-started-psoc-6-mcu-bluetoot...

https://www.cypress.com/documentation/application-notes/an215656-psoc-6-mcu-dual-cpu-system-design

https://www.cypress.com/documentation/application-notes/an215671-psoc-6-mcu-firmware-design-ble-appl...

Please let me know if this helps.

Thanks,
P Yugandhar.

0 Likes

Thanks, Yugandhar. These app notes are exactly what I needed. - JJS

0 Likes
StNu_1610991
Level 4
Level 4
First comment on KBA 50 sign-ins 25 replies posted

Hi JJS:

I was trying to use CM0p for controlling BLE a number of months ago and got frustrated with Creator 4.3 Creator compile errors.  The application ran OK when selecting BLE for both CM0p and CM4 and for only CM4.  However, if only CM0p was selected some internal symbols were always left undefined and the compiles aborted.   See the the PSoC 6 question:

Creator 4.3 Error: unknown type name 'cy_stc_ble_srvr_char_info_t'

A reply from WICI_1318426 indicated that Creator 4.3 has code generator problems when trying to run BLE only in CM0p.  So, I gave up and am running BLE only in CM4.  Running BLE in CM0p would definitely be preferred so that CM4 would not have to be powered up just to send out a BLE advertisement.

0 Likes

Thanks, StNu, for giving us the benefits of your work. I'm using PSOC Creator 4.4 and I don't have the same code generation errors that you described in your other post. The example project I'm using is CE217637_BLE_Find_Me which has the source code compiler controls (ifdef/endif etc) needed to make switching between cores very little work. Maybe Cypress has corrected the code generation error.

I'd like to outline the steps I used to make the CE217637_BLE_Find_Me project build switchable between cores. I could not find this information anywhere so I tried it this way. Fortunately, it wasn't much work.

  1. Open the General tab of the TopDesign BLE component and change the CPU Core selection to Single Core (CM0+).
  2. Right click on the Host Files tree root in the Workspace Explorer and select Properties and change the Cores under Build Filters to CortexM0p.
  3. Rebuild, flash, and test.

JJS

0 Likes