Commit graph

143 commits

Author SHA1 Message Date
Ryan Thompson
e8ec849ee7 nios: fix missing break for BLADE_USB_CMD_QUERY_FPGA_SOURCE 2025-04-09 23:17:40 -07:00
Ryan Thompson
bc6ac13970 doc: updated fx3 firmware folder name 2025-04-09 23:17:40 -07:00
Ryan Thompson
bdd4f39a3d fx3_firmware: rev libbladeRF, hdl, and fx3 for 2048 sample gpif buffers
FX3 GPIF buffers set to 2048 samples and number of buffers reduced to
11 per dma channel. This substantially increases the theoretical USB
SuperSpeed throughput from roughly 228MB/s to 356MB/s.

$ make test_libbladeRF
[       OK ] libbladeRF.scheduled_retune (19755 ms)
[----------] 29 tests from libbladeRF (308802 ms total)

[----------] Global test environment tear-down
[==========] 29 tests from 1 test suite ran. (308802 ms total)
[  PASSED  ] 29 tests.
2025-04-09 23:17:40 -07:00
Ryan Thompson
05ede8f541 fx3_firmware: increase DMA buffer sizes for USB throughput bottleneck
$ make test_hdl
[----------] Global test environment tear-down
[==========] 63 tests from 2 test suites ran. (381209 ms total)
[  PASSED  ] 63 tests.
[100%] Built target test_hdl
2025-04-09 23:17:40 -07:00
Ryan Thompson
f046180604 host: CMake minimum version bump to 3.5
Accommodates the following warning issued by CMake v3.27.1.

CMake Deprecation Warning:
  Compatibility with CMake < 3.5 will be removed from a 
  future version of CMake.
2023-10-31 10:28:21 -05:00
Ryan Thompson
15b7d9c3b6 host: squashed cmake warnings
updated cmake requirement from 2.8 to 2.8.12
2023-02-13 03:28:19 -08:00
Ryan Thompson
2108411259 Corrected arm-none-eabi compiler location to comply with Cypress SDK folder structure 2022-04-21 14:32:42 -05:00
Robert Ghilduta
ec281ec372 fx3_firmware: bump version to v2.4.0 2020-11-23 19:27:49 -08:00
Robert Ghilduta
9b74173d7a fx3_firmware: add short packet state
This allows the FPGA to end a GPIF packet in fewer bytes than the size of the
buffer. In effect allowing for variable length packets.
2020-11-23 19:27:49 -08:00
Robert Ghilduta
a8c1d23df0 fx3_firmware: firmware version 2.3.2 2018-12-26 00:19:21 -08:00
Robert Ghilduta
466aa7ba79 fx3_firmware: speed up flash operations
Remove the sleep operation after each flash command and increase the SPI clock
rate on the micro.
2018-12-26 00:19:20 -08:00
Robert Ghilduta
99087acb6e firmware_common: add shared flash routines 2018-12-21 01:28:17 -08:00
Robert Ghilduta
d0f84f3fc5 flash: remove duplicate shared flash functionality 2018-12-21 01:28:17 -08:00
Rey Tucker
ecf2f711dd fx3: update changelog for v2.3.1
Also add entry for v2.3.0
2018-09-26 15:17:45 -04:00
Rey Tucker
18ea3633e8 fx3: add BLADE_USB_CMD_QUERY_FPGA_SOURCE command
Adds a BLADE_USB_CMD_QUERY_FPGA_SOURCE command, which is used
to query the source of the currently-running FPGA program, if
known.

Increment version number to 2.3.1.
2018-09-26 14:50:23 -04:00
Rey Tucker
51bc249055 fx3: don't stop flash->fpga autoload on USB reset
When libbladeRF is built with ENABLE_USB_DEV_RESET_ON_OPEN, a
USB port reset is performed on open, to work around some xHCI
controller bugs.

This hits the CyFxbladeRFApplnUSBEventCB() callback with an
event type of CY_U3P_USB_EVENT_RESET, which is then dispatched
to StopApplication(), which calls NuandRFLink.stop() or
NuandFpgaConfig.stop() or does nothing, depending on what the
glAppMode is.

Unfortunately, if the FX3 is loading an FPGA bitstream from the
SPI flash to the FPGA, NuandFpgaConfig.stop() also stops that
dead, and bladeRFAppThread_Entry() progresses forward and we end
up with an unconfigured FPGA. In that case, libbladeRF will then
go through the FPGA autoloading process.

