mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-08 23:22:46 -04:00
CPLD: Use correct bitstream for updating hardware.
Determine hardware version and use one of two CPLD bitstream files.
This commit is contained in:
parent
73d62367d1
commit
797e63a590
10 changed files with 15722 additions and 4037 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "portapack.hpp"
|
||||
#include "portapack_hal.hpp"
|
||||
#include "portapack_dma.hpp"
|
||||
#include "portapack_cpld_data.hpp"
|
||||
#include "portapack_persistent_memory.hpp"
|
||||
|
||||
#include "hackrf_hal.hpp"
|
||||
|
@ -174,8 +175,14 @@ void init() {
|
|||
clock_manager.set_reference_ppb(persistent_memory::correction_ppb());
|
||||
clock_manager.run_at_full_speed();
|
||||
|
||||
if( !cpld_update_if_necessary() ) {
|
||||
chSysHalt();
|
||||
if( portapack_model() == PortaPackModel::R2_20170522 ) {
|
||||
if( !cpld_update_if_necessary(portapack::cpld::rev_20170522::block_0, portapack::cpld::rev_20170522::block_1) ) {
|
||||
chSysHalt();
|
||||
}
|
||||
} else {
|
||||
if( !cpld_update_if_necessary(portapack::cpld::rev_20150901::block_0, portapack::cpld::rev_20150901::block_1) ) {
|
||||
chSysHalt();
|
||||
}
|
||||
}
|
||||
|
||||
if( !cpld_hackrf_load_sram() ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue