# Crash on connecting to Access Point

**URL:** <https://forum.amebaiot.com/t/crash-on-connecting-to-access-point/2285>\
**Category:** WiFi\
**Tags:** evb-bw16, rtl872xd\
**Created:** [October 3, 2023, 1:25pm UTC](https://forum.amebaiot.com/t/crash-on-connecting-to-access-point/2285 "2023-10-03T13:25:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jrr](https://forum.amebaiot.com/u/jrr)\
**Post date:** [October 3, 2023, 1:25pm UTC](https://forum.amebaiot.com/t/crash-on-connecting-to-access-point/2285/1 "2023-10-03T13:25:49Z")

</div>

Quite often, when I try to connect to my 5GHz WiFi network I’m getting a hard fault (security fault) as shown below.  
Please note that it does happen on some devices equipped with BW16 module) more often where others seems to work more stable (the probability of getting such fault is much lower).  
Here’s an example of logs, showing the AP connection process. I get similar logs/errors quite often when trying to establish socket connection/trasmitting the data.  
The SDK I use for the devices was taken from main Ameba SDK repository, branch: master.

**The AT command I send:**  
ATPN=“JRRSoftware”,“12345678”

**The logs I get:**

RTL8721D[Driver]: set ssid [JRRSoftware]  
RTL8721D[Driver]: rtw\_set\_wpa\_ie[1160]: AuthKeyMgmt = 0x2  
RTL8721D[Driver]: rtw\_restruct\_sec\_ie[4202]: no pmksa cached

Security Fault:  
Secure State: 1

Stacked:  
R0 = 0x1007d70d  
R1 = 0x00000000  
R2 = 0x180a2206  
R3 = 0xdeadbeef  
R12 = 0xdeadbeef  
LR = 0xdeadbeef  
PC = 0xdeadbeef  
PSR = 0xdeadbeef

Current:  
EXC\_RETURN = 0xffffffb9  
MSP = 0x1007fff4  
PSP = 0x100047fc  
xPSR = 0xa0000007  
CFSR = 0x00000400  
HFSR = 0x00000000  
DFSR = 0x00000000  
MMFAR = 0x00000000  
BFAR = 0x00000000  
AFSR = 0x00000000  
PriMask = 0x00000000  
SVC priority: 0x00  
PendSVC priority: 0x00  
Systick priority: 0x00  
MSP\_NS = 0x10004fd8  
PSP\_NS = 0x10055040  
CFSR\_NS = 0x00000400  
HFSR\_NS = 0x00000000  
DFSR\_NS = 0x00000000  
MMFAR\_NS = 0x00000000  
BFAR\_NS = 0x00000000  
AFSR\_NS = 0x00000000  
SVC priority NS: 0x00  
PendSVC priority NS: 0xe0  
Systick priority NS: 0xe0

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [August 13, 2024, 3:12am UTC](https://forum.amebaiot.com/t/crash-on-connecting-to-access-point/2285/2 "2024-08-13T03:12:00Z")

</div>

Please refer to the new Github repo

> **[GitHub - Ameba-AIoT/ameba-rtos-d: AmebaD SoC SDK](https://github.com/Ameba-AIoT/ameba-rtos-d)**
>
> AmebaD SoC SDK
