yabo国际娱乐对话框半导体客户支持-放大器 https://support.dialog-semiconductor.com/resource-keywords/lna en DA14585 Configuring BLE_DIAGCNTL_REG to output extrc_rxen to gpio https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/da14585-configuring-blediagcntlreg

I've looked at the range extender 2 driver code, which uses the SKY6111 as an external PA and wish to do the following:
- Output the extrc_txen BLE diagnostic signal to P1_0.
- Output the extrc_rxen BLE diagnostic signal to P1_1.

The reason why the range extender code is not satisfactory to me is because it is hardcoded to use P0_1 and P0_2 and in order to implement the extrc_rxen signal, it inverts the extrc_txen signal. This is the code I'm running in periph_init() (runs everytime the radio wakes up).

Please verify that what I'm doing is indeed extracting the extrc_rxen signal. Furthermore is there any documentation on how to configure the BLE_DIAGCNTL_REG register and how it is routed to the ports. So far I've had my theories, which I think are correct, but it would be really helpful if there was a document.


/* Select diag signals */
SetBits32(BLE_DIAGCNTL_REG, DIAG0, 0x28); // extrc_txen
SetBits32(BLE_DIAGCNTL_REG, DIAG1, 0x28); // rxen=extrc_txen_inv


/* Map to diag port bits */
SetBits32(BLE_DIAGCNTL3_REG, DIAG0_BIT, 3); // extrc_txen
SetBits32(BLE_DIAGCNTL3_REG, DIAG1_BIT, 2); // << GUESSED THIS VALUE


/* Enable diag ports */
SetBits32(BLE_DIAGCNTL_REG, DIAG0_EN, 1);
SetBits32(BLE_DIAGCNTL_REG, DIAG1_EN, 1);


/* Output diag signals to P0 GPIOs */
SetBits16(P10_MODE_REG, PID , 18);
SetBits16(P10_MODE_REG, PUPD, 3);


SetBits16(P11_MODE_REG, PID , 18);
SetBits16(P11_MODE_REG, PUPD, 3);

Device: 
Tue, 14 Aug 2018 22:48:54 +0000 robwasab 218973 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/da14585-configuring-blediagcntlreg#comments