Skip to main content
PHuan
Associate
October 21, 2020
Solved

HardFault issue on NUCLEO-G070RB + X-NUCLEO-NFC05A1 platform

  • October 21, 2020
  • 3 replies
  • 1907 views

Dear Sirs

I have run PollingTagDetect application project on NUCLEO-L053R8 + X-NUCLEO-NFC05A1 board successfully. And I have transferred PollingTagDetect project code to NUCLEO-G070RB + X-NUCLEO-NFC05A1 platform. The terminal software can display ISO15693 UID and block data. But while scan ISO14443A tag the HardFault occurred immediately.

Do you know the root cause? Are both Middlewares and ST25R3911B driver able to run on STM32G070R8 CPU?

Thanks,

Phil Huang

This topic has been closed for replies.
Best answer by Ulysses HERNIOSUS

Hi Phil,

from top level it seems very much like the issue in this thread:

https://community.st.com/s/question/0D70X0000068Oqq/detail?s1oid=00Db0000000YtG6&s1nid=0DB0X000000DYbd&emkind=chatterBestAnswerNotification&s1uid=0050X000007vxES&emtm=1547452868016&fromEmail=1&s1ext=0

Please check if similar restrictions exist in STM32G0 SPI driver code.

Regards, Ulysses

3 replies

Ulysses HERNIOSUS
Technical Moderator
October 21, 2020

Hi Phil,

from top level it seems very much like the issue in this thread:

https://community.st.com/s/question/0D70X0000068Oqq/detail?s1oid=00Db0000000YtG6&s1nid=0DB0X000000DYbd&emkind=chatterBestAnswerNotification&s1uid=0050X000007vxES&emtm=1547452868016&fromEmail=1&s1ext=0

Please check if similar restrictions exist in STM32G0 SPI driver code.

Regards, Ulysses

PHuan
PHuanAuthor
Associate
October 22, 2020

Hi Ulysses

It works. Thank you.

Regards,

Phil

Ulysses HERNIOSUS
Technical Moderator
October 22, 2020

Hi Phil,

could you share a few more details please? Did my answer help? Was it the same issue?

I think other people in the community would appreciate.

Regards, Ulysses

PHuan
PHuanAuthor
Associate
October 22, 2020

Hi Ulysses

Following your suggestion I modified the spi HAL driver stm32g0xx_hal_spi.c file. Bucause access ST25R3911B register via HAL_SPI_TransmitReceive function only so I modified line 1329 and 1399 code.

The original code is

*((uint16_t *)hspi->pRxBuffPtr) = (uint16_t)hspi->Instance->DR;

After modified code is

    //*((uint16_t *)hspi->pRxBuffPtr) = (uint16_t)hspi->Instance->DR;

    uint16_t temp;

    temp = (uint16_t)hspi->Instance->DR;

    *((uint8_t *)hspi->pRxBuffPtr) = temp & 0xff;

    *(((uint8_t *)hspi->pRxBuffPtr)+1) = temp >> 8;  

After download new image, reader do not occur HardFault_IRQ while scan ISO14443A tag. And can display ISO14443A UID on PC terminal software.

Best regards,

Phil Huang

Ulysses HERNIOSUS
Technical Moderator
October 22, 2020

Hi Phil,

thanks for sharing!

Best Regards, Ulysses