HardFault using MDK with CE220960 BLE Upgradable Stack Bootloader

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

cross mob
dodo0822
Level 1
Level 1
First reply posted First question asked Welcome!

I'm trying to adapt this code example to our design requirements. We are currently running this code example on PSoC 6 BLE prototyping kit (CY8CPROTO-063-BLE). I've switched the BLE stack to running on Cortex M0+ following the instructions and changed the toolchain to MDK. However we encounter HardFault during App2 startup, in the Cy_BLE_Start function. Our observations are:

  1. This issue does not occur when using ARM-GCC toolchain
  2. App1 (DFU mode) works properly
  3. With the debugger we were able to trace down the HardFault to function Cy_BLE_StackInit, and from the stack frame the PC register address when the fault occurred belongs to the function CyBle_RcbRegRead
    0x10016588   0x00000028   Code   RO        10367    i.CyBle_RcbRegRead  cy_ble_stack_mdk_controller_soft_cm0p.a(CyBleRcb.o)​

 

dodo0822_2-1611424472108.png

Any help would be appreciated. Thanks!

 

0 Likes
4 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @dodo0822 ,

Can you please let me know the version of PDL, BLE component and any modifications you may have done to the code? Did you change the macro in dfu_mdk_common.h file to BLE_CM0 since you said the stack is running on CM0p?

Let me know the detailed steps to reproduce this issue. 

Regards,
Dheeraj

0 Likes

Hello @DheerajK_81 ,

I've tried PDL 3.1.3 and 3.1.2 and both versions has this issue. I followed the exact steps described in "Appendix A: CPU Core Configuration of the BLE Component" of the code example documentation to switch BLE stack to CM0p and change toolchain to MDK. Apart from that I didn't make any modification to the code example. Yes, I did change the macro to BLE_CM0.

0 Likes
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @dodo0822 ,

A similar issue was reported in the community. Can you please check this thread and see if it solves your problem as well: https://community.cypress.com/t5/PSoC-6-MCU/Can-t-Start-BLE/td-p/142930

Regards,
Dheeraj

0 Likes
lock attach
Attachments are accessible only for community members.
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @dodo0822 ,

I have tested the project on my side and everything works as expected. I have tried all possible switching between the three applications to see if I can break them but seems to work for me.

Please find the project attached targeting MDK Toolchain and PDL 3.1.3. Please check if it works on your side. Consider testing on two kits if you have them. 

 

Let me know your observations.

Regards,
Dheeraj

0 Likes