Part Number: CC2640R2F
Tool/software: Code Composer Studio
Hi Everyone,
I'm trying to discover my problem for 3 days and the problems are going deep, so i need external help here.
I have 2 working projects with CC2640R2F chip with a custom hardware:
1) BLE5 with my services, based on hello Simple_Peripheral example with 2 tasks (SimplePeripheral_taskFxn and ICall_taskEntry)
2) A project, based on hello example, that read external sensors with SPI (with DMA) to grab information. Sensor Controller code is also included to acquire ADC data, but it's not being started/used yet.
I've already customized Board files, GPIO pins, so everything works well... alone.
When i tried to merge projects (BLE prj received extra files) after a hard work to compile, the BLE Tasks worked well, alone again. However, if i try to start any of other tasks that access SPI, the ICall_taskEntry task stops to work after the exactly moment that i opened the BLE Scanner App. The SimplePeripheral name appears at the BLE Scanner App, than disappear after few seconds. It is important to note that when i instantiate and start another Task that doesn't access SPI hardware, for testing purposes, this behavior is not displayed. It is also important to say that the project is disabling cache with CACHE_AS_RAM directive and all other instructions provided by TI documentation. POWER_SAVING is also disabled and NO_OSAL_SNV and DISPLAY are used to save flash.
I started to debug what was causing the problem with CCS RTOS Object View (ROV) and verified that the ICall task was blocked and there are no Stack Overflow:
Then, after pausing the debug, i've checked that the void AssertHandler( uint8 assertCause, uint8 assertSubcause) was at a HAL_ASSERT_SPINLOCK. So, i've checked the code at your defines and discovered a HAL_ASSERT_CAUSE_HARDWARE_ERROR (0x08 code) as displayed:
PS: This code is mine... The initial problem was spinning at the "Default:" switch case.
After reading a document from TI SDK: http://dev.ti.com/tirex/content/simplelink_cc2640r2_sdk_2_20_00_49/docs/blestack/ble_user_guide/html/debugging/ble-index.html#decoding-hardware-error-reason
saying how to decode this hardware error, i've got a hardCode with hdr event 0x91 (145) and hardwareCode 0x84 (132) and status 0x10 (16) as displayed:
as said by this document: "A breakpoint can be set in this function to determine the error code. This code should be reported to a TI engineer when experiencing a HCI hardware assert. These error codes are defined in ll_common.h and hci.h."
I've also checked those files to see what's hapening, but i found (0x84) as UNKOWN_RF_STATUS (?!?):
and for status (0x10) timeout exceeded. The code 0x91 is not listed at those files - i really don't know if this is correct. I'm confused about how to check this out.
So, please... i want a help to try to figure out what is going on and how to solve this.
Code Composer Studio
Version: 9.0.0.00018
Compiler TI v18.12.1.LTS
Simplelink SDK CC2640R2 2.40.0.32
XDCtools version 3.55.0.11_core
HEAPMGR_CONFIG = 0x81; (also tried with 0x01 a 0x11EC size - given by heapStart and headEnd from CMD file) - i've also checked the addresses and are correct.
From .map:
200040e8 heapEnd
20002efc heapStart
No use of GPRAM for program... 
STACK Options:
Optimization level -> 4
Speed / Size -> size (0)
APP options:
Optimization level -> 3
Speed / Size -> size (0)
ble5_app_FlashROM_StackLibrary.opt options:
-DDisplay_DISABLE_ALL
-DBOARD_DISPLAY_USE_LCD=0
-DBOARD_DISPLAY_USE_UART=0
-DBOARD_DISPLAY_USE_UART_ANSI=0
-DCC2640R2_LAUNCHXL
-DCC26XX
-DCC26XX_R2
-DDeviceFamily_CC26X0R2
-DICALL_EVENTS
-DICALL_JT
-DICALL_LITE
-DICALL_MAX_NUM_ENTITIES=6
-DICALL_MAX_NUM_TASKS=2
-DICALL_STACK0_ADDR
-DMAX_NUM_BLE_CONNS=1
-DxPOWER_SAVING
-DRF_SINGLEMODE
-DSTACK_LIBRARY
-DTBM_ACTIVE_ITEMS_ONLY
-DUSE_ICALL
-Dxdc_runtime_Assert_DISABLE_ALL
-Dxdc_runtime_Log_DISABLE_ALL
-DMAX_PDU_SIZE=255
-DMAX_NUM_PDU=1
-DxOSAL_SNV=2
-DNO_OSAL_SNV
At the stack GAP Bond is disabled:
/* Include GAP Bond Manager */
/* -DGAP_BOND_MGR */
Thanks in advance for your help.













