How to checking CLK Signal When Inserting a Smart Card

I’ve been trying to determine the CLK signal when inserting a smart card into my device. I’ve looked through the official documentation but haven’t found any direct references or methods on how to check this. Did I miss something, or is there a standard way to verify the CLK signal during smart card insertion? I’m even willing to modify the code in simtrace2-sniff if necessary, as long as the hardware allows viewing this data. Any guidance or advice would be appreciated!

Unfortuantely you are not providing all of the context.

  • what do you mean by “determine”? do you want to measure the clock frequency, or just know if some clock has been applied?
  • is your use case just sniffing?

For sniffing indeed we only have the following flags which are communitcated in SIMTRACE_MSGT_SNIFF_CHANGE


So no separate status reported for clock

For the cardem mode, we do report SIMTRACE_MSGT_BD_CEMU_STATUS (even on an interrupt endpoint), and it contains a flags member with the following bit-mask:

#define CEMU_STATUS_F_VCC_PRESENT       0x00000001
#define CEMU_STATUS_F_CLK_ACTIVE        0x00000002
#define CEMU_STATUS_F_RCEMU_ACTIVE      0x00000004
#define CEMU_STATUS_F_CARD_INSERT       0x00000008
#define CEMU_STATUS_F_RESET_ACTIVE      0x00000010

what do you mean by “determine”? do you want to measure the clock frequency, or just know if some clock has been applied?

exactly - to measure the clock frequency CLK. about the flags I saw them in the source code.

is your use case just sniffing?

Yes. Apparently I will have to use something like logic analyzer for the purpose, I thought that the simtrace2 board (and the software) has an option through which I can also see what the CLK is in real time. Thanks for the quick response

For a pending re-desing after 12 years of the mature long-running SIMTrace design, one of the ideas for improvements is to integrate a binary counter (likely followed by a 1-of-8 mux/demux as a prescaler select) to measure CLK freq. - But right now, the SIMTrace does not offer a similar feature.

Also if there was an option to add a TSL certificate ie. to import - would have been even cooler, but still the features that simtrace2 has are good. Well done to the people behind it. Cheers