andrzej-kaczmarek commented on a change in pull request #576: [MYNEWT-783] 
nimble/phy: Fix T_IFS on coded phy
URL: https://github.com/apache/mynewt-core/pull/576#discussion_r141313849
 
 

 ##########
 File path: hw/drivers/nimble/nrf52/src/ble_phy.c
 ##########
 @@ -1009,6 +1010,59 @@ ble_phy_isr(void)
     STATS_INC(ble_phy_stats, phy_isrs);
 }
 
+#if MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN) >= 0 || \
+        MYNEWT_VAL(BLE_PHY_DBG_TIME_ADDRESS_END_PIN) >= 0 || \
+        MYNEWT_VAL(BLE_PHY_DBG_TIME_WFR_PIN) >= 0
+static inline void
+ble_phy_dbg_time_setup_gpiote(int index, int pin)
+{
+    hal_gpio_init_out(pin, 0);
+
+    NRF_GPIOTE->CONFIG[index] =
+                        (GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) |
+                        ((pin & 0x1F) << GPIOTE_CONFIG_PSEL_Pos) |
+                        ((pin > 31) << GPIOTE_CONFIG_PORT_Pos);
+}
+#endif
+
+static void
+ble_phy_dbg_time_setup(void)
+{
+#if MYNEWT_VAL(BLE_PHY_DBG_TIME_TXRXEN_READY_PIN) >= 0
+    ble_phy_dbg_time_setup_gpiote(0,
 
 Review comment:
   I agree, but the problem here is that while hal_gpio_irq_init() can solve 
GPIOTE allocation problem, I can't get config index to setup PPI. so as an 
intermediate solution I'll just use last 3 configs (instead of first 3) so it 
will be easier to avoid collision. and will add an appropriate note.
   
   later we can consider addin some private gpio api to resolve this in a 
proper way.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to