diff --git a/SBC/rpi-4/device_driver/firmware/radioberry.c b/SBC/rpi-4/device_driver/firmware/radioberry.c index c73bb5a..8ade806 100644 --- a/SBC/rpi-4/device_driver/firmware/radioberry.c +++ b/SBC/rpi-4/device_driver/firmware/radioberry.c @@ -78,7 +78,7 @@ int initRadioberry() { sem_init(&spi_msg, 0, 0); sem_init(&i2c_meas, 0, 0); - gettimeofday(&t20, 0); + gettimeofday(&t20, 0); memset(commands,0,256); // initialise the commands. @@ -87,13 +87,23 @@ int initRadioberry() { exit(-1); } - rb_info.command_data = 0x0; + int init = 0; + do { - //required to retrieve gateware information. - if (ioctl(fd_rb, RADIOBERRY_IOC_COMMAND, &rb_info) == -1) { - fprintf(stderr, "RADIOBERRY_IOC_COMMAND Error."); - exit(-1); - } + rb_info.command_data = 0x0; + + //required to retrieve gateware information. + if (ioctl(fd_rb, RADIOBERRY_IOC_COMMAND, &rb_info) == -1) { + fprintf(stderr, "RADIOBERRY_IOC_COMMAND Error."); + exit(-1); + } + + if (rb_info.major == 0) sleep(1); + + init++; + + } while (rb_info.major == 0 && init < 10); + gateware_major_version = rb_info.major; gateware_minor_version = rb_info.minor; @@ -458,6 +468,8 @@ void send_control(unsigned char command) { fprintf(stderr, "Could not sent commando to radioberry device."); } + //fprintf(stderr, "RB Gateware control = %02X \n", rb_info.rb_command); + rb_control = rb_info.rb_command; } diff --git a/SBC/rpi-4/device_driver/firmware/radioberry.h b/SBC/rpi-4/device_driver/firmware/radioberry.h index d119167..ca41d47 100644 --- a/SBC/rpi-4/device_driver/firmware/radioberry.h +++ b/SBC/rpi-4/device_driver/firmware/radioberry.h @@ -26,7 +26,7 @@ #include -#define FIRMWAREVERSION "2021.09.26" +#define FIRMWAREVERSION "2022.01.24" #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) diff --git a/SBC/rpi-4/releases/dev/CL016/radioberry.rbf b/SBC/rpi-4/releases/dev/CL016/radioberry.rbf index 8b199d2..ce02c8a 100644 Binary files a/SBC/rpi-4/releases/dev/CL016/radioberry.rbf and b/SBC/rpi-4/releases/dev/CL016/radioberry.rbf differ diff --git a/SBC/rpi-4/releases/dev/CL025/radioberry.rbf b/SBC/rpi-4/releases/dev/CL025/radioberry.rbf index ae7ca25..19308f0 100644 Binary files a/SBC/rpi-4/releases/dev/CL025/radioberry.rbf and b/SBC/rpi-4/releases/dev/CL025/radioberry.rbf differ