DSPS + Coexistence.(DA14580)

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
dizyis
Offline
Last seen:4 months 2 weeks ago
加入:2017-11-22 06:30
DSPS + Coexistence.(DA14580)

I am going to test DSPS + Coexistence.
So I have applied E.6 in document UM-B-051 to the code as shown below.

and I started with a WLAN_COEX_PIN low state. and connect OK, Data R/W OK.

After that, I changed WLAN_COEX_PIN to High. As a result, Data R / W function did not work as expected.

I changed WLAN_COEX_PIN to High.
As a result, Data R / W function did not work as expected.
And I changed WLAN_COEX_PIN back to Low.
But after a while, the DSPS app got disconnected.

Why is not communication resuming again?

da1458x_config_basic.h
-------------------------------------------------- ---------------------------------------
#define WLAN_COEX_ENABLED 1
#define WLAN_COEX_BLE_EVENT 7
#define WLAN_COEX_PORT GPIO_PORT_2
#define WLAN_COEX_PIN GPIO_PIN_4
#define WLAN_COEX_IRQ 1
#define WLAN_COEX_PRIO_PORT GPIO_PORT_2
#define WLAN_COEX_PRIO_PIN GPIO_PIN_2
#define WLAN_COEX_DEBUG 0
user_periph_setup.c
-------------------------------------------------- ----------------------------
void GPIO_reservations (void)
{
...
...
wlan_coex_reservations ();
}
void set_pad_functions (void)
{
...
...
wlan_coex_init ();
}

----------------------------------------------------------------------------------------------

I've found a problem. Interrupt at WLAN_COEX_PIN occurs as Level Detect. So it works abnormally.

How I change this?

Device:
MT_dialog
Offline
Last seen:1 month 4 weeks ago
工作人员
加入:2015-06-08 11:34
Hi dizyis,

Hi dizyis,

There are a couple of issues with the coex scheme as is, so you will have to make some changes to the existing code in order to operate properly:

In the wlan_coex_eip_1_handler() you should clear any previous interrupt that have occured while executing the ISR you what you will have to do is attach the below lines in the wlan_coex_eip_1_handler().

  • GPIO_ResetIRQ((GPIO0_IRQn + WLAN_COEX_IRQ));
  • NVIC_ClearPendingIRQ(irq);

Thanks MT_dialog

dizyis
Offline
Last seen:4 months 2 weeks ago
加入:2017-11-22 06:30
I applied this code. But

I applied this code. But there is no change.

Even though NVIC_DisableIRQ (irq) has been applied in wlan_coex_eip_1_handler(), wlan_coex_eip_1_handler() will continue to be called. ( if pin status is high. )

IM_Dialog
Offline
Last seen:1 month 1 day ago
加入:2016-12-06 22:25
Hi dizyis,

Hi dizyis,

A few more things to note:

1. The value you use for WLAN_COEX_IRQ should match the port number you are using for WLAN_COEX_PORT, for example if you are using P2_0 for the WLAN_COEX_PORT/PIN then WLAN_COEX_IRQ should be 2:

#define WLAN_COEX_PORTGPIO_PORT_2
#define WLAN_COEX_PINGPIO_PIN_0
#define WLAN_COEX_IRQ2
2. When theWLAN_COEX_PORT/PIN is initialized in the wlan_coex_enable function the pull up is not enabled - this means the pin should be driven high or low and not left floating, otherwise you might have random interrupts occuring. You could also enable the pullup on this GPIO by modifying the wlan_coex_enable function as follows:
GPIO_ConfigurePin( (GPIO_PORT)WLAN_COEX_PORT, (GPIO_PIN)WLAN_COEX_PIN, INPUT_PULLUP, PID_GPIO, false );
//GPIO_ConfigurePin( (GPIO_PORT)WLAN_COEX_PORT, (GPIO_PIN)WLAN_COEX_PIN, INPUT, PID_GPIO, false );

3. The wlan_coex_init function should be called from the app_on_init user callback function.

Best regards

IM_Dialog