MKW38 BLE Scan not working when long time test Dear Christine Li and NXP team Thank your for support Following up on the BLE scan issue we reported earlier, we would like to share additional analysis results from our long-run test and ask a few questions. 1. Summary During continuous scanning, the controller sometimes stops delivering any LE Advertising Reports to the host. During this period, the LL registers show that scanning is still active (SCAN_STATUS.Scan_on = 1), but no packet is received at all. PKT_RSSI_STATUS and CH_ADDR do not change. In most cases the controller recovers by itself within 1 s – 2.5 min. In one case it never recovered (more than 8 hours, until the log ended). We were informed that SDK 2.6.916 fixes this issue. However, the issue was reproduced within about one week with the SDK 2.6.916 libraries. Test conditions Units / duration: 5 units, approx. 14.6 days each, no MCU reset during the test Controller library: imported in Apr 2023, 2.6.615 or later (contains Controller_SetPeripheralDiscThreshold(); exact version unknown) lib_ble_kw38a4_controller_gcc.a, 617,384 bytes, MD5 prefix 50417a8d65 Separate test: SDK 2.6.916 libraries – same symptom reproduced within about 1 week Scan parameters: Active scan, interval 0x0011 (10.625 ms), window 0x0008 (5 ms) Filter policy: accept all, duplicate filtering disabled Continuous scanning (gGapScanContinuously_d), extended scanning (scanning PHY register 0x14E = 0x0005) Scan start/stop: started once after boot; no scan stop/start during the test Environment: approx. 75–110 advertising reports per second in normal operation Application-side register access: Read-only polling of LL registers every 1 s (0x01C, 0x01E, 0x064, 0x0C4, 0x0D2, 0x0D4, 0xF28) One 16-bit read of INIT_SCN_ADV_RX_FIFO (0x4008007C) every 180 s for diagnostics No LL register is written by the application 3. How we detect the issue We count advertising reports at each layer every second: L1: LE (Extended) Advertising Report events passed from the controller to the host. Counted in a wrapper around Ble_HciRecv() registered with Controller_Init(). L2: gDeviceScanned_c / gExtDeviceScanned_c delivered to the application callback. L4: Reports processed by the application task. When the issue occurs, all counters stop at L1. The controller stops generating advertising reports. Host and application are not involved: Ble_HciRecv() reports no failure at that time. Application message allocation does not fail. The application queue is empty. 4. Statistics (5 units, approx. 14.6 days) Unit #1: 8 stall events, 8 recovered (duration 11 – 35 s) Unit #2: 9 stall events, 8 recovered (duration 11 – 159 s); last event not recovered (> 8 h) Unit #3: 7 stall events, 7 recovered (duration 11 – 78 s) Unit #4: 2 stall events, 2 recovered (duration 11 – 30 s) Unit #5: 3 stall events, 3 recovered (duration 12 – 14 s) Total: 29 stall events, 28 recovered (Duration includes the 10 s detection time.) Key observation: In all 28 recovered events, the last received packet before the stall was on a secondary advertising channel. The CH_ADDR RX index was one of 0x06, 0x0A, 0x0C, 0x0E, 0x10, 0x12, 0x14, 0x16, 0x1E, 0x22, 0x26, 0x28, 0x2A, 0x30, 0x3E, 0x4A. In most cases PKT_PAYLOAD_STATUS = 0x0007, i.e. a 7-byte payload. This suggests the stall starts right after receiving an AUX packet. In the non-recovered event, the last received packet was on primary channel 37 (CH_ADDR = 0x0018, PKT_PAYLOAD_STATUS = 0x0025). 5. Register snapshot of the non-recovered event (unit #2) -SCAN_STATUS(0x01C) = 0x0900 (Scan_on = 1, no pending interrupt) -SCAN_NEXT_INSTANT(0x01E) = 0xB4B7 -REF_CLK(0x064) = 0xB4AD -CH_ADDR(0x0C4) = 0x0018 -PKT_PAYLOAD_STATUS(0x0D2) = 0x0025 -PKT_RSSI_STATUS(0x0D4) = 0x3FB3 -SCAN_SYNC_RX_PKT_CNT(0xF28) = 0x0000 SCAN_STATUS, CH_ADDR, PKT_RSSI_STATUS and SCAN_SYNC_RX_PKT_CNT stayed unchanged for more than 8 hours. The L1 report counter also stayed constant during this period. 6. Release note review The only scan-related item in SDK 2.6.212 – 2.6.916 is in 2.6.815. Link Layer fixes/changes by version: 2.6.212 (ble_controller 1.6.11.1): No changes 2.6.415 (2022-05, 1.6.14): Host fixes only 2.6.615 (2023-02, 1.6.14.1): Premature ACL termination option (Controller_SetPeripheralDiscThreshold) 2.6.715 (2023-03, 1.6.14.3): MD bit handling 2.6.815 (2023-05, 1.6.14.4): Channel map fix; “Fixed a Scan issue causing Advertising to be missed for some cases.” 2.6.915 (2023-09, 1.6.14.5): EnhancedNotification alignment fix; Autonomous Length Procedure disabled 2.6.916 (2023-10, 1.6.14.6): Return unmapped ChannelNumber in EnhancedNotification (Algo #1) 7. Questions Is this a known issue of the KW38 BLE controller? Is it related to the 2.6.815 fix “Scan issue causing Advertising to be missed”? If so, could you describe the exact condition that was fixed? Can extended scanning (following an AUX pointer to a secondary channel) put the LL scanner into a state where it no longer receives on any channel while SCAN_STATUS.Scan_on stays 1? Since the issue was reproduced with SDK 2.6.916, is there a newer controller library or patch that addresses it? What is the recommended way to detect and recover from this state at application level? For example: Is Gap_StopScanning() / Gap_StartScanning() sufficient? Is a controller reset required (e.g. HCI Reset or the LL SOFT_RESET command)? Is there any LL status register we should check? Would disabling extended scanning (legacy scanning only) avoid this issue? Is it allowed to read INIT_SCN_ADV_RX_FIFO (0x4008007C) from the application for diagnostics? Could this read affect the controller’s FIFO handling? Re: MKW38 BLE Scan not working when long time test Key observations: [modified] -In all 28 recovered events, the last received packet was on a secondary advertising channel, and in most cases PKT_PAYLOAD_STATUS = 0x0007 (7-byte payload, typical of an extended advertising PDU carrying an AuxPtr). This suggests these stalls start while the scanner follows an AUX pointer. -The non-recovered event (unit #2) has a different signature: the last received packet was on primary channel 37 with a 37-byte payload (PKT_PAYLOAD_STATUS = 0x0025), i.e. most likely a legacy advertising PDU. We found no indication of extended advertising involvement in this case. INIT_SCN_ADV_RX_FIFO read as 0 every 3 minutes during the stall, and the controller did not recover for more than 8 hours. Re: MKW38 BLE Scan not working when long time test Note: In an earlier firmware, the application periodically wrote 0xFFFF to SCAN_INTR_CLEAR (0x4008001C). In that firmware we observed a different stall where INIT_SCN_ADV_RX_FIFO still held data while SCAN_SYNC_RX_PKT_CNT was 0, and reading 0x4008007C once via J-Link immediately recovered scanning. We have since removed that write. The statistics in this report are from the current firmware, where the FIFO reads 0 during the stall and reading it does not affect recovery. Re: MKW38 BLE Scan not working when long time test Hi, @JungkyuHan1
Thanks for creating new case to us.
I will check the detailed info and updates to you ASAP.
BR,
Christine. Re: MKW38 BLE Scan not working when long time test Hi, @JungkyuHan1
Please allow me some more time to reply to you.
I need to check some points with our internal team.
BR,
Christine. Re: MKW38 BLE Scan not working when long time test Hi, @JungkyuHan1
If I am correct, I received your email that mentioned "
We have conducted the BLE Scan test With the SDK 2.6.916. It works pretty well. There was no scan error for more than 8days." in the December of 2025.
But now you meet this issue: "However, the issue was reproduced within about one week with the SDK 2.6.916 libraries."
May I ask whether have any test differences between these OK and NOK cases?
If we know the differences, it will be really helpful for us to track it further.
For your questions:
Is this a known issue of the KW38 BLE controller? Is it related to the 2.6.815 fix “Scan issue causing Advertising to be missed”? If so, could you describe the exact condition that was fixed?
==>[Christine]: As our communicated before, yes, it is a known issue. And as we know,
the 2.6..916 is the version I know so far that at least have a work around can help on scan issue. As far as I know, the scan issue is because an conflict on scan FIFO, so it needs flush the scan FIFO.
Can extended scanning (following an AUX pointer to a secondary channel) put the LL scanner into a state where it no longer receives on any channel while SCAN_STATUS.Scan_on stays 1?
Since the issue was reproduced with SDK 2.6.916, is there a newer controller library or patch that addresses it?
==>[Christine]:Sorry, no we do not have other newer SDK release which fixed this issue than SDK 2.6.916.
What is the recommended way to detect and recover from this state at application level? For example:
Is Gap_StopScanning() / Gap_StartScanning() sufficient?
Is a controller reset required (e.g. HCI Reset or the LL SOFT_RESET command)?
Is there any LL status register we should check?
==>[Christine]:
The workaround you may need manually add in applicaiton code as below
there should have an function ll_flush_adv_rx_fifo(). The code by this function does not exist in applicaiton code, so you need use "extern" declare it . After externing this function, the input parameter and return value are both void, and then call: 1. Call before stopping scan every time 2. If the device is not scanned for a long time, stop scanning and call it again, than start scaning.
Would disabling extended scanning (legacy scanning only) avoid this issue?
Is it allowed to read INIT_SCN_ADV_RX_FIFO (0x4008007C) from the application for diagnostics? Could this read affect the controller’s FIFO handling?
==>[Christine]:For these 2 questions, let me check further then reply to you.
BR,
Christine. Re: MKW38 BLE Scan not working when long time test Hi Christine, Thank you for your reply. Regarding the difference between the OK case (December 2025) and the NOK case: We found a mistake in our SDK 2.6.916 migration. We are now re-testing with the correct SDK 2.6.916 libraries. The test setups were also different: Previous test (OK): 3 units (2 sample units and 1 development unit), without antennas. Current test: 5 new mass-production units, all with antennas installed. We also have some additional questions: Is the 2.6.815 fix “Fixed a Scan issue causing Advertising to be missed for some cases” the same fix as the scan FIFO lockup workaround (ll_flush_adv_rx_fifo()) in SDK 2.6.916? After the flush, the scan is restarted with the legacy START_SCAN command (0x42). When extended scanning is enabled, does AUX (secondary channel) reception resume correctly after this restart? Is it safe to call ll_flush_adv_rx_fifo() directly from an application task while the controller ISR is running? Is there any concurrency or synchronization issue with the controller’s scan interrupt handling? In the SDK 2.6.615 controller library, what is the meaning of bit 0 of ll_self_device_data[18]? (We are considering applying the same flush manually on 2.6.615.) Best regards, Jungkyu Han Re: MKW38 BLE Scan not working when long time test Hi, @JungkyuHan1
Thanks for the info.
I am still checking with our internal team to get the answers for your questions.
Once have any updates, I will let you know.
BR,
Christine. Re: MKW38 BLE Scan not working when long time test Hi, @JungkyuHan1
Below is our internal team's reply, for your referrence.
1. Would disabling extended scanning (legacy scanning only) avoid this issue? [NXP]: The answer is no, although we not test this case, but it should no relate to extended scanning. 2.Is it allowed to read INIT_SCN_ADV_RX_FIFO (0x4008007C) from the application for diagnostics? Could this read affect the controller’s FIFO handling? [NXP]: It's better not read from applicaiton side in any time, you can stop scanning first, then read it and start scanning again
3.Is the 2.6.815 fix “Fixed a Scan issue causing Advertising to be missed for some cases” the same fix as the scan FIFO lockup workaround (ll_flush_adv_rx_fifo()) in SDK 2.6.916? [NXP]: I'm not sure for now, need some time to investigate it. 4.After the flush, the scan is restarted with the legacy START_SCAN command (0x42). When extended scanning is enabled, does AUX (secondary channel) reception resume correctly after this restart? [NXP]: Yes. But you need to follow this process, stop scanning > ll_flush_adv_rx_fifo() > start scaning again. 5.Is it safe to call ll_flush_adv_rx_fifo() directly from an application task while the controller ISR is running? [NXP]: As mentioned in above, it better call ll_flush_adv_rx_fifo() when you stop the scanning 6.Is there any concurrency or synchronization issue with the controller’s scan interrupt handling? [NXP]: what do you mean concurrency or synchronization issue ? can you clarify it? If do as mentioned above, stop scan and flush, then re-start the scan, I do not think it will causing any concurrency or synchronization issue.
7.Can extended scanning (following an AUX pointer to a secondary channel) put the LL scanner into a state where it no longer receives on any channel while SCAN_STATUS.Scan_on stays 1? [NXP]: So far, we not observe such issue.
BR,
Christine. Re: MKW38 BLE Scan not working when long time test Hi, @JungkyuHan1
3.Is the 2.6.815 fix “Fixed a Scan issue causing Advertising to be missed for some cases” the same fix as the scan FIFO lockup workaround (ll_flush_adv_rx_fifo()) in SDK 2.6.916? [NXP]: Not same, but have correlation, the fix in 2.6.815 not enough for scan FIFO lockup workaround, so that fix no completely fix the scan fifo issue, so better add that workaround.
Please let me know if still have any other concerns in this thread.
BR,
Christine.
View full article