Errors while Debugging

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Errors while Debugging

845 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HalC on Tue Mar 27 02:48:26 MST 2012
Hello,
i am using LPCXpresso board with LPC1114 MCU and want to communicate via the SPI interface with an PN512 NFC reader chip.

The downloading and starting works fine. Also reading the version of the PN512 works. I go through the progam step-by-step and when I want to reset the RF-field with the NXP-library-function, i get the error:

"16: Target error from status-poll
  Bad ACK returned from status - wire error."
.
  When I stop the debugging another error occured:

"15: Target error from Register access
  Cannot access core regs when target running."

Can someone help me?
0 项奖励
回复
3 回复数

784 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by HalC on Mon Apr 02 00:49:17 MST 2012
I stepped through the code while debugging. I use the library-function phhalHw_FieldReset to initialize the RF-Field. The reset function calls the function phhalHw_Rc523_FieldOff which should turn off the field, but in my case it turns on. Here is the field off function:

phStatus_t phhalHw_Rc523_FieldOff(
                                  phhalHw_Rc523_DataParams_t * pDataParams
                                  )
{
    phStatus_t  PH_MEMLOC_REM statusTmp;
    uint8_t     PH_MEMLOC_REM bTxControlReg;

    /* Retrieve the content of the TxControl register */
    PH_CHECK_SUCCESS_FCT(statusTmp, phhalHw_ReadRegister(pDataParams, PHHAL_HW_RC523_REG_TXCONTROL, &bTxControlReg));

    /* Switch off the field */
    bTxControlReg &= (uint8_t)~(uint8_t)(PHHAL_HW_RC523_BIT_TX1RFEN | PHHAL_HW_RC523_BIT_TX2RFEN);
    PH_CHECK_SUCCESS_FCT(statusTmp, phhalHw_WriteRegister(pDataParams, PHHAL_HW_RC523_REG_TXCONTROL, bTxControlReg));

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_HAL);
}
The bTxControlReg-value is here 0x80 which is the reset code of the TxControlReg. By stepping over the write-register function the RF-field turns on. I think this isn't right because it is the RF_FieldOff function.
0 项奖励
回复

784 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Wed Mar 28 08:30:56 MST 2012

Quote: HalC
Hello,
i am using LPCXpresso board with LPC1114 MCU and want to communicate via the SPI interface with an PN512 NFC reader chip.

The downloading and starting works fine. Also reading the version of the PN512 works. I go through the progam step-by-step and when I want to reset the RF-field with the NXP-library-function, i get the error:

"16: Target error from status-poll
  Bad ACK returned from status - wire error."
.
  When I stop the debugging another error occured:

"15: Target error from Register access
  Cannot access core regs when target running."

Can someone help me?



Can you attach your code so that we can help on this problem?
0 项奖励
回复

784 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Mar 27 22:59:52 MST 2012
Sounds like you are resetting the core. Which functions are you using? Please provide a code listing around the point of the failures.
0 项奖励
回复