Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion firmware/common/LPC4320_M4_memory.ld
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ MEMORY
{
/* rom is really the shadow region that points to SPI flash or elsewhere */
rom (rx) : ORIGIN = 0x00000000, LENGTH = 1M
ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 96K
ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
ram_usb (rw) : ORIGIN = 0x10010000, LENGTH = 32K
ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 32K
ram_sleep (rwx) : ORIGIN = 0x10088000, LENGTH = 8K
}
Expand Down
3 changes: 2 additions & 1 deletion firmware/common/LPC4330_M4_memory.ld
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ MEMORY
{
/* rom is really the shadow region that points to SPI flash or elsewhere */
rom (rx) : ORIGIN = 0x00000000, LENGTH = 128K
ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 128K
ram_local1 (rwx) : ORIGIN = 0x10000000, LENGTH = 96K
ram_usb(rw) : ORIGIN = 0x10018000, LENGTH = 32K
ram_local2 (rwx) : ORIGIN = 0x10080000, LENGTH = 64K
ram_sleep (rwx) : ORIGIN = 0x10090000, LENGTH = 8K
}
Expand Down
7 changes: 4 additions & 3 deletions firmware/common/LPC43xx_M4_memory.ld
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ MEMORY
rom_flash (rx) : ORIGIN = 0x80000000, LENGTH = 1M
ram_m0 (rwx) : ORIGIN = 0x20000000, LENGTH = 28K
ram_shared (rwx) : ORIGIN = 0x20007000, LENGTH = 4K
ram_usb (rwx) : ORIGIN = 0x20008000, LENGTH = 32K
/* ram_usb: USB buffer. Straddles two blocks of RAM
* to get performance benefit of having two USB buffers addressable
ram_samp (rwx) : ORIGIN = 0x20008000, LENGTH = 32K
/* ram_samp: Sample buffer. Straddles two blocks of RAM to get
* performance benefit of having two halves addressable
* simultaneously (on two different buses of the AHB multilayer matrix)
*/
}

usb_samp_buffer = ORIGIN(ram_samp);
usb_bulk_buffer = ORIGIN(ram_usb);
m0_state = ORIGIN(ram_shared);
PROVIDE(__ram_m0_start__ = ORIGIN(ram_m0));
2 changes: 2 additions & 0 deletions firmware/common/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

#include "usb_type.h"

usb_queue_head_t* usb_queue_head(const uint_fast8_t endpoint_address);

void usb_peripheral_reset(void);
void usb_phy_enable(void);

Expand Down
2 changes: 1 addition & 1 deletion firmware/hackrf_usb/hackrf_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include "usb_api_sweep.h"
#include "usb_api_transceiver.h"
#include "usb_api_ui.h"
#include "usb_bulk_buffer.h"
#include "usb_api_m0_state.h"
#include "cpld_xc2c.h"
#include "portapack.h"
Expand Down Expand Up @@ -151,6 +150,7 @@ static usb_request_handler_fn vendor_request_handler[] = {
usb_vendor_request_read_selftest,
usb_vendor_request_adc_read,
usb_vendor_request_test_rtc_osc,
usb_vendor_request_get_buffer_size,
};

static const uint32_t vendor_request_handler_count =
Expand Down
4 changes: 2 additions & 2 deletions firmware/hackrf_usb/usb_api_sweep.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <stddef.h>
#include <hackrf_core.h>
#include "usb_api_transceiver.h"
#include "usb_bulk_buffer.h"
#include "usb_buffer.h"
#include "usb_api_m0_state.h"
#include "tuning.h"
#include "usb_endpoint.h"
Expand Down Expand Up @@ -166,7 +166,7 @@ void sweep_mode(uint32_t seq)
m0_state.next_mode = M0_MODE_RX;

// Write metadata to buffer.
buffer = &usb_bulk_buffer[phase * 0x4000];
buffer = &usb_samp_buffer[phase * 0x4000];
*buffer = 0x7f;
*(buffer + 1) = 0x7f;
*(buffer + 2) = sweep_freq & 0xff;
Expand Down
Loading