3 ms·
> the relatively slow on-board 8051 Cypress FX2LP? It's pretty sad indeed. 48 MHz clock and performance is maybe 2 MIPS, if that...
by vardump 8y ago
> the relatively slow on-board 8051
Cypress FX2LP?
It's pretty sad indeed. 48 MHz clock and performance is maybe 2 MIPS, if that...
- rpcope1 8y agoYeah, I think that was it. It's kind of fun to program (in the sense that 8051 assembler is usually less crazy than x86/x64 assembler), but it's way underpowered in that way it got used for the 6022BE.
- vardump 8y agoIn case this could help to improve that scope, I'll share my best FX2LP trick: The key to get the best out of FX2LP is to set MPAGE to 0xe6. This way you can index USB registers at 0xe6xx through 8051 r0 and r1 -- no need to load register address to DPTR. Most interestingly, this also works for XAUTODAT1 and XAUTODAT2 registers, which can act as (optionally auto-incrementing) read/write pointers anywhere in xram. This enables "fast" memcopy, memfill, strlen, etc. If r0 points to XAUTODAT1 and r1 to XAUTODAT2, and auto-incrementing is enabled, memcpy becomes just this: memcpy_loop: movx a, @r0 movx @r1, a djnz r7, memcpy_loop AUTOPTR1H/AUTOPTR1L and AUTOPTR2H/AUTOPTR2L set the pointer address. With FX2LP autopointers, 8051 native DPTR isn't typically needed at all.
- CamperBob2 8y agoNote that the 8051 core on the FX2 is mostly there just to set up and manage the FIFOs, which run at the full 48 MHz rate supported by USB 2. Building logic analyzers and other things that don't rely on basic FIFO operation was not Cypress's intention.