This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

regarding the board with and without the flash chipset for nrf52840 board

Hi Nordic, 

I am using your official board nrf52840 to develop my application based on the ble_app_uart_peripheral example. BLE communication and the spi interfaced sensor parts works fine with the official development board PCA10056 downloading with segger studio. but when I move the application to another board without the external flash chipset, it fail for running with the interruption from the sensor side. Any ideas for it? 

reference code 

Parents
  • Hi,

    I can't see that you're actually using the external flash anywhere in your code. Could you point me towards where? 

    How exactly is the application failing? 

    Have you mapped the pins correctly? Could you share the custom board file that you're using for your custom board?

    regards

    Jared 

  • Here is board I am using, the pin connection should be the same, it is the MDBT50Q-1MV2 module board.

    Here is the reference   https://www.raytac.com/download/index.php?index_id=43 

  • Hi,

    Could you elaborate a bit more on how it fails? Have you tried debugging the application and checked exactly where it fails? T̶h̶e̶ ̶l̶i̶n̶k̶ ̶t̶h̶a̶t̶ ̶y̶o̶u̶ ̶s̶h̶a̶r̶e̶d̶ ̶i̶s̶ ̶j̶u̶s̶t̶ ̶f̶o̶r̶ ̶t̶h̶e̶ ̶m̶o̶d̶u̶l̶e̶,̶ ̶I̶ ̶c̶o̶u̶l̶d̶ ̶n̶e̶e̶d̶ ̶m̶o̶r̶e̶ ̶i̶n̶f̶o̶r̶m̶a̶t̶i̶o̶n̶ ̶r̶e̶g̶a̶r̶d̶i̶n̶g̶ ̶t̶h̶e̶ ̶P̶C̶B̶ ̶d̶e̶s̶i̶g̶n̶,̶ ̶s̶c̶h̶e̶m̶a̶t̶i̶c̶ ̶w̶o̶u̶l̶d̶ ̶b̶e̶ ̶e̶n̶o̶u̶g̶h̶.̶ The module doesn't have an internal low frequency crystal. Which means that you have to either provide it externally or change the Low frequency clock source. Have you done either?

    And the code you shared doesn't specify which pins that you use for the SPI as the definitions isn't included in the attached code. 

    regards

    Jared 

  • Hi,

    When I am using the official board all works fine, when i am using the raytac board, it never go into the interruption for reading the fifo. 

    Here is the pin setup

    //==========================================================
    // <o> SPI_SCK_PIN - Pin number
    #ifndef SPI_SCK_PIN
    #define SPI_SCK_PIN 3
    #endif

    // <o> SPI_MISO_PIN - Pin number
    #ifndef SPI_MISO_PIN
    #define SPI_MISO_PIN 12
    #endif

    // <o> SPI_MOSI_PIN - Pin number
    #ifndef SPI_MOSI_PIN
    #define SPI_MOSI_PIN 2
    #endif

    // <o> SPI_SS_PIN - Pin number
    #ifndef SPI_SS_PIN
    #define SPI_SS_PIN 4
    #endif

    #ifndef SPI_IRQ_PRIORITY
    #define SPI_IRQ_PRIORITY 6 //
    #endif

    #define IMU_CS_AG_PIN 31 //select for IMU_AG
    #define IMU_CS_M_PIN 26 //select for IMU_Mag
    #define IMU_POWER_PIN 28 //power the sensor pin
    #define PIN_INTERRUPT 29

    I can clearly see the low frequency crystal on my raytac development board 

  • Hi,

    Have you remembered to flash the Softdevice?

    Just to exclude any possible HW issues. Could you instead of using your application try to flash board with the unmodified SPI example from the SDK. If this example works, then we can safely assume that your issue is not HW dependent. Next, only after confirming that it works unmodified, you can try to switch the pins in the example with the pins that you use in your application. 

    Regarding your code:

    liuluan1984 said:

    When I am using the official board all works fine, when i am using the raytac board, it never go into the interruption for reading the fifo. 

     I assume that you're referring to the in_pin_handler() that is supposed to be called on a LOW to HIGH event? Could you set a breakpoint in the handler and check that the program doesn't stop when you set the PIN_INTERRUPT to high. 

    Also, where is lsm9ds1_fifo_data_level_get() and similar functions defined? What serial communication are they using, SPI?

    regards
    Jared
  • I have not flashed the softdevice, maybe I need to find a guide for that

    in_pin_handler() that is supposed to be called on a LOW to HIGH event? YES

    I am using the sgger as development environment, 

    "lsm9ds1_fifo_data_level_get" is defined in the file "lsm9ds1_reg.c"

    lsm9ds1_reg.c

    int32_t lsm9ds1_fifo_data_level_get(stmdev_ctx_t *ctx, uint8_t *val)
    {
    lsm9ds1_fifo_src_t fifo_src;
    int32_t ret;
    ret = lsm9ds1_read_reg(ctx, LSM9DS1_FIFO_SRC, (uint8_t *)&fifo_src,
    1);
    *val = fifo_src.fss;
    return ret;
    }

Reply
  • I have not flashed the softdevice, maybe I need to find a guide for that

    in_pin_handler() that is supposed to be called on a LOW to HIGH event? YES

    I am using the sgger as development environment, 

    "lsm9ds1_fifo_data_level_get" is defined in the file "lsm9ds1_reg.c"

    lsm9ds1_reg.c

    int32_t lsm9ds1_fifo_data_level_get(stmdev_ctx_t *ctx, uint8_t *val)
    {
    lsm9ds1_fifo_src_t fifo_src;
    int32_t ret;
    ret = lsm9ds1_read_reg(ctx, LSM9DS1_FIFO_SRC, (uint8_t *)&fifo_src,
    1);
    *val = fifo_src.fss;
    return ret;
    }

Children
Related