Skip to main content
Visitor II
April 18, 2018
Solved

Interfacing X-NUCLEO-NFC05A1 with BBBWL using RFAL v1.3.0

  • April 18, 2018
  • 1 reply
  • 1906 views
Posted on April 18, 2018 at 14:28

hi,

I am working withX-NUCLEO-NFC05A1 expansion board and connecting it to BBBWL and using the 'STSW-ST25R009 Linux® driver'& UM2375 User manual.

In BBBWL

- SPI port used is SPI1, detected as /dev/spidev1.0

changed the pltf_spi.c to reflect the change

/* ST25R3911XX is connected with Linux host's SPI port /dev/spidev1.0 */

static const char *device = '/dev/spidev1.0';

- Interrupt pin is GPIO115 - 115

changed pltf_gpio.h to reflect the change

/* GPIO pin no. 7 is used as interrupt line to receive interrupts from ST25R3911X.

* To use another pin as interrupt line please change the below definition.

*/

#define PLTF_GPIO_INTR_PIN 115

I get the below error please suggest

~/rfal_v1.3.0/build# ./applications/nfcPoller

Error: assigning high priority to polling thread

Note: this post was migrated and contained many threaded conversations, some content may be missing.
    This topic has been closed for replies.
    Best answer by Ulysses HERNIOSUS
    Posted on May 25, 2018 at 11:02

    Hi Ali,

    • regarding the LEDs: If you don't have any LEDs at all, then maybe you can just define the platformLedOn/ledOff macros empty. Alternative could be to have some global variable which denot the LED state and let the LED_....PIN point to these variables. Then you can 'see' the led state while debugging.
    • regarding the interrupt issue: I guess you will need to attach a logic analyzer and analyze the traces. There are a number of PC based ones like Digiview, Saleae and others. If you don't spot the issue then I can also have a look and give you hints.

    Ulysses.

    1 reply

    Technical Moderator
    April 23, 2018
    Posted on April 23, 2018 at 10:53

    Hi Ali,

    not sure about this one:

    The offending code is in pltf_gpio.c:

    params.sched_priority = sched_get_priority_max(SCHED_FIFO);
     ret = pthread_setschedparam(intr_thread, SCHED_FIFO, &params);
     if (ret) {
     printf('Error: assigning high priority to polling thread
    ');
     return ERR_IO;
     }�?�?�?�?�?�?

    According to documentation e.g.

    http://man7.org/linux/man-pages/man7/sched.7.html

    it should be doneexactly this way. You may want to look at the documentation of your Linux system/kernel to see why this is failing.

    Please try printing the ret variable by e.g. changing the printf to :

    printf('Error: assigning high priority to polling thread : %s
    ',strerror(ret));�?�?

    Which Linux version are you running on the BBBWL?

    Regards,Ulysses

    Visitor II
    April 23, 2018
    Posted on April 23, 2018 at 11:44

    Ulysses

    I am using Debian 9.3 on the BBWL,

    I comment out the code for now, defined the LED Pin, it moves ahead but

    still not able to make it work.

    Looks the SPI communication isn't happening.

    Ali

    On Mon, Apr 23, 2018 at 2:23 PM Ulysses HERNIOSUS <

    Technical Moderator
    April 24, 2018
    Posted on April 24, 2018 at 09:46

    Hi Ali

    I googled around and didn't find why the Linux APIs may be different on this Debian. When nothing is working then I guess you will need to attach a logic analyzer to see SPI + IRQ and analyze.

    Regards, Ulysses.