Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make FPGA Autoloading fault tolerant #367

Closed
victoredwardocallaghan opened this issue Jan 25, 2015 · 3 comments
Closed

Make FPGA Autoloading fault tolerant #367

victoredwardocallaghan opened this issue Jan 25, 2015 · 3 comments
Labels
Resolve: Invalid Reported issue is not valid

Comments

@victoredwardocallaghan
Copy link

In https://github.com/Nuand/bladeRF/wiki/FPGA-Autoloading there are some scary "Important" remarks.

These make me a little nervous that one day I will forget to check the LED's have come on before plugging in the USB. Why can't the board send a 'ready' status on the USB interface? If the board isn't 'ready' yet and a bladerf_open() call has been made, bladerf_open() will block until the average time needed for a load to occur timeouts then returns with BLADERF_ERR_TIMEDOUT /* Board found but did not become ready in time */

I presume there is a bit set on the board that tells the board if it should read the SPI flash or not. This same bit could be used to auto adjust the 'ready' status. If no SPI read is needed then a 'ready' is issued, if a SPI read is needed then a 'ready' is issued at the end of the read.

P.S. I have not checked all the code on the board side to see exactly the implementation.
Kind Regards,
Edward.

@jynik
Copy link
Contributor

jynik commented Jan 25, 2015

Why can't the board send a 'ready' status on the USB interface?

As of FX3 firmware v1.8.0 with libbladeRF v1.0.0, this is now done in the bladerf_open() call, and almost exactly as you suggested.

I'll update the wiki to note this.

@jynik jynik closed this as completed Jan 25, 2015
@victoredwardocallaghan
Copy link
Author

Wonderful !

@jynik
Copy link
Contributor

jynik commented Jan 25, 2015

Forgot to note -- if you run with the log level "verbosity" you should see something printed along the lines of "waiting for device to become ready" while the bladerf_open() call is blocked waiting for autoload to complete. There's a limit to the number of retries which is based upon our existing knowledge of how long the FPGA /should/ take to load (and then some for good measure).

@jynik jynik added the Resolve: Invalid Reported issue is not valid label Jan 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolve: Invalid Reported issue is not valid
Projects
None yet
Development

No branches or pull requests

2 participants