分类 默认分类 下的文章

change SI4735 libraries on aresq aq1 si4732 sdr radio fix the SPEAKER no sound bug

1.jpg
First change C:UsersAdministratorDocumentsArduinolibrariesSI4735-masterSI4735.h

/**
 * @ingroup group18 MCU External Audio Mute 
 * 
 * @brief Sets the Hardware Audio Mute
 * @details Turns the Hardware audio mute on or off
 * 
 * @see setAudioMuteMcuPin
 * 
 * @param on  True or false
 */
inline void setHardwareAudioMute(bool on)
{
    if(on){
    digitalWrite(audioMuteMcuPin, LOW);//Reverse the 27 MUTE pin connect PAM8406
    }else{
    digitalWrite(audioMuteMcuPin, HIGH);//Reverse the 27 MUTE pin connect PAM8406
    }
    delayMicroseconds(300);
}

then change SI4735_2.8_TFT_SI5351_V4.0_AQ1's code you like the SPEAKER work now
https://www.mmdvm.club/index.php/aq1.html

to support v1.5.x switch to hackrf usb mode no black screen

/home/jumbo/hackrf/firmware/common/ui_portapack.c

const hackrf_ui_t* portapack_hackrf_ui_init() {

if( portapack() ) {  //switch to hackrf_usb mode, if portapack install set lcd blue screen
    return &portapack_hackrf_ui;
} else {
    return NULL;
}

}
/home/jumbo/hackrf/firmware/common/portapack.c
static uint32_t jtag_pp_idcode(void) {

cpld_jtag_take(&jtag_cpld);

/* TODO: Check if PortaPack TMS is floating or driven by an external device. */
gpio_output(jtag_cpld.gpio->gpio_pp_tms);

/* Test-Logic/Reset -> Run-Test/Idle -> Select-DR/Scan -> Capture-DR */
jtag_pp_shift(0b11111010, 8);

/* Shift-DR */
const uint32_t idcode = jtag_pp_shift(0, 32);

/* Exit1-DR -> Update-DR -> Run-Test/Idle -> ... -> Test-Logic/Reset */
jtag_pp_shift(0b11011111, 8);

cpld_jtag_release(&jtag_cpld);

return idcode;

}
static bool portapack_detect(void) {

return jtag_pp_idcode() == 0x020A50DD;   

//i change this code to "return jtag_pp_idcode() >0;" to support
//Portapack H2 TQFP100 v3.6pcb fix fw v1.4.2
}

static const portapack_t portapack_instance = {
};

static const portapack_t* portapack_pointer = NULL;

const portapack_t* portapack(void) {

return portapack_pointer;

}

void portapack_init(void) {

if( portapack_detect() ) {
    portapack_if_init();
    portapack_lcd_reset();
    portapack_lcd_init();
    portapack_pointer = &portapack_instance;
} else {
    portapack_pointer = NULL;
}

}

hackrf portapack h2 cpld update new QFP100

pcbV3.5.jpg

Because it is not easy to buy 5m40ze64c5n
so i replace new EPM240T100C5N instead it is QFP100 bigger then QFP64
but it works
every cpld flashed fw,if manyhem boot faile just dont shutdown the base,add A,B to let new
CPLD work
portapack.cpp

i2c0.start(i2c_config_boot_clock);

if( !portapack::cpld::update_if_necessary(portapack_cpld_config()) ) {

    A//shutdown_base();
    B//return false;

}