Skip to main content
Explorer II
August 17, 2022
Solved

declaration of BSP_SPI1_IRQ_Callback() in FreeRTOS_polling

  • August 17, 2022
  • 22 replies
  • 3671 views

about declaration of BSP_SPI1_IRQ_Callback() in ST25NFC_Embedded_Lib_ST25R3916_1.4.0\Projects\STM32L476RG-Nucleo\Applications\X-NUCLEO-NFC06A1\FreeRTOS_polling

Dear Sir,

I am check the process flow of sample program which use FreeTROS.

I found that the function BSP_SPI1_IRQ_Callback() is declared in two place,

one is in nucleo_l476rg_bus.c, another is in plf_adaptation.c .

Could you tell me which one is used in this demo sample?

Also, in this sample code, st25r3916Isr() is called in two different place.

one is in

----------------------------------------

void nfcIsrTaskRunner(void *argument)

{

 /* Infinite loop */

 for(;;)

 {

   ulTaskNotifyTake( pdTRUE, portMAX_DELAY );       /* Check if IRQ happen execute immediately, otherwise other execute Task meanwhile */

   st25r3916Isr();                     /* ISR called from main task avoid calling vTaskSuspendAll from ISR (SPI) - NFC IRQ pin is anyhow checked */

   xSemaphoreGive(platformSem);

 }

}

-------------------------------------------------------

another is in

--------------------------------------

__weak void BSP_SPI1_IRQ_Callback(void)

{

 /* Prevent unused argument(s) compilation warning */

  

 /* This function should be implemented by the user application.

  * It is called into this driver when an event from ST25R3916 is triggered. 

  */

 st25r3916Isr();

}

---------------------------------------

Are there two manners used in this demo? What are the main differences for them?

Best regards

Dai Sai

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi,

    As the initial issue described in this post is fully solved, I would suggest to create a new post dedicated to the CRC issue on Read Multiple Block. I would recommend as well to share information about the tag manufacturer and tag model. Make sure to define a big enough rxBuf (should 1 byte for response flag + 2 bytes for CRC + blockSize * number of requested blocks). Note that the CRC is present in the buffer after the data. Also, blockNum should be 1 when requesting to read 2 blocks.

    Rgds

    BT

    22 replies

    Technical Moderator
    September 1, 2022

    Hi,

    As the initial issue described in this post is fully solved, I would suggest to create a new post dedicated to the CRC issue on Read Multiple Block. I would recommend as well to share information about the tag manufacturer and tag model. Make sure to define a big enough rxBuf (should 1 byte for response flag + 2 bytes for CRC + blockSize * number of requested blocks). Note that the CRC is present in the buffer after the data. Also, blockNum should be 1 when requesting to read 2 blocks.

    Rgds

    BT

    DSai.1Author
    Explorer II
    September 2, 2022

    Dear Brian,

    I modified blockNum value based on your suggestion, and CRC error disappeared.

    up to 20 blocks reading succeed. I am so glad to get the goal.

    thank you very much for your great help.

    Next stage, we will port driver for VL53L1X, in our project, we use double VL53L1X.

    best regards

    Dai Sai