This is essentially a race condition: which FPGA image is loaded,
if any, depends on the time between plugging in the bladeRF and
opening it. Kinda gross.

A reasonable workaround for this is implemented thus: if there's
a valid autoload image (glAutoLoadValid is true) and we haven't
yet made it through bladeRFAppThread_Entry() (glDeviceReady is
false), and we're in glAppMode == MODE_FPGA_CONFIG, then take no
action in StopApplication().

This seems to work OK with some limited power-cycle testing on
both an x40 and an xA4.
2018-09-26 12:44:49 -04:00
Brian Glod
882a4853df fx3_firmware: v2.3.0 - Add flash ID command
Allows the SPI flash manufacturer ID and device ID to be reported to the
host. Useful for determining the architecture (density, page size, etc.)
of the flash chip used on the board.
2018-09-14 12:33:30 -04:00
Brian Glod
07dcefc926
fx3_firmware: Update README.md
Remove references to bladeRF{1,2} now that we have a unified firmware for both platforms.
2018-08-29 15:58:13 -04:00
Robert Ghilduta
9d999ae2cf fx3_firmware: bump version to 2.2.0
Version 2.2.0 includes reunification of the FX3 builds and OTP support for
Winbond chips.
2018-06-19 00:38:37 -04:00
Robert Ghilduta
bbebcd110c fx3_firmware: change when NuandFpgaConfigSwInit() is called
NuandFpgaConfigSwInit() is now delayed because it now requires the SPI
manufacturer to be known.
2018-06-19 00:38:37 -04:00
Robert Ghilduta
d6a9911fce fx3_firmware: add manufacturer specific calls
Add support for reading OTP security registers from Winbond chips.
2018-06-19 00:38:37 -04:00
Robert Ghilduta
9dd948609f fx3_firmware: add isOtp to SPI transfer function
Winbond flash chips have a specific SPI command for reading the security
registers.
2018-06-19 00:38:37 -04:00
Robert Ghilduta
1b974a3f9c fx3_firmware: unify bladeRF builds
Differentiate different bladeRF products based on the SPI chip manufacturer.
2018-06-19 00:38:37 -04:00
Robert Ghilduta
9d24fe7ebe fx3_firmware: use SPI Manufacturer to tell boards apart 2018-06-18 20:38:20 -04:00
Rey Tucker
d6f0624437 fx3: update CHANGELOG for v2.1.1 2018-05-22 13:00:21 -04:00
Rey Tucker
fe730209dd fx3: fix spurious 0x40 error when ending loopback (#41)
When ending a loopback test (e.g. with
libbladeRF_test_digital_loopback), a spurious 0x40 error occurred from
trying to clear the glChHandlePtoU DMA channel, which does not get set
up if loopback is enabled.
2018-05-22 13:00:21 -04:00
Rey Tucker
4d8a128758 fx3: version 2.1.1
This version corrects an issue with loading FPGA bitstreams from flash
in a headless configuration (with nothing connected to the USB
connector).
2018-04-06 15:27:07 -04:00
Rey Tucker
b144033168 fx3: skip EP Config during FPGA config if no USB
If the USB interface is not connected, CyU3PUsbGetSpeed() returns
CY_U3P_NOT_CONNECTED.  Previously we treated this as an error, which
caused failures when loading an FPGA bitstream from flash in a headless
configuration.

We now assume a reasonable DMA size and skip the USB configuration
altogether if there is no USB connection.
2018-04-06 15:27:07 -04:00
Rey Tucker
d4d799bf0c fx3_firmware v2.1.0: add bladeRF 2.0 support
Squashed commit of the following:

    fx3_firmware: update CHANGELOG for 2.1.0
    libbladeRF: add fw 2.1.0 to compatibility tables
    fx3: version number bump 2.0.0 -> 2.1.0
    fx3: clean up CMakeLists.txt, add config switches
    fx3: copyright date bump
    fx3: move USB descriptors to own linker section
    fx3: move descriptor consts to board-specific files
    fx3: add support for bladeRF 2.0
2017-12-21 12:55:05 -05:00
Rey Tucker
20cfbb88ce fx3: fix cmake invocation in README.md
The cmake invocation was incorrect and pointed at a non-existant
filename.

Initial report: https://nuand.com/forums/viewtopic.php?f=4&t=3977
2017-11-06 10:36:57 -05:00
Jon Szymaniak
f3fcef7672 fx3_firmware: Added missing dependency to .elf->.img target 2016-04-07 18:39:05 -04:00
Jon Szymaniak
eed888c223 fx3_firmware: Version incremented to v2.0.0
Major version bump due to use of newly assigned VID/PID.
2016-04-06 17:36:01 -04:00
Jon Szymaniak
0e4b18e70e fx3_firmware: Updated bladeRF VID:PID to 2cf0:5246 2016-04-06 17:36:01 -04:00
Jon Szymaniak
4d38c589b3 fx3_firmware: Fixed duplicate inclusion guard 2016-04-06 17:36:01 -04:00
Jon Szymaniak
d622e6580a fx3_firmware: Updated version to v1.9.1
Patch version incremented for build system changes.
2016-04-06 16:06:06 -04:00
Jon Szymaniak
ea15c91c25 fx3_firmware: Use CMake for project configuration and Makefile generation
The combination of CMake and a custom Makefile/toolchain.mk was messy.

This change is to achieve better consistency with the CMake-oriented
workflow of the remainder of the project software and to make it easier
to maintain and change in the future. (CMake options may be used to
enable/disable features.)
2016-04-06 16:06:06 -04:00
Jon Szymaniak
822ff461b8 fx3_firmware: Corrected README regarding FX3 SDK v1.3.3 requirement 2016-03-22 21:48:01 -04:00
Jon Szymaniak
347574a757 fx3_firmware; Retroactive CHANGELOG update (v1.9.0) 2015-12-28 23:37:01 -05:00
Jon Szymaniak
23988ed7fd fx3_firmware: Version updated to v1.9.0
Minor version number increment to denote added functionality
to host<->FW interface.
2015-12-28 16:10:39 -05:00
Jon Szymaniak
ff6f2b1cf1 firmware_common: Added command ID for reading FW log entries 2015-12-28 16:10:39 -05:00
Jon Szymaniak
d2ff39f207 fx3_firmware: Adding simple logging mechanism
A simple event logger has been added to the firmware to replace
the use of CyU3PDebugPrint() calls. This is intended to provide access
to errors and diagnostic information without requiring JTAG access.
2015-12-28 16:10:39 -05:00
Jon Szymaniak
6be819225e fx3_firmware: Updated version to 1.8.1 2015-09-08 11:33:34 -04:00
Jon Szymaniak
aa2472a59f fx3_firmware: Addressed build warnings 2015-09-08 11:32:06 -04:00
Jon Szymaniak
c74d172351 fx3_firmware: Updated toolchain.mk.sample for FX3 SDK v1.3.3 2015-09-08 11:31:58 -04:00
Jon Szymaniak
c05bc6e612 fx3_firmware: Updated README
Added note about FX3 SDK 1.3.3 not yet being tested yet.
Review of the 1.3.3 release notes indicates that some source-level and build-script changes may be needed.
2015-01-26 13:18:19 -05:00
Jon Szymaniak
239b1cf45d fx3_firmware: Added sample .gdbinit file
Defaults for bladeRF FX3 debugging with the Segger J-Link
2014-11-08 15:15:06 -05:00
Jon Szymaniak
0b466c6aed fx3_firmware: Version bump to v1.8.0
Minor rev incremented to denote added to "public" interface.
2014-11-06 15:28:53 -05:00
Jon Szymaniak
79aaf43a2a fx3_firmware: Added "device ready" query
This "device ready" status is used to denote that the device is
ready to be configured and used. Until the device becomes "ready"
all control requests will return an error.

This provides libbladeRF with a means to query when the device is done
loading an FPGA from flash, as well as any other firmware-based
initializations that may be needed in the future.
2014-11-06 15:25:48 -05:00
Jon Szymaniak
5f4f242132 fx3_firmware: Cleaned up bladeRFAppThread_Entry
The loop in this function was rather strange, and theoretically
could roll over and reload the FPGA (albeit for an extreme uptime).
2014-11-06 14:37:00 -05:00
Jon Szymaniak
ca697ee6df fx3_firmware: Bumped patch revision (v1.7.1) 2014-07-19 13:31:53 -04:00