AnsweredAssumed Answered

BLE stack fails when started from bootloader

Question asked by arpad.toth@scorpionauto.com on Jul 2, 2019
Latest reply on Jul 12, 2019 by Estephania Martinez

Hello,

 

My problem is that the BLE stack misbehaves when the application SW is started via a bootloader.

When there is no bootloader (application started directly) BLE works correctly.

 

The problem: BLE scanning (RX) reports in invalid (gapScannedDevice_t) length, advEventType and payload.
BLE advertisment (TX) works correctly even when started from bootloader.

 

Is there something RAM address dependent regarding Gap_StartScanning/gapScannedDevice_t parameter?
Bootloader should be transparent to application, so it considered as a clean start. (stack reset, bss cleared..)

Bootloader seems to be working correctly, also rest of the application too, only the BLE part fails.

 

Architecture:

 

Bootloader (no BLE stack) at flash address: 0x21000000
jump to app

vector_p = 0x21019000
SCB->VTOR = vector_p
__set_MSP(vector_p->stack_addr);
vector_p->resetFunc_p();

 

Application flash address: 0x21019000
lib_ble_5-0_host_cm4.a
lib_ble_QN908XC_controller.a
lib_crypto_m4.a

binary image shifted by 0x19000

 

Env:
MCU:QN9080x
MCUXpresso SDK v2.2.0

 

Thank you

Outcomes