[WIFI] using wifi in dual mode ( ap mode and station mode)

Hello everyone,
Is it possible to configure Dragon board running in both station and ap mode? because my application required scanning available network in ap mode.
I have tried to switch between these two modes but I had to add 6 seconds delay before switching to the other mode otherwise, the board got hang immediately. Is there any way to decrease the delay time ?

here is how I configured wifi connection
create 2 connections using nmtui named wifi-ap and wifi-station

to connect to a connection I used the following commands

nmcli con up wifi-ap
nmcli con up wifi-station