AnsweredAssumed Answered

Typo's in PN7462 phhalCt module

Question asked by Robert Beekmans on Oct 18, 2019

While experimenting with the CT interface of the PN7462 I encoutered some typo's and double defined declarations that I want to share with you:


#define PHHAL_CT_CARD_DEFAULT_CLOCK is defined in phhalCt_Int.h and phhalCt_Common.c

Luckily with the same value and afterall only used within phhalCt_Common.c.

In the end it should be defined only once is my advise.


Furthermore in both files the comment that goes with it mentions:


/** Macro for Default clock value 4.92MHz for activation.*/


Since the crystal is 27.12MHZ and 0x05 means Fclk/6 it is actually 4.52MHz


And in the file phhalCt_Common.c the following comment can be found within phhalCt_SetTimer():


/* Load the default values of ETU */
/* Set the card clock default value to 5 Mhz max */
/* The PDR default value 372 is multiplied by 8 will result in 0xBA0, Since we are dividing the Card clock
* frequency by 8 [ACC2- ACC0 = clock/6], we have to multiply the default 372 etu value with 8 for sampling and
* hence the value 0x8B8 is loaded as the default value in the PDR register */


'by 8' and '8' should actually be 'by 6' and '6' since 372 * 6 = 0x8B8


Kind regards,