cancel
Showing results for 
Search instead for 
Did you mean: 

How report a bug in ST25DVxxKC driver?

Hello, I am working on a project that integrates the ST25DV64KC NFC chip and I think that there is a bug in ST25DVxxKC_ReadMemSize function. I added the driver from the STM32CubeMX X-CUBE-NFC7 pack. I also found a GitHub repository with this pack but it is empty. How can I report a bug?

The mentioned function should compute the size of the EEPROM memory but the condition on line 1252 fails, so the size is not computed and the NFCTAG_OK is returned. When the inequality operator is inverted the function works as expected.

Can you point me to the bug tracker or the correct repository?

Thanks.

Best regards,

Tomas

1 ACCEPTED SOLUTION

Accepted Solutions
Rene Lenerve
ST Employee

Hi @Tom�? Ju?ena​,

Thank you to report this bug, there is no external bug tracker for you to report it. You did the correct way by asking in the forum. I will create an internal ticket to report it.

Please find the fix here after

/**
  * @brief  Reads the ST25DVxxKC Memory Size.
  * @param[in] pObj pointer to the device structure object.
  * @param[out] pSizeInfo Pointer on a ST25DVxxKC_MEM_SIZE structure used to return the Memory size information.
  * @return int32_t enum status.
  */
int32_t ST25DVxxKC_ReadMemSize(const ST25DVxxKC_Object_t *const pObj, ST25DVxxKC_MEM_SIZE_t *const pSizeInfo)
{
  uint8_t memsize_msb;
  uint8_t memsize_lsb;
  int32_t status;
  
  pSizeInfo->Mem_Size = 0;
 
  /* Read actual value of MEM_SIZE register */
  status = ST25DVxxKC_GetMEM_SIZE_LSB(&(pObj->Ctx), &memsize_lsb);
  if(status == NFCTAG_OK)
  {
    status = ST25DVxxKC_GetMEM_SIZE_MSB(&(pObj->Ctx), &memsize_msb);
    if(status == NFCTAG_OK)
    {
      status = ST25DVxxKC_GetBLK_SIZE(&(pObj->Ctx), &(pSizeInfo->BlockSize));
      if(status == NFCTAG_OK)
      {
        /* Extract Memory information */
        pSizeInfo->Mem_Size = memsize_msb;
        pSizeInfo->Mem_Size = (pSizeInfo->Mem_Size << 8) |memsize_lsb;
      }
    }
  }
  return status;
}

Kind Regards.

View solution in original post

1 REPLY 1
Rene Lenerve
ST Employee

Hi @Tom�? Ju?ena​,

Thank you to report this bug, there is no external bug tracker for you to report it. You did the correct way by asking in the forum. I will create an internal ticket to report it.

Please find the fix here after

/**
  * @brief  Reads the ST25DVxxKC Memory Size.
  * @param[in] pObj pointer to the device structure object.
  * @param[out] pSizeInfo Pointer on a ST25DVxxKC_MEM_SIZE structure used to return the Memory size information.
  * @return int32_t enum status.
  */
int32_t ST25DVxxKC_ReadMemSize(const ST25DVxxKC_Object_t *const pObj, ST25DVxxKC_MEM_SIZE_t *const pSizeInfo)
{
  uint8_t memsize_msb;
  uint8_t memsize_lsb;
  int32_t status;
  
  pSizeInfo->Mem_Size = 0;
 
  /* Read actual value of MEM_SIZE register */
  status = ST25DVxxKC_GetMEM_SIZE_LSB(&(pObj->Ctx), &memsize_lsb);
  if(status == NFCTAG_OK)
  {
    status = ST25DVxxKC_GetMEM_SIZE_MSB(&(pObj->Ctx), &memsize_msb);
    if(status == NFCTAG_OK)
    {
      status = ST25DVxxKC_GetBLK_SIZE(&(pObj->Ctx), &(pSizeInfo->BlockSize));
      if(status == NFCTAG_OK)
      {
        /* Extract Memory information */
        pSizeInfo->Mem_Size = memsize_msb;
        pSizeInfo->Mem_Size = (pSizeInfo->Mem_Size << 8) |memsize_lsb;
      }
    }
  }
  return status;
}

Kind Regards.