MD3x0 bugfixes: fixed wrong ADC conversion sequence preventing squelch opening and corrected control of W/N switch in radio driver

replace/91c56e5c2cc433560ca1d4cbd1b36eaa1f595331
Silvano Seva 2021-04-09 12:54:53 +02:00
rodzic 9fb7ace303
commit 0ca7258f03
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -81,9 +81,9 @@ void adc1_init()
#if defined(PLATFORM_MD3x0)
ADC1->SQR1 = 3 << 20; /* Four channels to be converted */
ADC1->SQR3 |= (1 << 0) /* CH1, battery voltage on PA1 */
| (8 << 5) /* CH8, RSSI value on PB0 */
| (3 << 10) /* CH3, vox level on PA3 */
| (0 << 15); /* CH0, volume potentiometer level on PA0 */
| (0 << 5) /* CH0, volume potentiometer level on PA0 */
| (8 << 10) /* CH8, RSSI value on PB0 */
| (3 << 15); /* CH3, vox level on PA3 */
#else
ADC1->SQR1 = 1 << 20; /* Convert two channel */
ADC1->SQR3 |= (1 << 0) /* CH1, battery voltage on PA1 */

Wyświetl plik

@ -73,7 +73,7 @@ void radio_init()
gpio_clearPin(PLL_PWR); /* PLL off */
gpio_setPin(VCOVCC_SW); /* VCOVCC high enables RX VCO, TX VCO if low */
gpio_clearPin(WN_SW); /* 25kHz bandwidth */
gpio_setPin(WN_SW); /* 25kHz bandwidth */
gpio_clearPin(DMR_SW); /* Disconnect HR_C5000 input IF signal and audio out */
gpio_clearPin(FM_SW); /* Disconnect analog FM audio path */
gpio_clearPin(RF_APC_SW); /* Disable RF power control */
@ -130,17 +130,17 @@ void radio_setBandwidth(const enum bandwidth bw)
switch(bw)
{
case BW_12_5:
gpio_setPin(WN_SW);
gpio_clearPin(WN_SW);
C5000_setModFactor(0x1E);
break;
case BW_20:
gpio_clearPin(WN_SW);
gpio_setPin(WN_SW);
C5000_setModFactor(0x30);
break;
case BW_25:
gpio_clearPin(WN_SW);
gpio_setPin(WN_SW);
C5000_setModFactor(0x3C);
break;