Skip to content

Commit

Permalink
Use full shared mem on PB2/BeaglePlay
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Dec 13, 2024
1 parent 4b53c59 commit f739d63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/non-gpl/BBB48String/BBB48String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@ void BBB48StringOutput::sendData(FrameData& d, uint32_t* dptr) {
}
if (fullsize > 0) {
int outsize = fullsize;
if (outsize > (12 * 1024)) {
outsize = 12 * 1024;
if (outsize > m_pru->shared_ram_size) {
outsize = m_pru->shared_ram_size;
}
m_pru->memcpyToPRU(m_pru->shared_ram, d.curData + 7624 + 7624, outsize);
}
Expand Down
2 changes: 1 addition & 1 deletion src/non-gpl/BBB48String/FalconWS281x.asm
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ USESHAREDRAM?:
LDI32 r9, 0x00010000
LBBO &r10, r9, sram_offset, NUMOUTSTOREAD
ADD sram_offset, sram_offset, OUTPUTS
LDI r8, 12188
LDI r8, (SHM_SIZE-100)
QBLT DATALOADED?, r8, sram_offset
//reached the end of what we have in other sram, flip to DDR
SET bit_flags, bit_flags, 3
Expand Down
12 changes: 7 additions & 5 deletions src/pru/FalconPRUDefs.hp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
#define NSPERCLK 5
#define NS2CLK(ns) ((ns) / 5)

#define SHM_SIZE (12 * 1024)


#elif defined(AM62X)

// Refer to this mapping in the file - \prussdrv\include\pruss_intc_mapping.h
Expand Down Expand Up @@ -101,11 +104,10 @@
#define CTPPR_1 0x2202C


// There is currently a bug in the am62x device trees that are causing
// the PRU to run at 250Mhz instead of 333Mhz. When that is fixed,
// change this to 3
#define NSPERCLK 4
#define NS2CLK(ns) ((ns) / 4)
#define NSPERCLK 3
#define NS2CLK(ns) ((ns) / 3)

#define SHM_SIZE (32 * 1024)

#else

Expand Down

0 comments on commit f739d63

Please sign in to comment.