PN7462 ROM code bug: phhalCt_Init() calls phRomhalCt_RegInit() but PRES_PUP_EN and PRES_CON_NO are NOT configured as expected

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7462 ROM code bug: phhalCt_Init() calls phRomhalCt_RegInit() but PRES_PUP_EN and PRES_CON_NO are NOT configured as expected

598 Views
roberto74
Contributor I

It seems the ROM API phRomhalCt_RegInit() does NOT change the values as expected for the fields:

  • bPullupSetStatus
  • bCardPresConnectorStatus

Code snippet from PN7462AU_ex_phExCt with modifications:

/* By default EEPROM has the values (see phCfg for details): */

/* gpkphCfg_EE_Boot_CT->bPullUp = 1 */

/* gpkphCfg_EE_Boot_CT->bConnectorType = 1 */

/* gpkphCfg_EE_Boot_CT->bAutoCTDeactivationEnable = 1 */

/* gpkphCfg_EE_Boot_CT->bSlewRate = 0x38 */

/* Initialize the CT module for normally closed presence switch as recommended in AN11738 */
phhalCt_InitParam_t sInitParams;
sInitParams.bPullupSetStatus = 0;
sInitParams.bCardPresConnectorStatus = 0;
sInitParams.bAutoCTDeactivationEnable = 0;
sInitParams.bSlewRateConfig = 0x38;
phhalCt_Init(&sInitParams);

regVal = PH_REG_GET(CT_SSR_REG);

/* regVal still reflects the values set by EEPROM config as before calling phhalCt_Init() for bPullUp and bCardPres */

/* To set PRES_PUP_EN and PRES_CON_NO as desired use write to register directly: */

PH_REG_SET(CT_SSR_REG, (uint32_t)0x01);

regVal = PH_REG_GET(CT_SSR_REG);

Hopefully with the explaination above you are able to reproduce and hopefully fix it in the near future.

For now I'll use a direct register write as a workaround to get it configured for my hardware setup.

Kind regards,

Robert

Labels (2)
0 Kudos
1 Reply

498 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

Thank you for the information, we will analyze it and make the fix in next release if necessary.

Have a nice day.

BR,

Ivan.

0 Kudos