Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

  • Logged in as ikarus
  • Last visit: Today 11:22:42

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2022-12-15 08:51:29

OsciMan
Contributor
Registered: 2021-02-13
Posts: 3

FPGA configuration

Hello, after getting a PCF7931 chip and sniffing out the 56-bit password, I became aware that the existing writing commands for the Proxmark won't do it. The code is old and needs a little work to make it usable. To be able to write to the PCF we need to send a pulse at the excite time specified in the datasheet. The current write function doesn't wait for this excite time, only tries with a simple delay. 
I successfully edited the writing code that now reads the data from the chip and senses when is the time to send that pulse, but I don't know how to set up the FPGA for that.

Currently, the FPGA is firstly setup for gathering samples with this command:

LFSetupFPGAForADC(LF_DIVISOR_125, true);

After that the code listens to the data and when the right timeframe comes it switches to writing mode and sends a pulse (the setup below is copy/paste from the PCF7931 writing function):

    FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
    FpgaSendCommand(FPGA_CMD_SET_DIVISOR, LF_DIVISOR_125); //125kHz
    FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_PASSTHRU);

    //if (ledcontrol) LED_A_ON();

    // steal this pin from the SSP and use it to control the modulation
    AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT;
    AT91C_BASE_PIOA->PIO_OER = GPIO_SSC_DOUT;

            // modulate antenna
        HIGH(GPIO_SSC_DOUT);
        while (tempo != tab[u]) {
            tempo = AT91C_BASE_TC0->TC_CV;
        }

        // stop modulating antenna
        LOW(GPIO_SSC_DOUT);
        while (tempo != tab[u + 1]) {
            tempo = AT91C_BASE_TC0->TC_CV;
        }

But the problem is that the Proxmark reboots itself rather than sending a pulse, so the configuration must be incorrect. There is little FPGA specific documentation, so I'm pulling my hair out trying to get this working. What's the right setup for this use case?
I plan on committing the code when finished to complete the PCF7931 functions.

Offline

Quick reply

Write your message and submit

Board footer

Powered by FluxBB